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
  #22  
Old 08-18-2005, 11:41 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by westpointer
Nice hack. One question on setting it with usergroups. I can only seem to get it to work if that is the user's primary usergroup. Can it also check "Additional Usergroups"?

Thanks!
Not sure whether this will work:

Replace
PHP Code:
$bbuserinfo[userid] != 
with
PHP Code:
!is_member_of(X,Y,Z); 
Where X Y and Z can be primary/secondary/anything groups.
Reply With Quote
  #23  
Old 08-18-2005, 09:05 PM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this work on 3.5 RC2
Reply With Quote
  #24  
Old 09-02-2005, 01:54 PM
sajjid sajjid is offline
 
Join Date: Jul 2002
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
in 3.5 RC2 this is in forums/includes/class_bbcode.php
it works but it hides links from everyone trying to figure conditions but so far no luck.
Reply With Quote
  #25  
Old 09-11-2005, 10:12 AM
xtreme-mobile xtreme-mobile is offline
 
Join Date: Jul 2004
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack added to my second board

but 1 question!!!

it stopps you from seeing the link however before you go into the thread if you hover the mouse over the thread title it shows the link any fix for that?

regards

dean
Reply With Quote
  #26  
Old 09-14-2005, 10:58 AM
stan111 stan111 is offline
 
Join Date: Aug 2005
Location: CA
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtreme-mobile
great hack added to my second board

but 1 question!!!

it stopps you from seeing the link however before you go into the thread if you hover the mouse over the thread title it shows the link any fix for that?

regards

dean
i have no idea how to write code to fix that but you can turn off that mouse over thingy by going to Admin CP ---> Vbulletin Options -----> Forum Display Option (forumdisplay) -----> set "Length of Thread Preview Text" to be 0

i did that to my forum
btw: the mouse over is kinda annoying. it made me dizzy :lol: so turning it off is not a big deal to me
Reply With Quote
  #27  
Old 09-14-2005, 04:12 PM
xtreme-mobile xtreme-mobile is offline
 
Join Date: Jul 2004
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one cheers for that
Reply With Quote
  #28  
Old 09-14-2005, 06:50 PM
stan111 stan111 is offline
 
Join Date: Aug 2005
Location: CA
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just have this installed and the img code wont work with this
i have to uninstall it now

very nice and simple mod :thumbup:
Reply With Quote
  #29  
Old 09-15-2005, 05:44 PM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hopefully someone will find out what the conditions in vB3.5 are supposed to be, I'd like to implent something like this for quotes/codes, just like on vB.org here
Reply With Quote
  #30  
Old 09-15-2005, 06:51 PM
omega332432 omega332432 is offline
 
Join Date: May 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What happens if theres a [url] around an [img] and this hack is installed?
Reply With Quote
  #31  
Old 09-16-2005, 11:02 AM
sajjid sajjid is offline
 
Join Date: Jul 2002
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok for this to work in vb 3.5 rc 3 do the following in
forums/includes/class_bbcode.php
find
Code:
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
and replace it with
Code:
if ($vbulletin->userinfo['userid'])   
{  
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."; 
}
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 11:21 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.09738 seconds
  • Memory Usage 2,312KB
  • 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
  • (3)bbcode_code
  • (5)bbcode_php
  • (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
  • (3)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