vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - Guest can't see links. (https://vborg.vbsupport.ru/showthread.php?t=222216)

Alexey? 08-31-2009 10:00 PM

Guest can't see links.
 
1 Attachment(s)
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:



Code:

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

Quote:

Originally Posted by enemy@fps (Post 1877719)
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?
Quote:

Originally Posted by Alfa1 (Post 1877832)
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

Quote:

Originally Posted by enemy@fps (Post 1878030)
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:

Code:

<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:
Code:

<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
Code:

$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

Quote:

Originally Posted by SnakeV (Post 1878598)
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

Quote:

Originally Posted by Alexey? (Post 1877876)
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?

Quote:

Originally Posted by elenh (Post 1878359)
Go to Admincp / Language & Phrases and then create new phrase
and add:
Code:

<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
Code:

$vbphrase[nolink]
With your own phrase.

It didnt work either :(

Alexey? 09-25-2009 04:31 PM

Quote:

Originally Posted by luan7749 (Post 1889769)
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

Quote:

Originally Posted by Waqas Anwar (Post 1889794)
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

Quote:

Originally Posted by Alexey? (Post 1890507)
You have to REEPLACE this "$vbphrase[nolink]" In the text you want to.

Yes I did that but it failed. :down:

Quote:

Originally Posted by Alexey? (Post 1890507)
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

Quote:

Originally Posted by Waqas Anwar (Post 1891410)
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

Quote:

Originally Posted by Alexey? (Post 1897463)
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
Code:

<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

Quote:

Originally Posted by Alexey? (Post 1916570)
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

Quote:

Originally Posted by Alexey? (Post 1918207)
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..


All times are GMT. The time now is 05:49 PM.

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.01326 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete