Posts: 7,458
Threads: 144
Joined: Oct 2009
Reputation:
441
2012-10-08, 08:08 AM
It could be this :
<elseif $post['usergroup] == "21" then>
It should be
<elseif $post['usergroup'] == "21" then>
You did not write the variable correctly. I think that is it.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved
Posts: 1
Threads: 0
Joined: Oct 2012
Reputation:
0
2012-10-15, 05:08 AM
It's a problem with this, if i want to use it:
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<thead>
<tr>
<td class="thead2" style="border-color: #ff6200;">
<strong>Servers</strong>
</td>
</tr>
</thead>
<tbody style="font-size:10px;">
<?php $servs = file_get_contents('http://xxx/asd.php'); echo $servs; ?>
</tbody>
</table>
</tbody>
</table>
And it's asd.php:
<?php ob_start(); include('s.php'); ?>
<tr>
<td class="trow1">Server #1<br />
<span style="color:green;"><?php echo $server; ?></span><br />
<span style="float:left;">Players: <?php echo $players.'/'.$playersmax; ?></span>
<span style="float:right;">Map: <?php echo $map;?></span><br />
<span style="float:left;"><a href="steam://connect/<?php echo $server; ?>">CONNECT</a></span>
<span style="float:right;"><?php echo $st; ?></span></td>
</tr>
It adds smth like this: http://scr.hu/0et9/kcygj . there's a blank area like <br />
This code works brilliant:
<table border="0" cellspacing="1" cellpadding="4" class="tborder" style="margin-top:10px;">
<thead>
<tr>
<td class="thead2" style="border-color: #ff6200;">
<strong>Strony/fora partnerskie</strong></td>
</tr>
</thead>
<tbody style="font-size:10px;">
<tr><td class="trow1">asd</td></tr>
</tbody></table>
screen: http://scr.hu/0et9/ep9ex
Posts: 422
Threads: 112
Joined: Sep 2010
Reputation:
4
2012-12-15, 04:17 AM
I'm trying to debug a if statement that doesn't shows a script (ads) only to 4 groups, to the other groups it should show normally.
I'm using the following:
Quote:<if !in_array($GLOBALS['mybb']->user['usergroup'], array(13,3,6,4)) then>
<script src="http://ads33751.hotwords.com.br/show.jsp?id=33751&cor=005F00"></script>
</if>
I happens that an user i gave the additional group 4 to it is still showing the ads (it has the script). I would like then to show the $GLOBALS['mybb']->user['usergroup'] at the page to be able to debug and see what is going on that my plan doesn't work.
How can I do that? And if someone would have some idea about what am I doing wrong that the script is showing for the group id 4 would be highly appreciated
Posts: 4,385
Threads: 162
Joined: Jul 2010
Reputation:
138
2012-12-15, 04:26 AM
This user has been denied support.
To include additional groups, try this:
<if !in_array($GLOBALS['mybb']->user['usergroup'], array(13,6,3,4)) && !in_array($GLOBALS['mybb']->user['additionalgroups'], array(13,6,3,4)) then>
Additional groups might need more work, but try if that works.
Posts: 422
Threads: 112
Joined: Sep 2010
Reputation:
4
2012-12-15, 05:00 AM
I found out now, I had to use the "additionalgroups" field of the user.
But the code below won't work when the user has more than one field, anyone could help me with that?
<if !in_array($GLOBALS['mybb']->user['usergroup'], array(13,3,6,4)) AND !in_array($GLOBALS['mybb']->user['additionalgroups'], array(13,3,6,4)) then>
<script src="http://ads33751.hotwords.com.br/show.jsp?id=33751&cor=005F00"></script>
</if>
Posts: 9,905
Threads: 399
Joined: Jan 2010
Reputation:
548
2012-12-15, 05:29 AM
(This post was last modified: 2012-12-15, 05:29 AM by Omar G..)
Maybe this:
<if !array_intersect(array('X', 'Y', 'Z'), explode($mybb->user['additionalgroups'] ? $mybb->user['usergroup'].','.$mybb->user['additionalgroups'] : $mybb->user['usergroup'])) then>
<script src="http://ads33751.hotwords.com.br/show.jsp?id=33751&cor=005F00"></script>
</if>
X, Y, Z are the groups which are not supposed to see the ads.
Soporte en Español
Discord at omar.gonzalez ( Omar G.#6117 ); Telegram at @omarugc ;
Posts: 16
Threads: 5
Joined: May 2013
Reputation:
0
2013-05-24, 01:21 AM
(This post was last modified: 2013-05-24, 01:26 AM by 0000.)
Hi
I can't speak English well, I have a question :
can remove Private Messaging Completely in Configuration (For All user)
But
How To Remove Private Message Completely For one User-Group by use this method ?
i want ,not show private message panel in user controlpanel.
Thanks
Sorry, my English is very poor
I cant speak english well
Posts: 21,668
Threads: 5
Joined: Aug 2011
Reputation:
2,316
2013-05-24, 04:06 AM
^ use if condition in usercp_nav_messenger template ( User Control Panel Templates)
you can put starting of the if condition at the top of usercp_nav_messenger and end it at the bottom (x is usergroup number)
<if $mybb->usergroup['gid'] != x then>
usercp_nav_messenger template code
</if>
Posts: 16
Threads: 5
Joined: May 2013
Reputation:
0
2013-05-24, 07:17 AM
(2013-05-24, 04:06 AM).m. Wrote: ^ use if condition in usercp_nav_messenger template (User Control Panel Templates)
you can put starting of the if condition at the top of usercp_nav_messenger and end it at the bottom (x is usergroup number)
<if $mybb->usergroup['gid'] != x then>
usercp_nav_messenger template code
</if>
please more help
x=2
<if $mybb->usergroup['gid'] != 2 then>
usercp_nav_messenger template code ?
</if>
I cant speak english well
Posts: 21,668
Threads: 5
Joined: Aug 2011
Reputation:
2,316
2013-05-24, 07:41 AM
^ add <if $mybb->usergroup['gid'] != 2 then> at the top of usercp_nav_messenger template and add </if> at the end of the template.
|