View Full Version : Mini Mods - Guest can't see links.
Alexey?
08-31-2009, 10:00 PM
OK, lately i made a little template modification that make guests register before they can see any link on the website.
Here is what you need to do to active it and use it in your Forum.
Go to AdminCp>Plugin & Products > Add New Plugin
then do this:
Hook Location : postbit_display_complete
Name : what ever you want
Execution Order : 5
Plugin PHP Code :
if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 1, 3)))
{
$this->post['message'] = preg_replace("!<a[^>]*(http|www)(.*)</a>!siU", $vbphrase[nolink], $this->post['message']);
}
Plugin is Active : Yes
After you complete all the fields just press on SAVE button and you are done.
Insteand of 1,3 you can change the numbers to a diffrent groups you want.
but 1 and 3 is the Default groups that not allowed to see links in posts.
Worked fine to me and should work fine for you.
Have Fun.
enemy@fps
09-01-2009, 11:56 AM
In use.
Thanks again but one question:
can u add that there stand:
Your a guest, please login or register ( with links) to see this link
aliali
09-01-2009, 01:27 PM
Thanks
Alfa1
09-01-2009, 03:15 PM
Please add the function for guests to see internal links.
Alexey?
09-01-2009, 04:25 PM
In use.
Thanks again but one question:
can u add that there stand:
Your a guest, please login or register ( with links) to see this link
in steand of "$vbphrase[nolink]" you may write what ever messege you want.
did it help you?
Please add the function for guests to see internal links.
What do you mean?
This modification only bloked links from guests in threads\posts
enemy@fps
09-01-2009, 09:06 PM
no sorry i am a noob in those things and getting learning it step by step
i want that there stand you must be registered to read this content as a link to the /register.php
can u pls fast do this?
will vote u to MoTM
Michael.A
09-02-2009, 04:06 AM
thanks but not installed yet...
Alexey?
09-02-2009, 04:21 AM
no sorry i am a noob in those things and getting learning it step by step
i want that there stand you must be registered to read this content as a link to the /register.php
can u pls fast do this?
will vote u to MoTM
aaa, now i get it.
just do this:
<b><font color="red">To view the link you have to <a href="register.php">Register</a></b></font>
elenh
09-02-2009, 12:26 PM
Go to Admincp / Language & Phrases and then create new phrase
and add:
<b><font color="red">To view the link you have to <a href="register.php">Register</a></b></font>
Then go to the plugin and replace the
$vbphrase[nolink]
With your own phrase.
Alexey?
09-02-2009, 01:01 PM
Yes this is another way.
enemy@fps
09-02-2009, 01:25 PM
works
thanks for the great support
5* + MOTM
SnakeV
09-02-2009, 07:48 PM
Hello,
It is possible for exclude internal link of the HIDE?.
For example if my board domain is www.testdomain.com and an user post in a thread www.testdomain.com/showthread.php?t=11853 can be excluded from the HIDE and show to guests?.
Thanks!!!
Log on
09-03-2009, 07:55 AM
thank u
Alexey?
09-03-2009, 10:33 AM
Hello,
It is possible for exclude internal link of the HIDE?.
For example if my board domain is www.testdomain.com and an user post in a thread www.testdomain.com/showthread.php?t=11853 can be excluded from the HIDE and show to guests?.
Thanks!!!
Now i see what you mean.
i will check it out and see what i can do.
itsblack
09-04-2009, 02:13 AM
There was a similar addon, "hide links from guests". Just too old, it is for vb 3.6.
https://vborg.vbsupport.ru/showthread.php?t=123415
Alexey?
09-04-2009, 07:38 AM
Ofcurse there is another MOD for this but what i posted here is without installing any thing.
so it is more simple to use.
itsblack
09-04-2009, 08:41 PM
No offense, but I think a MOD with install script is more simple than yours. Whatever, that's not the point.
I posted the url for that, maybe you can take some ideas from that old one.
At least your method is incomplete, if the guest switch the page to the print mode, than your solution will not work.
Alexey?
09-05-2009, 06:25 AM
I know i made it up quickly so the guest can't see it only from posts.
ofcurse it is possible to do it for the arhive and signature and all the other stuff
andrew67
09-18-2009, 09:23 AM
Exactly what was needed , thanks works a treat.
luan7749
09-24-2009, 03:59 AM
So, I have two questions :
1. Images 're hide for guests ? I Want images can be displayed for guests
2. I want that Google , Yahoo and other Search Bot can see link ?
Waqas Anwar
09-24-2009, 05:10 AM
in steand of "$vbphrase[nolink]" you may write what ever messege you want.
did it help you?
It did not help me :erm: Could it be due to version difference? I am using 3.8.3
When I replace it this message is not visible but link become visible. Without doing this links hid but then all guests start sending email to ask where are links?
Go to Admincp / Language & Phrases and then create new phrase
and add:
<b><font color="red">To view the link you have to <a href="register.php">Register</a></b></font>
Then go to the plugin and replace the
$vbphrase[nolink]
With your own phrase.
It didnt work either :(
Alexey?
09-25-2009, 04:31 PM
So, I have two questions :
1. Images 're hide for guests ? I Want images can be displayed for guests
2. I want that Google , Yahoo and other Search Bot can see link ?
1. Yes the images are hidden too.
2.No one can't search it, it like a hide mode so no one can't see the URL\s
It did not help me :erm: Could it be due to version difference? I am using 3.8.3
When I replace it this message is not visible but link become visible. Without doing this links hid but then all guests start sending email to ask where are links?
It didnt work either :(
You have to REEPLACE this "$vbphrase[nolink]" In the text you want to.
i'm using 3.8.2 and there is no problem.
soon i will upgrade to 3.8.4 and see if there is any bugs or isuse
Waqas Anwar
09-27-2009, 05:43 PM
You have to REEPLACE this "$vbphrase[nolink]" In the text you want to.
Yes I did that but it failed. :down:
i'm using 3.8.2 and there is no problem.
soon i will upgrade to 3.8.4 and see if there is any bugs or isuse
Thanks, I'll be waiting. :up:
Alexey?
09-27-2009, 07:21 PM
Yes I did that but it failed. :down:
Thanks, I'll be waiting. :up:
What do you mean it failed?
what happen?
alfanexus
10-09-2009, 12:34 PM
Thanks, this is soooo great, better that nofollow to keep spammers out.
But has anybody an idea on how to do the same for vbulletin blogs???
cormee
10-09-2009, 02:55 PM
What a great little piece of code. :D
Yesterday my register page wasn't even in my top 25 pages visited today it's 3rd most visited.
What would be fantastic would be if it could set by membership type - ie. only paying members can see them. Would also be great if it could be for mailto: links also.
Alexey?
10-10-2009, 09:03 AM
I'm happy you liked it :)
cormme you can make a vip group and you can add to this line
if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 1, 3)))
the id of groups that can't watch the links, and the vip group id don't add there and they will able to watch the links,For the mails i don't know how to do it.
jkun666
10-12-2009, 08:46 AM
Hi, what 'Hook Location' do I use?
Alexey?
10-12-2009, 05:14 PM
postbit_display_complete
cormee
10-13-2009, 07:34 AM
I'm happy you liked it :)
cormme you can make a vip group and you can add to this line
if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 1, 3)))
the id of groups that can't watch the links, and the vip group id don't add there and they will able to watch the links,For the mails i don't know how to do it.
Great, thanks. Am loving this mod! :D
Alexey?
10-13-2009, 03:50 PM
:)
.
RedDevil
11-18-2009, 11:48 AM
I did it slightly different it wouldnt work on 3.8.4 pl1
I created a phrase in phrase manager called registerlink then added this as its as the phrase content
<b><font color="red">To view the link you have to <a href="register.php">Register</a></b></font>then changed the $vbphrase[nolink] to $vbphrase[registerlink]
Alexey?
11-18-2009, 12:51 PM
Well, did i work fine?
RedDevil
11-18-2009, 03:57 PM
Well, did i work fine?
works perfectly cheers - marked as installed forgot to earlier
Alexey?
11-18-2009, 05:37 PM
Tnx dude.
robbiefritz
11-20-2009, 10:24 PM
OK love the idea. It works great for non-coded links. Is there a way to include links contained in the code tags? Thank you.
Alexey?
11-21-2009, 09:19 AM
I don't think so :(
if i'll do an upgrade to this i will try to do it
robbiefritz
11-21-2009, 10:41 AM
I don't think so :(
if i'll do an upgrade to this i will try to do it
Thank you. :up:
vision.mmxlix
01-05-2010, 01:27 AM
Very Cool, Thx A Million! :D
desitracker
04-30-2010, 06:41 PM
hi i have installe dit into my forum..but here is a BIG PROBLEM..
it's only hide a link and not a link what is into
may i have something like vbulletin.org..
all things are hides..
MichaelDance
05-06-2010, 06:53 PM
Mate, some reason it doesnt work for me http://urgamingzone.tabhosts.com/showthread.php?p=1
Alexey?
05-07-2010, 09:03 PM
Now i renewed my license and i will edit my post with the answers for you problems.
hi i have installe dit into my forum..but here is a BIG PROBLEM..
it's only hide a link and not a link what is into
may i have something like vbulletin.org..
all things are hides..
Well, vb.org is probably uses another kind of a hide hack that only members with license like a special user group can see al the hidden content.
Mate, some reason it doesnt work for me http://urgamingzone.tabhosts.com/showthread.php?p=1
I can't access to you forum, I'M getting an error "PAGE NOT FOUND"
MylesM
07-19-2010, 07:02 PM
Doesn't work with C-Logic SEO? When ever I go to a post it says "Page not found" :S
FreeResellers
10-27-2010, 03:14 PM
if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 1, 3)))
{
$this->post['message'] = preg_replace("!<a[^>]*(http|www)(.*)</a>!siU", $vbphrase[registerlink] , $this->post['message']);
}
That did work for me with 3.8.6. Patch Level 1.
But I would still like to see that there is a link... I mean, now people just don't see anything.
Not even a messege that they have to register to see the links.
Silmarillion
11-04-2010, 07:24 PM
Is there a way to use this code in subforum xy only?
datoneer
07-23-2011, 04:46 AM
My vbulletin version:3.8.3
my code:
if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 1, 3)))
{
$this->post['message'] = preg_replace("!<a[^>]*(http|www)(.*)</a>!siU",
<b><font color="white">To view the link you have to <a href="login.php">Login</a> or <a href="register.php">Register</a></b></font>, $this->post['message']);
}
And i get this error when i open post as guest:
Parse error: syntax error, unexpected '<' in /home/datoneer/public_html/includes/class_postbit.php(294) : eval()'d code on line 90
Help please??
narhot
07-29-2011, 07:36 AM
Great work so the best :up:
iglow
07-29-2011, 05:13 PM
used to work fien but now nonlogged in people see this error:
http://screencast.com/t/CnEREQkvS9BW
any ideas? im on lastest vbull version
BirdOPrey5
08-03-2011, 08:58 AM
used to work fien but now nonlogged in people see this error:
http://screencast.com/t/CnEREQkvS9BW
any ideas? im on lastest vbull version
When you say the latest vbulletin, do you mean the latest vb 3.8, or the real latest 4.x?
If it's 4.x try changing this line from:
$this->post['message'] = preg_replace("!<a[^>]*(http|www)(.*)</a>!siU", $vbphrase[nolink], $this->post['message']);
to:
$post['message'] = preg_replace("~<a[^>]*(http|www)(.*)</a>~siU", $vbphrase[nolink], $post['message']);
webmastersitesi
12-08-2011, 07:00 AM
how can i hide links only at SHOWTHREAD_SHOWPOST area?
Alexey?
11-25-2012, 01:00 PM
how can i hide links only at SHOWTHREAD_SHOWPOST area?
the modification is doing this exactly.
al2thero
12-02-2012, 01:04 AM
Thanks a lot
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.