vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Use hyperlink in navbar to join a usergroup (https://vborg.vbsupport.ru/showthread.php?t=120278)

utw-Mephisto 07-03-2006 10:00 PM

Use hyperlink in navbar to join a usergroup
 
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

Yorixz 07-04-2006 10:00 AM

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 ;)

utw-Mephisto 07-04-2006 01:45 PM

Quote:

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

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

Snake 07-04-2006 04:59 PM

Very nice! :)

Kirk Y 07-04-2006 06:39 PM

Would this work for all Usergroups, as in not just join Publicly Joinable ones?

utw-Mephisto 07-04-2006 09:01 PM

It works as well .. but the usergroup leader still has to approve ..

kweechek 06-20-2007 02:29 AM

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.

dotJoel 09-15-2007 03:58 AM

Anyone can show a working demo of this plz ?


All times are GMT. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01068 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete