vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   links only for selected usergroups (https://vborg.vbsupport.ru/showthread.php?t=99505)

luroca 10-27-2005 10:00 PM

links only for selected usergroups
 
Please, excuse my poor English, I post mostly with a online translator.

This simple hack allows to post links to websites only to selected usegroups.
Naturally, you must edit the plugin to set your authorized usergroups.
Example:
If the user is of a authorized usergroup, in the post it appears this:
www.vbulletin.com/forum

If he is not authorized, it appears:
NO_LINK

If this hack exists, sorry but I don?t find it.
Thanks to MioTraGusa for his aportation.

Don?t be timid, click Install :)

Please, feel free to improve and correct this hack.

lexx27 10-28-2005 12:47 PM

any screenshot?

Shack Networks 10-28-2005 01:10 PM

I think he explained the basics above and even I got the jist of it without the need for a screen shot and I am dumb and fat lol....

luroca 10-28-2005 01:12 PM

No problem, one screenshot :)

lexx27 10-28-2005 01:17 PM

Thanks! I know that he explains it well but i prefer to see it than imagine it. Do we have the option to change the "no_link" with something else? I think your hack is very useful!

luroca 10-28-2005 01:21 PM

Quote:

Originally Posted by lexx27
Do we have the option to change the "no_link" with something else?

Yes, you can edit the plugin and to change NO_LINK with another message.

lexx27 10-28-2005 01:52 PM

Great! Installs

dede1 10-29-2005 06:55 AM

Thank

Marv 10-30-2005 08:20 AM

Can anyone tell m how I can reverse the permissions ? Usually we all have a whole bunch of usergroups and wouldn´t it be more effectiv to let this script check, wether the visitor is a not registered user (or banned, or miserable or whatever user) and hides the link with the given phrase while all others see & can klick the link ?

I´ve got about 32 usergroups (and counting) and it´s a mess, to set the permissions new every time you´ll add one..

Can anyone provide th code for that ?

luroca 10-30-2005 09:15 AM

A plugin for not registered (and so) can not see links? It looks easy, I work in it.

Marv 10-30-2005 09:52 AM

Quote:

Originally Posted by luroca
A plugin for not registered (and so) can not see links? It looks easy, I work in it.

Something is messing up - I setup all the usergroups which should see links but whatever I do links don?t show up for any of the specified groups.

Used code :
PHP Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
    <plugin active="1" product="vbulletin">
        <title>No links</title>
        <hookname>postbit_display_complete</hookname>
        <phpcode><![CDATA[if (!is_member_of($post, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ,19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42))
{
$this->post['message'] = ereg_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*>)', '</a>(<a href="http://www.domain.tld/register.php" title="Please register first or login!" target="_blank">No link ?</a>)', $this->post['message']);
}]]></phpcode>
    </plugin>
</plugins>

Should work, or ?

Marv 10-30-2005 09:58 AM

Btw: a little enhancement:

PHP Code:

$this->post['message'] = ereg_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*>)''</a>(<a href="http://www.domain.tld/register.php" title="Please register first or login!" target="_blank">No link ?</a>)'$this->post['message']); 

will show the unregistered users the best way of getting rid of the "No Links" problem ;)


With your permission, luroca, I attach an updated xml in here. Please remember to deinstall the original xml before using this one or for some reasons the changes are not updated in your forums.

luroca 10-30-2005 10:53 AM

You don´t need my permission to post modifications but the only change I see in your version it´s that instead of NO_LINK message you put your own customized message :surprised:

Marv 10-30-2005 11:00 AM

Quote:

Originally Posted by luroca
You don?t need my permission to post modifications but the only change I see in your version it?s that instead of NO_LINK message you put your own customized message :surprised:

Sure, beside that the hack won?t work as mentioned two posts before - and I have no glue why.

On the other side, I?ve tried to work with
PHP Code:

<phpcode><![CDATA[if (is_member_of($post, ... 

which I?m pretty sure should reverse the !is_member_of statement. But still no go - any ideas ?

luroca 10-30-2005 11:03 AM

Quote:

Originally Posted by Marv
Something is messing up - I setup all the usergroups which should see links but whatever I do links don?t show up for any of the specified groups.

Sorry, I am not sure of understand well, this hack if for not to post links, not for not to see links.
Quote:

Originally Posted by Marv
if (!is_member_of($post, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ,19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42))

I don?t know if this is important but it must be 18, 19, 20, not 18 ,19, 20,

Regards

board.trash 10-30-2005 12:01 PM

hello, is it possible this plugin to activate also in archives?

if yes, i will click Install :D

luroca 10-30-2005 12:52 PM

Hello, I have disabled the archive for the same usegroups that cannot post links, but I´ll see if possible.

board.trash 10-30-2005 01:32 PM

Quote:

Originally Posted by luroca
but I?ll see if possible.

oh thats great, can u update your plugin pls ?

thank you very much !

MioTraGusa 10-30-2005 01:38 PM

ok nice hack anti-spam , but if one unregistered post this:
Code:

www.test.com
http://www.test.com
http://test.com
WWW.TEST.COM
http://WWW.TEST.COM
HTTP://WWW.TEST.COM
HTTP://www.test.com
HTTP://test.com

in the post a can see:

Code:

(No link ?)
(No link ?)
(No link ?)
WWW.TEST.COM
(No link ?)
HTTP://WWW.TEST.COM
HTTP://(No link ?)
HTTP://test.com

CAPITAL-LETTERS don?t work

one little change is proposed

change:
Code:

ereg_replace
for:
Code:

eregi_replace
upss..

the result
Code:

(No link ?)
(No link ?)
(No link ?)
(No link ?)
(No link ?)
(No link ?)
(No link ?)
(No link ?)

bye... Sorry for my english

luroca 10-30-2005 01:57 PM

Thanks, MioTraGusa, updated the xml.
Quote:

Originally Posted by MioTraGusa
Sorry for my english

It?s better than mine :D

luroca 10-30-2005 02:01 PM

Quote:

Originally Posted by board.trash
oh thats great, can u update your plugin pls ?

No yet, I am a very poor ?coder?

board.trash 10-30-2005 02:22 PM

Quote:

Originally Posted by luroca
No yet, I am a very poor ?coder?

hmm damn :devious:

anybody else can do that?

luroca 10-30-2005 02:51 PM

Help wanted :)

MioTraGusa 10-30-2005 03:44 PM

<i>board.trash</i> if one guesst reply the post, he can see the original links in the topic review

it is no important bug, but i comunicate it

board.trash 10-30-2005 04:47 PM

Quote:

Originally Posted by MioTraGusa
board.trash if one guesst reply the post, he can see the original links in the topic review

it is no important bug, but i comunicate it

oh thats not really good :disappointed: thank you for the info :up:


All times are GMT. The time now is 09:25 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.01181 seconds
  • Memory Usage 1,773KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete