variable on config file

From: Date: Wed, 08 Aug 2007 23:53:59 +0000
Subject: variable on config file
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13737@lists.php.net to get a copy of this message
Hi, I have URL like: user.php?option=add_success&id=lucky I want output like this: User lucky successfully added I confuse how to buld that with config file and tpl file. I must use config file, because it will have more than 1 language. I do this on english language config file: english.conf: ********** add_success = "User %s successfully added", $smarty.get.id ********** tpl file: ********** {if $smarty.get.option == "add_success"}{#add_success#}{/if} ********** But it didn't work. I also read about eval on help file, but I still confuse how to use eval for this problem. Eval on smarty help file only have example variable from the config file, not from other resources like GET or POST. I copy-paste that: ***************************************************** setup.conf ---------- emphstart = <b> emphend = </b> title = Welcome to {$company}'s home page! ErrorCity = You must supply a {#emphstart#}city{#emphend#}. ErrorState = You must supply a {#emphstart#}state{#emphend#}. ***************************************************** OK, there is $company on there, but on help file I don't know where $company from. Can anybody help me to solve this problem? Thank you very much LuckyGuy354 IT Beginner http://www.wiwid.org

« previous php.smarty.general (#13737) next »