Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Use hyperlink in navbar to join a usergroup Details »»
Use hyperlink in navbar to join a usergroup
Version: 1.00, by utw-Mephisto utw-Mephisto is offline
Developer Last Online: Feb 2013 Show Printable Version Email this Page

Version: 3.6.0 Beta 3 Rating:
Released: 07-03-2006 Last Update: Never Installs: 11
Template Edits
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-04-2006, 10:00 AM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 07-04-2006, 01:45 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 07-04-2006, 04:59 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice!
Reply With Quote
  #5  
Old 07-04-2006, 06:39 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work for all Usergroups, as in not just join Publicly Joinable ones?
Reply With Quote
  #6  
Old 07-04-2006, 09:01 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works as well .. but the usergroup leader still has to approve ..
Reply With Quote
  #7  
Old 06-20-2007, 02:29 AM
kweechek kweechek is offline
 
Join Date: Feb 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 09-15-2007, 03:58 AM
dotJoel dotJoel is offline
 
Join Date: Feb 2007
Location: Australia
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone can show a working demo of this plz ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05378 seconds
  • Memory Usage 2,272KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete