MyBB Community Forums

Full Version: PHP in Template!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
hay! i want to add php command to "forumbit_depth1_cat"
this is the code i want to enter.
if($cstyle >= 3)
{
<tr><td width="250px" valign="top">
<strong><font color="#000080"><u>$forum[name]</u></font></strong>
$forums
</td></tr>
}
else
{
<td width="250px" valign="top">
<strong><font color="#000080"><u>$forum[name]</u></font></strong>
$forums
</td>
}
this is not work for me.
זה לא עובד אצלי! Toungue
ואני מנסה ליצור CS.. רק שהקוד הזה יעבוד וזה מוכן!
http://community.mybboard.net/showthread.php?tid=8914

it's a dup!!

יש שם את התשובה!!

אם זה לא עובד, נסה לערוך את הקבצים עצמם...
את קבצי הPHP
עשיתי חיפוש כמו שרשום שם ואחרי זה הוספתי את הפקודה. וב IF הכנסתי את המשתנה. אבל זה לא עוזר.
what Zaher Write for the other user, dont work for me.
Please help! Zaher you know how to do that. please explain me.
You would need to add it to your global.php file and do something like this. or whatever file you want it to display in.
if($cstyle >= 3)
{
$csty = '<tr><td width="250px" valign="top">
<strong><font color="#000080"><u>$forum[name]</u></font></strong>
'.$forums.'
</td></tr>';
}
else
{
$csty = '<td width="250px" valign="top">
<strong><font color="#000080"><u>$forum[name]</u></font></strong>'.
$forums.'
</td>';
}
And add $csty to your template.
where to put that?
i put that up this code :
$plugins->run_hooks("global_end");
$globaltime = $maintimer->gettime();
?>
now i enter $csty to forumbit_depth1_cat.
but now it dont show nothing(at the forum list).
I dont think it will work in the global, add it to forumdisplay.php and index.php

in both find

eval("\$forumlisting .= \"".$templates->get("forumbit_depth$depth$forumcat")."\";");
and add the code of crackter above it.

regards
still i dont see nothing
this is forumdisplay.php after the Edit:
if($cstyle >= 3)
					{
					$csty = '<tr><td width="250px" valign="top"><strong><font color="#000080"><u>$forum[name]</u></font></strong>'.$forums.'</td></tr>';
					}
				else
					{
					$csty = '<td width="250px" valign="top"><strong><font color="#000080"><u>$forum[name]</u></font></strong>'.$forums.'</td>';
					}
					eval("\$forumlisting .= \"".$templates->get("forumbit_depth$depth$forumcat")."\";");
and that is the code i put at forumbit_depth1_cat :
Quote:$csty
what is not ok?
Edit:
error when i try to enter forumdisplay.php?fid=10( or another forum).
Parse error: syntax error, unexpected T_IF in /home/bbheb/domains/bbheb.com/public_html/forum/forumdisplay.php on line 856
Pages: 1 2 3