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

Reply
 
Thread Tools
Links for Registered Users Only Details »»
Links for Registered Users Only
Version: 1.00, by Deaths Deaths is offline
Developer Last Online: Mar 2009 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-13-2005 Last Update: Never Installs: 25
 
No support by the author.

Very simple hack, as requested here.

What does it do?
All links can only be viewed by registered members.

Time to install: 5 minutes, if not less
Files to edit: 1

Open up includes/functions_bbcodeparse.php, and find:
PHP Code:
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>"
Replace with:
PHP Code:
global $bbuserinfo;
if (
$bbuserinfo[userid] != 0)
{
return 
"<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
else
{
return 
"Guests cannot view links. You must <a href='register.php'>register</a> to see links.";

Thats it .

NOTE:
If you are using Floris' standard URL hyperlink opening in same window, the first step is:

Find
PHP Code:
return "<a href=\"$rightlink\">$text</a>"
If you are using Postcache, you might need to rebuild it.

Please click install if used!

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 05-14-2005, 10:10 AM
techhouse techhouse is offline
 
Join Date: Dec 2004
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Big big thanks for useful hack!
Reply With Quote
  #3  
Old 05-14-2005, 11:11 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem .
Reply With Quote
  #4  
Old 05-15-2005, 05:01 AM
shiva shiva is offline
 
Join Date: Apr 2002
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice. Wondering about something. If I just want this to show for a select amount of usergroups, like admins, mods and a special usergroup just to view, while non members and regular members can not view, how would I do that please?
Reply With Quote
  #5  
Old 05-15-2005, 07:21 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can replace
PHP Code:
$bbuserinfo[userid] != 
With
PHP Code:
in_array($bbuserinfo[usergroupid], array(X,Y,Z)) 
Change the x, the y and the z to the usergroupids that are allowed to view the links.
You can add more usergroups to the list, like this: array(W,X,Y,Z)

If you's like to enter a list of usergroups that are NOT allowed, please a little ! in from of the in_array, like this:
PHP Code:
!in_array($bbuserinfo[usergroupid],.... 
And change the x, the y and the z to usergroups that are not allowed to view the links.

Hope that helps .
Reply With Quote
  #6  
Old 05-15-2005, 07:22 AM
shiva shiva is offline
 
Join Date: Apr 2002
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, will try it soon.
Reply With Quote
  #7  
Old 05-16-2005, 07:22 PM
xtreme-mobile xtreme-mobile is offline
 
Join Date: Jul 2004
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fantastic hack

thanks for that
Reply With Quote
  #8  
Old 05-20-2005, 05:00 PM
HarryBO HarryBO is offline
 
Join Date: Jan 2003
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice One,thx!
Reply With Quote
  #9  
Old 05-25-2005, 04:49 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No proble guys, glad you like it
Reply With Quote
  #10  
Old 05-25-2005, 01:40 PM
Ugur CETIN Ugur CETIN is offline
 
Join Date: Jul 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very good modification. Thnx.
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 04:53 AM.


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.04259 seconds
  • Memory Usage 2,300KB
  • Queries Executed 26 (?)
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
  • (6)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete