vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with disabling code in template (https://vborg.vbsupport.ru/showthread.php?t=221206)

brandon515 08-18-2009 05:34 PM

Help with disabling code in template
 
In my footer template I have the following code thats for syntax highlighting. It works great but it messes up my vaispy.php page. I am trying to figure out how to write a bit of code that would disable the code on the vaispy page but enable it for all other pages.

PHP Code:

<script type="text/javascript" src="js/shCore.js"></script>
<
script type="text/javascript" src="js/shBrushPhp.js"></script>
<
script type="text/javascript" src="js/shBrushCSharp.js"></script>  
<
script type="text/javascript" src="js/shBrushCss.js"></script>  
<
script type="text/javascript" src="js/shBrushJScript.js"></script>  
<
script type="text/javascript" src="js/shBrushSql.js"></script>  
<
script type="text/javascript" src="js/shBrushVb.js"></script>  
<
script type="text/javascript" src="js/shBrushXml.js"></script>
<
script type="text/javascript">
window.onload = function () {
 
dp.SyntaxHighlighter.ClipboardSwf 'js/clipboard.swf';
 
dp.SyntaxHighlighter.HighlightAll('code'truetruefalse1false);
}
</
script

Any help would be greatly appreciated.
Brandon

Dismounted 08-21-2009 10:44 AM

HTML Code:

<if condition="THIS_SCRIPT != 'REPLACEME'">
<script type="text/javascript" src="js/shCore.js"></script>
<script type="text/javascript" src="js/shBrushPhp.js"></script>
<script type="text/javascript" src="js/shBrushCSharp.js"></script> 
<script type="text/javascript" src="js/shBrushCss.js"></script> 
<script type="text/javascript" src="js/shBrushJScript.js"></script> 
<script type="text/javascript" src="js/shBrushSql.js"></script> 
<script type="text/javascript" src="js/shBrushVb.js"></script> 
<script type="text/javascript" src="js/shBrushXml.js"></script>
<script type="text/javascript">
window.onload = function () {
 dp.SyntaxHighlighter.ClipboardSwf = 'js/clipboard.swf';
 dp.SyntaxHighlighter.HighlightAll('code', true, true, false, 1, false);
}
</script>
</if>

Look inside vaispy.php and look for the line near the top like this:
PHP Code:

define('THIS_SCRIPT''something'); 

Replace "REPLACEME" in the template code with "something".


All times are GMT. The time now is 02:45 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.00953 seconds
  • Memory Usage 1,728KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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