What's the string name for a certain setting? As in, what would I call to display the value of the [custom] setting 'display_rating'? Something like $mybb->setting['display_rating']?
What's the string name for a certain setting?
|
2005-09-03, 05:56 PM
If your setting name is display_rating, then you would access it with the variable $mybb->settings['display_rating']
Please note there's a difference between setting name and setting title
2005-09-03, 06:10 PM
As Dennis said, you have to be careful of what you put. Look at the "Setting Name" and place it EXACTLY how you placed it in the settings manager at the acp.
An example...if your setting name was "testing", then you would create a string such as this Quote:$mybb->settings['testing'] Incorrect: Quote:$mybb->settings['someothername']
Rate me if I have helped you
I'm still trying to figure out what I'm going to do with MyBBThemes
2005-09-03, 06:37 PM
Can I use PHP if checks in MyBB's template? Or, does MyBB have it's own method? If not, then I highly suggest you add the ability to do so!
2005-09-03, 06:51 PM
eXaulz Wrote:Can I use PHP if checks in MyBB's template? Or, does MyBB have it's own method? If not, then I highly suggest you add the ability to do so! No. Add your PHP 'if' in the php code of the page, then output it as a variable on the template. For example if you wanted to add a message to logged in users to the header, you would open global.php and add right before the eval($header...) line:
Then add in the header template $mystring.
2005-09-03, 07:02 PM
Wouldn't you need to eval($mystring ...) for that to work? Or am I just thinking of this method if you wanted a template you created on the admin cp to show on the forum?
Rate me if I have helped you
I'm still trying to figure out what I'm going to do with MyBBThemes
2005-09-03, 10:55 PM
Yes Cory. That code is for templates only. Dennis's code will work.
2005-09-04, 05:58 AM
Most of the time, the stuff that is eval'ed is when you are parsing a template. Then by the eval, all the variables will be replaced with the appropriate values.
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)