MyBB Community Forums

Full Version: need help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
can i know where i can find the variables( dont know what it is called actually) like

<html>
<head>
<title>$settings[bbname]</title>
$headerinclude <--- where can i edit this kind of codes.
</head>
<body>
$header
$wm
$forums

can anyone teach my i am a newbie in php but i know html a lot. thanks
these are in the apropriate php file.
for index, they should be in index.php. etc..
for some plugins, they are in the plugin file

regards
ah i see because in ipb i think it was in one page. can you give me a sample for it?

I am trying to create a new variable like that. could anyone knows how can i start?

and what does it called?
ok there is something i also missed.
some times variables referres to another template. however still u need to eval it in the php file. something like here

now see that html code. we use it in the php file as variable instead of creating a new template.

so we will do something like

 
$adv = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">
<tr>
<td class=\"tborder\">
<table border=\"0\" cellspacing=\"\$theme[borderwidth]\" cellpadding=\"\$theme[tablespace]\" width=\"100%\">
<tr>
<td class=\"thead\"><strong>Adv</strong></td>
</tr>
<tr>
<td class=\"trow1\">
Your things here
</td>
</tr>
</table></td></tr></table>
";

make sure to escape all quotes and double quotes.

at this point we will use a different eval it will look as eval("\$adv = \"".$templates->get("adv")."\";");


try them both ways, and see the difference. it will be a nice start.

regards
If you just want to edit what $headerinclude contains, then you can edit the headerinclude template.