View Full Version : Use hyperlink in navbar to join a usergroup

04 Jul 2006, 00:26
I have a forum which is dedicated to Spam to keep the other forums clean.
So I created a usergroup but most of the member don't go into the group management to join it since they simply don't know the system.

This is how you can add a link into your navbar.

In my example I have a drop down menu for "stuff" :)

Demo: http://ut2007world.com

I THINK this code can be added anywhere, but since I wanted to use the hyperlink in the navbar, I put it in there.

Open your navbar template:

Style Manager > Edit Templates > Navigation / Breadcrump Templates > navbar

Add at the beginning of the template :

<!-- Show usergroup X -->
<form action="profile.php" method="post" id="foo">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="joingroup" />
<input type="hidden" name="usergroupid" value="x" />
<!-- / Show usergroup X -->

<!-- Hide usergroup X -->
<form action="profile.php" method="post" id="fooo">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="leavegroup" />
<input type="hidden" name="usergroupid" value="x" />
<!-- / Hide usergroup X -->



To the approriate usergroupid ..

Now add a link to you navbar

Here is my example :

<tr><td class="thead">Spam</td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="document.getElementById('foo').submit();return false;">Show Spam Forums</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="document.getElementById('fooo').submit();return false;">Hide Spam Forums</a></td></tr>

If you would like to add more than one, you simple double up the code and change

id="foo"> to something else .. Please note that for each


You need another id .. if you look closer you can see that even with just one usergroup I used once foo and fooo

04 Jul 2006, 11:00
Very nice addon, might as well use it some time later on.

Little note; the IRC chat applet you got on your website is JAVA, not Flash ;)

04 Jul 2006, 14:45
Little note; the IRC chat applet you got on your website is JAVA, not Flash ;)

oops :) of course, yes LOL - will chnage :D

04 Jul 2006, 17:59
Very nice! :)

Kirk Y
04 Jul 2006, 19:39
Would this work for all Usergroups, as in not just join Publicly Joinable ones?

04 Jul 2006, 22:01
It works as well .. but the usergroup leader still has to approve ..

20 Jun 2007, 03:29
I wanted to alt. the "Join Group" and "Leave Group" text link when the user clicks on the "Join Group" and "Leave Group" respectively. Can anyone guide me? Thank you.

15 Sep 2007, 04:58
Anyone can show a working demo of this plz ?