Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Usergroup Tags Details »»
Usergroup Tags
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: 03-24-2003 Last Update: Never Installs: 3
 
No support by the author.

This hack allows you to selectively display text to certain usergroups wherever BB code is parsed. For example, this tag:

[ugid1]Only guests will see this[/ugid1]

...will only appear to guests. All other usergroups just won't see the text at all.

This is not meant to be secure! Anybody who quotes or edits a given post will see all the [ugidn] tags in plan text. This hack works for all usergroupids, including custom ones.

Show Your Support

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

Comments
  #12  
Old 03-25-2003, 08:29 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I could pretty easily but it would require a lot more code editing and third-party hacks would have to be edited, too.
Reply With Quote
  #13  
Old 03-25-2003, 08:31 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well there is one way of making it secure that he has already pointed out...Disable the "quote post" option

Satan
Reply With Quote
  #14  
Old 03-25-2003, 08:32 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about PMs, editing a post, etc.?
Reply With Quote
  #15  
Old 03-25-2003, 08:49 PM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx filburt1 !

/me cliks install, it could be fun to use :P
Reply With Quote
  #16  
Old 03-25-2003, 09:02 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Filb, good point about the amount of editing required to do so, good hack nonetheless though .
Reply With Quote
  #17  
Old 03-25-2003, 10:50 PM
Davey Davey is offline
 
Join Date: Nov 2002
Location: England
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea but what about in 'get all posts from this user'.
Wont it show them what they said? Or part of it?

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

This is part of bbcodeparse2(). Whenever that is called, then ugid tags for all other usergroups will be stripped. Otherwise they'll be right there. So anytime BB code is parsed, this will be, too.
Reply With Quote
  #19  
Old 03-25-2003, 10:52 PM
Davey Davey is offline
 
Join Date: Nov 2002
Location: England
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah okay just checking .

Dave.
Reply With Quote
  #20  
Old 03-26-2003, 10:21 AM
VeoMorphine VeoMorphine is offline
 
Join Date: Nov 2002
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hrmmmm... Correct me if im wrong. Im taking this off the top of my head. Wouldn't this fix that quote problem?

Edit newreply.php and find
PHP Code:
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=htmlspecialchars($postinfo[pagetext]); 
Below it put
PHP Code:
$pagetext preg_replace("/(\[)(ugid1)(])(\r\n)*([^\"]*)(\[\/ugid1\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid2)(])(\r\n)*([^\"]*)(\[\/ugid2\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid3)(])(\r\n)*([^\"]*)(\[\/ugid3\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid4)(])(\r\n)*([^\"]*)(\[\/ugid4\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid5)(])(\r\n)*([^\"]*)(\[\/ugid5\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid6)(])(\r\n)*([^\"]*)(\[\/ugid6\])/siU""" ,$pagetext);
$pagetext preg_replace("/(\[)(ugid7)(])(\r\n)*([^\"]*)(\[\/ugid7\])/siU""" ,$pagetext); 
And so on and so on, for each user group.

I think that may only work if its a real bbcode tag. Im not sure. I dont have access to my home pomputer so i cant try it just yet.
Reply With Quote
  #21  
Old 03-26-2003, 02:11 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The whole point is that you don't have to have so much redundant code. That's why I invented loops

Yes it would fix it but the problem is there are so many other places in vB where you can see the raw BB code.
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 10:32 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.04446 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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_php
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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