Not Solved PHP in Templates and Template Conditionals
#51
Not Solved
Make a database backup, and a file back move to a new directory and try. So your users don't go offline.
I'm not here often, shoot a PM or whatever if you want my discord.
Reply
#52
Not Solved
Firstly, try it on the default theme with unmodified templates and see if it works there.
Reply
#53
Not Solved
How can I use this for adding external templates?
For example, if im editing a template called 'myTemplate' and I make another template called 'myTemplate2', how could I get 'myTemplate2' to display in 'myTemplate?
Hope that makes sense...
Reply
#54
Not Solved
(2008-11-01, 07:06 AM)Yumi Wrote: It depends on where you put it, but you could try something like this:
<if $GLOBALS['mybb']->user['usergroup'] == 4 then> stuff for usergroup 4</if>

Is there a way to make this work for more than one user group? I've been trying but I can't seem to get it to work with more than one user group.
[Image: mcb-half-ad.png]
Reply
#55
Not Solved
<if $GLOBALS['mybb']->user['usergroup'] == 4 || $GLOBALS['mybb']->user['usergroup'] == 5 || $GLOBALS['mybb']->user['usergroup'] == 6 then> stuff for usergroup 4,5,6</if>

or

<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,5,6)) then> stuff for usergroup 4,5,6</if>
Reply
#56
Not Solved
Awesome plugin, thanks for this!
Cross Industries, LLC - Affordable Technology Services
Phone: (843) 879-8293 E-mail: [[email protected]]Contact Us[/email]
Reply
#57
Not Solved
(2009-11-29, 01:56 AM)Yumi Wrote:
<if $GLOBALS['mybb']->user['usergroup'] == 4 || $GLOBALS['mybb']->user['usergroup'] == 5 || $GLOBALS['mybb']->user['usergroup'] == 6 then> stuff for usergroup 4,5,6</if>

or

<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,5,6)) then> stuff for usergroup 4,5,6</if>

Thank you much! It works perfectly. Smile
[Image: mcb-half-ad.png]
Reply
#58
Not Solved
I have tried to change the forumdisplay_thread template, which likes this:
From
	<td align="center" class="{$bgcolor}" width="2%">{$icon}</td>
To
	<td align="center" class="{$bgcolor}" width="2%"><if><img src="images/icons/smile.gif"> <else />{$icon}</if></td>

and it didn't work, so how can I you the php language to make it works?
Reply
#59
Not Solved
I really don't know what you're trying to do. For one, you don't have an if condition, so it doesn't actually make any sense.
Reply
#60
Not Solved
sorry about that, but what I am trying to do is to make a default thread icon for each post in the forumdisplay, because when we post a thread, if we don't chose a post icon for it, then there will be no icon.

I think you better look at my demo below, hope that can make sense to you. I need the blue section have a default icon, not just blank like that.
   
Reply


Forum Jump:


Users browsing this thread: 145 Guest(s)