Not Solved If Usergroup
#4
Not Solved
to use if statement you need a plugin to allow the use of php on templates:
http://mybbhacks.zingaburga.com/showthread.php?tid=260
ive done that with some side boxs and dropdown menus only viewable for certain groups
for ex this was a for a user side block with avatar on index template that its visible only to logged in users

<if !in_array($mybb->usergroup['gid'], array('1','5','7')) then>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder1">
<tr>
<td class="thead1"><strong style="background-color: #C69A32;padding: 4px 11px 4px 14px;margin: -0.5%;color: #262626;"><i class="fa fa-user"></i> Welcome {$mybb->user['username']} </strong>
	</td>
</tr>
<tr>
<td class="trow3">
<span><img class="avat" src="{$mybb->user['avatar']}" alt="My Avatar" title="My Avatar"/></span>
	<span style="float: right;padding: 12px 35px 0px 0px;">
	<div class="ublock"><a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}"><i class="fa fa-th-large"></i> &nbsp;My threads</a></br>
	<a href="search.php?action=finduser&uid={$mybb->user['uid']}"><i class="fa fa-comments"></i> &nbsp;My posts </a></br>
	<a href="{$mybb->settings['bburl']}/private.php" title="Private Messages"><span><i class="menu-icon fa fa-envelope"></i>&nbsp; Messages&nbsp;<b class="pmboxcount" style="float: none;">{$mybb->user['pms_unread']}</b></a></br>
	<li style="display: block;"><a href="{$mybb->settings['bburl']}/search.php?action=getnew" > <i class="fa fa-tags"></i>&nbsp; New Posts</a></li>
			<li style="display: block;"><a href="{$mybb->settings['bburl']}/search.php?action=getdaily"> <i class="fa fa-star"></i>&nbsp; Today┬┤s Posts</a></li></div>
		</span>
</td>
</tr>
</table></br></if>

Wink
Reply


Messages In This Thread
If Usergroup - by Cryptexinside - 2016-08-15, 02:25 PM
RE: If Usergroup - by Ashley1 - 2016-08-15, 02:28 PM
RE: If Usergroup - by Cryptexinside - 2016-08-15, 02:30 PM
RE: If Usergroup - by subzr1 - 2016-08-15, 06:43 PM
RE: If Usergroup - by Cryptexinside - 2016-08-15, 07:13 PM
RE: If Usergroup - by subzr1 - 2016-08-17, 10:17 AM
RE: If Usergroup - by Cryptexinside - 2016-08-19, 08:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)