Back to vBulletin 3.6 Template Modifications

Use hyperlink in navbar to join a usergroup
Mod Version: 1.00, by utw-Mephisto

This modification is in the archives.
vB Version: 3.6.0 Beta 3 Rating: (0 vote - 0 average) Installs: 11
Released: 04 Jul 2006 Last Update: Never Downloads: 30
Not Supported Template Edits  

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 :

Code:
<!-- 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" />
</form>
<!-- / 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" />
</form>
<!-- / Hide usergroup X -->
Change

Code:
value="x"
To the approriate usergroupid ..

Now add a link to you navbar

Here is my example :

Code:
<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

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

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

Download

This modification is archived, downloads are still allowed.

File Type: %1$s instructions.txt (2.0 KB, 57 downloads)

Screenshots

Click image for larger version
Name:	Screenshot.jpg
Views:	547
Size:	17.8 KB
ID:	50299  

Similar Mods

End-User Options Forgot Password & Join Us in Navbar vBulletin 3.8 Template Modifications

vblts.ru supports vBulletin®, 2022-2024