MyBB Community Forums
PHP in Template! - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: PHP in Template! (/thread-9006.html)

Pages: 1 2 3


PHP in Template! - Oded Dwek - 2006-05-17

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>
}



RE: PHP in Template! - NSH - 2006-05-17

tryinna make a cs?

glSmile


it's a dup

http://community.mybboard.net/showthread.php?tid=8914


RE: PHP in Template! - Oded Dwek - 2006-05-17

this is not work for me.
זה לא עובד אצלי! Toungue
ואני מנסה ליצור CS.. רק שהקוד הזה יעבוד וזה מוכן!


RE: PHP in Template! - NSH - 2006-05-17

http://community.mybboard.net/showthread.php?tid=8914

it's a dup!!

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

אם זה לא עובד, נסה לערוך את הקבצים עצמם...
את קבצי הPHP


RE: PHP in Template! - Oded Dwek - 2006-05-17

עשיתי חיפוש כמו שרשום שם ואחרי זה הוספתי את הפקודה. וב IF הכנסתי את המשתנה. אבל זה לא עוזר.
what Zaher Write for the other user, dont work for me.


RE: PHP in Template! - Oded Dwek - 2006-05-18

Please help! Zaher you know how to do that. please explain me.


RE: PHP in Template! - Martin M. - 2006-05-18

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.


RE: PHP in Template! - Oded Dwek - 2006-05-18

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).


RE: PHP in Template! - zaher1988 - 2006-05-18

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


RE: PHP in Template! - Oded Dwek - 2006-05-18

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