vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   BB-code [noguest] - text not readable for guests (https://vborg.vbsupport.ru/showthread.php?t=75162)

Marco van Herwaarden 01-25-2005 10:00 PM

BB-code [noguest] - text not readable for guests
 
Small modification.

[noguest]This is a text[/noguest]
Will not be readable by guests.

Warning
There might be 2 issues with this hack:
- Text showing for all on last post of forum display
- Text could be shown if post is in postcache

I didn't have time to check these 2 issues or resolve them if they turn out to be a real issue.

Please stay tuned for a possible update




Update:

THIS HACK HAS BEEN WITHDRAWN


This hack has been replaced by: https://vborg.vbsupport.ru/showthread.php?t=75228

yoyoyoyo 01-26-2005 03:28 PM

does it work with quoted text? how about on mouseover?

rin 01-26-2005 03:30 PM

Quote:

Originally Posted by yoyoyoyo
does it work with quoted text? how about on mouseover?

i will check the quote. :)

rin 01-26-2005 03:33 PM

quoted messages are aswell not viewable by guests! thanks a lot marco for this great hack!
by the way, what do you mean with mouseover?
if you want to see it in action, go to this post in my forum:
http://www.kawaiination.com/communit...ad.php?p=41471

yoyoyoyo 01-26-2005 03:36 PM

Quote:

Originally Posted by rin
quoted messages are aswell not viewable by guests! thanks a lot marco for this great hack!
by the way, what do you mean with mouseover?
if you want to see it in action, go to this post in my forum:
http://www.kawaiination.com/communit...ad.php?p=41471

Make the hidden "no guest" message the first post of a thread, and then go to the forum index and mouseover the subject, and see what it says in the progress bar on the browser. If it is visible to guests then the hack is somewhat useless. Many (not all) "hide hacks" suffer from that bug.

rin 01-26-2005 03:39 PM

i see, thats a problem. sounds also like there is no easy solution to avoid the hidden message to appear in the preview. but since i deactivted the preview anyway the hack works 1+ for me!

Marco van Herwaarden 01-26-2005 03:42 PM

Hmm it acts like any other standard BB-code.

Will test tomorrow what happens on the index pages, never looked how it will react. Thanks for pointing me to it.

yoyoyoyo 01-26-2005 03:47 PM

Quote:

Originally Posted by rin
i see, thats a problem. sounds also like there is no easy solution to avoid the hidden message to appear in the preview. but since i deactivted the preview anyway the hack works 1+ for me!

It's not an option you as an admin can control, it is a standard feature of browsers to show the full URL or ALT tag in the progress bar (at the bottom of the browser) on mouseover.

rin 01-26-2005 04:11 PM

then it must be stupid me, but anything i (if i am a guest) see in the progress bar is as much as what i want my guests to see. maybe you can show me exactly what you mean? :)

nexialys 01-26-2005 04:27 PM

for the preview to be effective, simply filter the preview with the hack itself... the BBcode regex can be applyed to the preview - that's not done usually.

yoyoyoyo 01-26-2005 04:43 PM

Quote:

Originally Posted by rin
then it must be stupid me, but anything i (if i am a guest) see in the progress bar is as much as what i want my guests to see. maybe you can show me exactly what you mean? :)

this part of your browser.. at the bottom:

http://img162.exs.cx/img162/1297/progressbar3et.jpg

rin 01-26-2005 05:48 PM

i see. but thats not really a problem to me. :)

rin 01-26-2005 08:00 PM

got another question.
i got here a little modified code so that registered users with 0 posts become an error message aswell. but it does not work. can you check it please? :)
Code:

function handle_bbcode_noguest($code)
{
    global $bbuserinfo;

    // remove empty codes
    if (trim($code) == '')
    {
        return '';
    }

    if ($bbuserinfo['userid'] == 0)            // Guest
    {
        return "<table width=\"70%\" cellpadding=\"5\" border=\"0\" style=\"background-color:#E9E0E0;border:1px dotted #555576;\">
                <tr><td align=\"left\"><img src=\"http://img186.exs.cx/img186/637/attention6ir.gif\" border=\"0\" /></td><td>
                <strong>Hello Guest! You are not logged in and therefore you can't see what has been posted here! Register and start being a member of the growing community to gain access to hidden features of the forum! Register by clicking <a href=\"register.php\">here</a>!</strong></td></tr></table>";
    }
    elseif ($bbuserinfo['userid'] == 2)
    {
        return "<table width=\"70%\" cellpadding=\"5\" border=\"0\" style=\"background-color:#E9E0E0;border:1px dotted #555576;\">
                <tr><td align=\"left\"><img src=\"http://img186.exs.cx/img186/637/attention6ir.gif\" border=\"0\" /></td><td>
                <strong>Hello! It seems like you have not yet participated in any discussion! Therefore you can't see what has been posted here! Please become an active part of our growing community!</strong></td></tr></table>";
    }
    else
    {
        return $code;
    }
}

basicaly i added the elseif statement. should work, no?

i even tried this one:
Code:

function handle_bbcode_noguest($code)
{
    global $bbuserinfo;

    // remove empty codes
    if (trim($code) == '')
    {
        return '';
    }

    if ($bbuserinfo['userid'] == 0 OR $bbuserinfo['userid'] == 2)            // Guest
    {
        return "<table width=\"70%\" cellpadding=\"5\" border=\"0\" style=\"background-color:#E9E0E0;border:1px dotted #555576;\">
                <tr><td align=\"left\"><img src=\"http://img186.exs.cx/img186/637/attention6ir.gif\" border=\"0\" /></td><td>
                <strong>Hello Guest! You are not logged in and therefore you can't see what has been posted here! Register and start being a member of the growing community to gain access to hidden features of the forum! Register by clicking <a href=\"register.php\">here</a>!</strong></td></tr></table>";
    }
    else
    {
        return $code;
    }
}

does not work either.

-=Sniper=- 01-26-2005 08:06 PM

should it not be

PHP Code:


else

if 


yoyoyoyo 01-26-2005 08:12 PM

I have been trying to find a good icon for the "no guests" bbcode, and these are the best I could come up with. Any other ideas?

rin 01-26-2005 08:25 PM

Quote:

Originally Posted by -=Sniper=-
should it not be

PHP Code:


else

if 


i am sorry, could you please put it into the code? :)

and here is the icon i am using:
http://img186.exs.cx/img186/637/attention6ir.gif

Marco van Herwaarden 01-27-2005 12:42 PM

This hack have been withdrawn!!!!!

Please see: https://vborg.vbsupport.ru/showthread.php?t=75228


All times are GMT. The time now is 11:48 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.02684 seconds
  • Memory Usage 1,762KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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