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
  #12  
Old 05-31-2005, 07:54 AM
techhouse techhouse is offline
 
Join Date: Dec 2004
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Link still visible if the post is created in html (non bbcode)
Any idea?
Reply With Quote
  #13  
Old 06-19-2005, 08:22 AM
logofreax logofreax is offline
 
Join Date: Jan 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, i´ve tested this great Hack but got one Question.

Is it possible that only lLinks in Threads can be disabeled and Links in Signatures are still to see?

At the Moment this Hack make all Links impossible to see, altough them in Signatures.

Thanx for help

Greets from Germany
Reply With Quote
  #14  
Old 06-20-2005, 01:07 PM
jesus likes pie jesus likes pie is offline
 
Join Date: Apr 2005
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will it hide it if they are viewing the archive?
Reply With Quote
  #15  
Old 06-22-2005, 03:44 AM
lanc3lot's Avatar
lanc3lot lanc3lot is offline
 
Join Date: Sep 2004
Location: Athens, Greece
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello...Can the links be hided also from users that they havent activated their account? (and so only registered users can see them)

Thnx in advance
Reply With Quote
  #16  
Old 06-25-2005, 06:10 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by techhouse
Link still visible if the post is created in html (non bbcode)
Any idea?
I wouldn't know a solution to that, sorry.
Reply With Quote
  #17  
Old 06-25-2005, 06:12 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by logofreax
Hi, i?ve tested this great Hack but got one Question.

Is it possible that only lLinks in Threads can be disabeled and Links in Signatures are still to see?

At the Moment this Hack make all Links impossible to see, altough them in Signatures.

Thanx for help

Greets from Germany
Yes, I've put a conditional on the whole [url] BBCode.
I wouldn't know how to hide them for posts only, I don't think there is a variable which shows where the BBCode is currently parsed.

Anyone?
Reply With Quote
  #18  
Old 06-25-2005, 06:14 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lanc3lot
Hello...Can the links be hided also from users that they havent activated their account? (and so only registered users can see them)

Thnx in advance
Yes, you can change
PHP Code:
if ($bbuserinfo[userid] != 0)

to
PHP Code:
if ($bbuserinfo[userid] != OR $bbuserinfo[userid] != X)

and replace X by the usergroup from which you want to hide the links aswell.
Not sure whether this works or not, but you can try.
Reply With Quote
  #19  
Old 06-25-2005, 11:46 AM
lanc3lot's Avatar
lanc3lot lanc3lot is offline
 
Join Date: Sep 2004
Location: Athens, Greece
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Deaths
Yes, you can change
PHP Code:
if ($bbuserinfo[userid] != 0)

to
PHP Code:
if ($bbuserinfo[userid] != OR $bbuserinfo[userid] != X)

and replace X by the usergroup from which you want to hide the links aswell.
Not sure whether this works or not, but you can try.
Nope it didnt

When i did that, the code didnt worked at all (neither for the userid 0)
Reply With Quote
  #20  
Old 07-08-2005, 07:48 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Deaths
You can add more usergroups to the list, like this: array(W,X,Y,Z)
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!
Reply With Quote
  #21  
Old 07-21-2005, 07:40 PM
Fallback Fallback is offline
 
Join Date: May 2005
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack doesnt seem to work if the user puts a URL in BBCODE [URL] and BBCODE [URL] tags... Is there a fix?
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:12 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.10387 seconds
  • Memory Usage 2,315KB
  • 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
  • (7)bbcode_php
  • (5)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