vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin.org Site Feedback (https://vborg.vbsupport.ru/forumdisplay.php?f=7)
-   -   I love the new "not logged in" message in code boxes... (https://vborg.vbsupport.ru/showthread.php?t=54199)

Chris M 06-11-2003 09:44 PM

I love the new "not logged in" message in code boxes...
 
For those of you who don't know, click "Logout" at the top, then go to:

https://vborg.vbsupport.ru/showthrea...threadid=54178

LOL:p

Hilarious and cool:)

Does this protect against pirates?

Also - I've never noticed this before - A recent thing or a "this has been here since 1902" thing?:p

Satan

Boofo 06-11-2003 09:53 PM

I've been meaning to ask them how they do that. Might be nice to have.

And what is this about?

"A recent thing or a "this has been here since 1902" thing?"

Chris M 06-11-2003 10:04 PM

I have never noticed it before - I was wondering if it were a recent addition, or whether it has been here for some time;)

Satan

Boofo 06-11-2003 10:13 PM

I could be wrong, but I think it was there shortly after Chen handed over the reigns to the new staff.

filburt1 06-11-2003 10:34 PM

Because I'm too lazy, I'm assuming that you mean the code blocks becoming hidden...which was my idea :p

Boofo 06-11-2003 10:38 PM

Ok, how do you do that? The would be good to have.

Erwin 06-12-2003 03:42 AM

This way, guest can view hack threads, but not download hacks or view code.

Boofo 06-12-2003 03:50 AM

Ok, guys. I'll figure it out. ;)

Xenon 06-12-2003 04:49 AM

Yeah, i implemented it shortly after i got the ftp details :)
The idea was by filburt, and i've implemented it in a quite easy way i think.
thanks god there is the iif function ;)

bob, hmm maybe i'll post the modification when i'm back at home :)

Talisman 06-12-2003 04:50 AM

I seem to be missing out on something here. When I logged out and tried to go to that link, I got bounced right back to the main page.

You guys don't?

Boofo 06-12-2003 04:52 AM

Quote:

Today at 12:49 AM Xenon said this in Post #9
Yeah, i implemented it shortly after i got the ftp details :)
The idea was by filburt, and i've implemented it in a quite easy way i think.
thanks god there is the iif function ;)

bob, hmm maybe i'll post the modification when i'm back at home :)

That would be great. Stefan. Thank you. ;)

Dean C 06-12-2003 08:35 AM

Can someone tell me what it is because i hate logging out :)?

Boofo 06-12-2003 09:02 AM

You'll have to log out and find out. :p

ap0c 06-12-2003 09:05 AM

"You cannot view codes as long as you haven't prooved your license status!" in the code and php boxes.
A creative idea, that's for sure

Xenon 06-12-2003 11:13 AM

Bob here is the little part which is changed from a normal phpbox creation:

PHP Code:

"phphighlite(stripslashes(addslashes('" iif(islicensed(), "\\5"addslashes(gettemplate('unlicensed_viewcode'00))) . "')))"

(see in bbcodeparse2 function where you find phphighlight...)

you can replce the islicensed with any other condition and you can also hardcode the text, i've put it into a template, so if you do the same, you have to add the templatename to global.php template chache ;)

filburt1 06-12-2003 11:31 AM

[code], too?

Boofo 06-12-2003 12:00 PM

Quote:

Today at 07:13 AM Xenon said this in Post #15
Bob here is the little part which is changed from a normal phpbox creation:

PHP Code:

"phphighlite(stripslashes(addslashes('" iif(islicensed(), "\\5"addslashes(gettemplate('unlicensed_viewcode'00))) . "')))"

(see in bbcodeparse2 function where you find phphighlight...)

you can replce the islicensed with any other condition and you can also hardcode the text, i've put it into a template, so if you do the same, you have to add the templatename to global.php template chache ;)

Here's what I have just to test it and the code still shows up instead of the message. I made the template 'unlicensed_viewcode', too. What am I doing worng here?

"phphighlite(stripslashes(addslashes('" . iif($bbuserinfo[usergroupid]==6, "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')))",

Xenon 06-12-2003 12:36 PM

@filburt: yes, code, php and sql tags, i just used php as the example :)

@bob: are you sure you have inserted it into the right phphighlight section? there are two of them iirc.
also this is the php tag change, you won't see a difference in code tags, until you change that, too ;)

Boofo 06-12-2003 12:44 PM

I think so. I replaced:

PHP Code:

        $replacearray = array(
          
"createlists('\\7', '\\5')",
          
"createlists('\\4')",
          
"checkurl('\\5', '\\7')",
          
"checkurl('\\4')",
          
"stripbrsfromcode('\\5')",
          
"phphighlite('\\5')"

with this:

PHP Code:

        $replacearray = array(
          
"createlists('\\7', '\\5')",
          
"createlists('\\4')",
          
"checkurl('\\5', '\\7')",
          
"checkurl('\\4')",
          
"stripbrsfromcode('\\5')",
          
"phphighlite(stripslashes(addslashes('" iif($bbuserinfo[usergroupid]==6"\\5"addslashes(gettemplate('unlicensed_viewcode'00))) . "')))",
//          "phphighlite('\\5')", 

Isn't this right?

filburt1 06-12-2003 01:48 PM

Is $bbuserinfo global in that function?

Boofo 06-12-2003 03:26 PM

Yes, I made sure it was before I did the code.

Xenon 06-12-2003 05:22 PM

hmm, i haven't made more changes, so this should work :)

here is the whole block:
Code:

        $replacearray = array(
          "createlists('\\7', '\\5')",
          "createlists('\\4')",
          "checkurl('\\5', '\\7')",
          "checkurl('\\4')",
          "stripbrsfromcode('" . iif(islicensed(), "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')",
          "phphighlite(stripslashes(addslashes('" . iif(islicensed(), "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')))",
          "sqlhighlite('" . iif(islicensed(), "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')",
          "java script:",
          "about :",
          "vbscript :"
        );


Boofo 06-12-2003 11:45 PM

Could this be my problem?

I'm using this for the condition.

iif($bbuserinfo[usergroupid]==6

drives fast 06-13-2003 03:07 AM

logout button doesn't log me out

Xenon 06-13-2003 10:30 AM

nope bob, it would just be a problem if bbuserinfo isn't global

@drives fast: your cookie might be corrupted
delete it manually

Boofo 06-13-2003 10:51 AM

LOL It's working. I logged in as another usergroup and it shows the message fine now. Now all I have to do is figure what condition to use. Thank for the code, Stefan. Any way I could get the SQL tags code from you? I have been wanting that one for a while now. ;)

I'm curious, does "iif" actually mean "if not" or something close to that?

Xenon 06-13-2003 11:58 AM

hmm, the sql function is made by chen, so you have to ask him if you'll get it.

the iif is a vbfunction, you can find it's definition in functions.php :)
to say it in short, if the condition is true it returns the first value, else the second one

Boofo 06-13-2003 12:04 PM

That's what I was doing wrong. I was testing it as the Admin which was showing the code like it was supposed to instead of the template. When I tested it as a registered user, I saw the template contents. DOHH!!! ;) Thanks again, Stefan. I'll get an email off the Chen and check on the SQL code and let you know.


All times are GMT. The time now is 09:36 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.01142 seconds
  • Memory Usage 1,783KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)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