Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Usergroup Tags in Templates Details »»
Usergroup Tags in Templates
Version: 1.00, by filburt1 filburt1 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 04-22-2003 Last Update: Never Installs: 12
 
No support by the author.

This hack lets you use tags like <ugid6>Only admins will see this</ugid6> in templates to dynamically show or hide text depending on the logged-in user's usergroupid. This is similar to the other conditional templates hack but much less bulky because it only handles usergroups. It's also surprising elegant and simple to use.

Usage:
<ugidusergroupid>text to show</ugidusergroupid>. That will show "text to show" to the current user if (s)he has a usergroupid of usergroupid. All other usergroupid tags are just deleted and never outputted.

Screenshot doesn't apply.

Show Your Support

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

Comments
  #12  
Old 04-24-2003, 09:09 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about multiple usergroups burt?

<ugid2,3,4>blah</ugid2,3,4>

- miSt
Reply With Quote
  #13  
Old 04-24-2003, 06:00 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 09:06 PM WEForums said this in Post #8
Of course the basic answer would be to enter all usergroup IDs but 1.

Like...

<ugid2>Test</ugid2>
<ugid3>Test</ugid3>

It's easy enough to do. Tried mixing them together but it didn't work.

thats stupid. it will clutter up templates. i am currently using Logician's hack.

if what mist said came true i might use it

l8er
sonic
Reply With Quote
  #14  
Old 04-25-2003, 05:04 AM
#01 #01 is offline
 
Join Date: Nov 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it on my board...
But... I tried using it in a post. I have html turned on in my posts... but it doesn't work.

Is this only usable when you put it in your templates? If so... is it possible you could throw some code together to enable it in posts as well?

Cause if it will work in posts I can easily make custom VB tags for my board using Usergroup names.
Like:
[moderators]Mods Only![/moderators]

Or it would be possible to make a VB tag that would show to multiple groups at a time. By making a custom VB tag like...

< ugid1 >< ugid2 >< ugid3 >{ param }< ugid3 >< ugid2>< ugid1 >

Which could be = [ elite ] Visable to Admins, Super Mods, & Mods[ /elite ]

This hack could have many useful possabilities if it was able to be used in posts.

I hope it isn't very hard. I have been waiting for a hack like this for over a year now.
Reply With Quote
  #15  
Old 04-25-2003, 09:14 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No i w as askin the question sonic3D

- miSt
Reply With Quote
  #16  
Old 04-25-2003, 10:49 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It only works in templates.
Reply With Quote
  #17  
Old 04-25-2003, 12:28 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about my question Can you use <ugid2,3> ?

- miSt
Reply With Quote
  #18  
Old 04-25-2003, 05:43 PM
#01 #01 is offline
 
Join Date: Nov 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:49 AM filburt1 said this in Post #15
It only works in templates.

If you get time can you see if you might be able to code it for posts too? I think it would be an even better hack if this was possible.
Thanks filburt1
Much Appreciated
Reply With Quote
  #19  
Old 07-24-2003, 01:15 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't cha think editing templates to show text to certain groups is equivalent as the conditionals hack? to make this hack even sweeter would be to create a vbcode tag that shows text only to certain groups IMO...
Reply With Quote
Reply

Thread Tools

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 03:40 PM.


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.04714 seconds
  • Memory Usage 2,276KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete