PDA

View Full Version : I love the new "not logged in" message in code boxes...


Chris M
06-11-2003, 09:44 PM
For those of you who don't know, click "Logout" at the top, then go to:

https://vborg.vbsupport.ru/showthread.php?s=&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
Today at 12:49 AM Xenon said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=407892#post407892)
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:

"phphighlite(stripslashes(addslashes('" . iif(islicensed(), "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')))",
(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
Today at 07:13 AM Xenon said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=407995#post407995)
Bob here is the little part which is changed from a normal phpbox creation:

"phphighlite(stripslashes(addslashes('" . iif(islicensed(), "\\5", addslashes(gettemplate('unlicensed_viewcode', 0, 0))) . "')))",
(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:

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

with this:

$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', 0, 0))) . "')))",
// "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:
$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.