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)

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?


All times are GMT. The time now is 09:44 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.01080 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete