Thread: Miscellaneous Hacks - Hide Links From Guests
View Single Post
  #357  
Old 06-17-2012, 02:23 AM
Ary Braga Ary Braga is offline
 
Join Date: Jun 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working great on my vb 4.2.0pl2 ( FF and IE

My Plugin page is:

Product:Guest dont see links
Hook: forumdata_start
Title: Place valid row
Order execution: 5
code:
PHP Code:
$this->validfields['forum_hlfg'] = array(TYPE_STRREQ_NO); 
__________________________________________________ __________
Product: Guest dont see links
Hook: archive_thread_post
Title: Guest dont see linksin archive
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_archive'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_archive'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
$foruminfo['forum_hlfg'])
        {
            
$post['pagetext'] = eregi_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)'$vbphrase[nolinkinarchive], $post['pagetext_simp']);
            
$post['pagetext_simp'] = strip_bbcode($post['pagetext']);
            
$post['pagetext_simp'] = preg_replace("!(.+@\.*.+)!i"$vbphrase[nolinkinarchive], $post['pagetext_simp']);
            
$post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
            
$post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);
        }
    }

__________________________________________________ ________
Name:Guest dont see links
Hook: forumadmin_edit_form
Title: Guests don't see links in some forums
Order execution: 5
code:
PHP Code:
print_yes_no_row($vbphrase['forum_hlfg'], 'forum[forum_hlfg]'$forum['forum_hlfg']); 
__________________________________________________ _______
Name:Guest dont see links
Hook: search_results_postbit
Title: Guests can not see links to Search
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_search'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_search'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        
$post['pagetext'] = eregi_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?][^<>[:space:]]+[#[:alnum:]+]*)'$vbphrase[nolinkinarchive], $post['pagetext']);
        
$post['pagetext'] = preg_replace("!(.+@\.*.+)!i"$vbphrase[nolinkinarchive], $post['pagetext']);
    }

_________________________________________________
Name:Guest dont see links
Hook: postbit_display_complete
Title: Guests don't see links in Signatures
Order execution: 5
code:
PHP Code:
if (ereg("(showthread)"$GLOBALS[vbulletin]->scriptpath))
{
    if (
$this->registry->options['hlfg_global'])
    {
        
$groups explode(',',$this->registry->options['hlfg_groups']);
        if (
$this->registry->options['hlfg_sigs'] AND !$this->registry->userinfo['userid'] OR $this->registry->options['hlfg_sigs'] AND (is_member_of($this->registry->userinfo$groups) OR $groups[0] == 0))
        {
            if (!
$forum['forum_hlfg'])
            {
                
$this->post['signature'] = preg_replace("!<a[^>]*(http|www|mailto)(.*)</a>!siU"$this->registry->options['hlfg_info'], $this->post['signature']);
                
$this->post['signature'] = preg_replace("!mailto:(.+\.*.)!siU"$this->registry->options['hlfg_info'] . '<'$this->post['signature']);
            }
        }
    }

__________________________________________________ _____
Name:Guest dont see links
Hook: newreply_start
Title: Guests don't see links in quotes
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_quotes'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_quotes'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
$foruminfo['forum_hlfg'])
        {
            
$vbulletin->GPC['noquote'] = true;
        }
    }

__________________________________________________ _______
Name:Guest dont see links
Hook: member_complete
Title: Guests don't see links in Profiles
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(','$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_profile'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_profile'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
is_member_of($vbulletin->userinfo2,5,6,7))
        {
            
$userinfo['signature'] = preg_replace("!<a[^>]*(http|www|mailto)(.*)</a>!siU"$vbulletin->options['hlfg_info'], $userinfo['signature']);
            
$userinfo['signature'] = preg_replace("!mailto:(.+\.*.)!siU"$vbulletin->options['hlfg_info'] . '<'$userinfo['signature']);
        }
    }

________________________________________________
Name:Guest dont see links
Hook: newreply_form_reviewbit
Title: Guests don't see links in replies
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_reply'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_reply'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
$foruminfo['forum_hlfg'])
        {
            
$reviewmessage preg_replace("!<a[^>]*(http|www|mailto)(.*)</a>!siU"$vbulletin->options['hlfg_info'], $reviewmessage);
            
$reviewmessage preg_replace("!mailto:(.+\.*.)!siU"$vbulletin->options['hlfg_info'] . '<'$reviewmessage);
        }
    }

__________________________________________________ ______
Name:Guest dont see links
Hook: threadbit_process
Title: Guests don't see links in outline view
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_prev'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_prev'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
$foruminfo['forum_hlfg'])
        {
            
$thread['preview'] = '';
        }
    }

__________________________________________________ ___________
Name:Guest dont see links
Hook: postbit_display_complete
Title: Guests don't see links in posts
Order execution: 5
code:
PHP Code:
if (ereg("(showthread)"$GLOBALS[vbulletin]->scriptpath))
{
    if (
$this->registry->options['hlfg_global'])
    {
        
$groups explode(',',$this->registry->options['hlfg_groups']);
        if (
$this->registry->options['hlfg_posts'] AND !$this->registry->userinfo['userid'] OR $this->registry->options['hlfg_posts'] AND (is_member_of($this->registry->userinfo$groups) OR $groups[0] == 0))
        {
            if (!
$forum['forum_hlfg'])
            {
                
$this->post['message'] = preg_replace("!<a[^>]*(http|www|mailto)(.*)</a>!siU"$this->registry->options['hlfg_info'], $this->post['message']);
                
$this->post['message'] = preg_replace("!mailto:(.+\.*.)!siU"$this->registry->options['hlfg_info'] . '<'$this->post['message']);
            }
        }
    }

__________________________________________________ __
Product:Guest dont see links
Hook: printthread_post
Title: Guests can not see links in the "Printable Version"
Order execution: 5
code:
PHP Code:
if ($vbulletin->options['hlfg_global'])
{
    
$groups explode(',',$vbulletin->options['hlfg_groups']);
    if (
$vbulletin->options['hlfg_print'] AND !$vbulletin->userinfo['userid'] OR $vbulletin->options['hlfg_print'] AND (is_member_of($vbulletin->userinfo$groups) OR $groups[0] == 0))
    {
        if (!
$foruminfo['forum_hlfg'])
        {
            
$post['message'] = preg_replace("!<a[^>]*>(.*)</a>!siU"$vbphrase[nolink], $post['message']);
            
$post['message'] = preg_replace("!mailto:(.+\.*.)!siU"$vbphrase[nolink] . '<'$post['message']);
        }
    }

I hope to have aided
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01999 seconds
  • Memory Usage 1,924KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete