2011-06-08, 09:26 PM
2011-06-08, 09:31 PM
Use the header_welcomeblock_member template to display links to members and, similarly, the header_welcomeblock_guest template to display links to guests.
If your layout doesn't allow you to do that, then use the PHP in Templates plugin and use this in your code, whereas 4 is the uid of the usergroup you want to show links to:
If your layout doesn't allow you to do that, then use the PHP in Templates plugin and use this in your code, whereas 4 is the uid of the usergroup you want to show links to:
<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
Hello world!
</if>
2011-06-08, 09:53 PM
That would work like header template?
2011-06-08, 09:54 PM
I don't quite understand that question. What are you asking exactly?
2011-06-08, 09:59 PM
in the header template you have this.
<ul id="menu">
<li><a href="{$mybb->settings['bburl']}/portal.php">Home</a></li>
<li><a href="{$mybb->settings['bburl']}/index.php">Forums</a></li>
<li><a href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php">{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php">{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">FAQ</a></li>
<li><a href="{$mybb->settings['bburl']}/newpoints.php">Store</a></li>
<li><a href="{$mybb->settings['bburl']}/helpcenter.php">Help Center</a></li>
<li><a href="/contact-us.php">Apply to be a Builder</a></li>
{$welcomeblock}
</div>
I want to add another link but so only MEMBERS, ADMINS, AND SUCH can see.2011-06-08, 10:11 PM
Yeah, you can either edit the header_welcomeblock_member template and add your own links accordingly or use the other solution, which is to use the PHP in Templates plugin.
2011-06-08, 11:36 PM
Would this work?
<if $GLOBALS['mybb']->user['usergroup'] == 2, 4, 6 then>
Hello world!
</if>
2011-06-08, 11:45 PM
Can't use template conditionals with MyBB.
2011-06-09, 02:04 AM
(2011-06-08, 11:45 PM)Mr. E Wrote: [ -> ]Can't use template conditionals with MyBB.Yes you can, i do.