vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   THIS_SCRIPT issue (https://vborg.vbsupport.ru/showthread.php?t=285433)

soniceffect 07-11-2012 09:17 PM

THIS_SCRIPT issue
 
Hi Guys,
Seem to have a problem I cant solve.

In the top of the main page of my new modification I have the following

PHP Code:

define('THIS_SCRIPT''dcSomepage'); 

The first line in one of my plugins is

PHP Code:

if(THIS_SCRIPT=='dcSomepage'){ 

Now this works absolutly fine on my dev forum as I have been coding. However once I tested the installation of my modification on another installation I found that my main page was blank. On further looking it seems like THIS_SCRIPT wasnt set on first run. If I comment out the if block and run it I get my page fine. I can then safely put it back in and it works without an issue.

Please could someone let me know what Im doing wrong? Got a good modification I wanna release and this annoyin bug is the only thing stopping me LOL

EDIT: Odd thing is it worked on default skin, just not my custom skin ... Very strange

kh99 07-11-2012 10:57 PM

Hmm...did you by any chance create a product file by editing the xml? I'm thinking maybe you have a strange invisible character in there that's making the code not work right. Otherwise I don't know (and I can't think why the style would matter).

soniceffect 07-12-2012 04:22 PM

Nope. Created normally.

Im thinkin it must just me my style. I have made quite a lot of changes and testing it since have had no problems.

Badshah93 07-13-2012 07:06 AM

What output this code gives ?

Code:

print_r(THIS_SCRIPT);

soniceffect 07-13-2012 08:09 AM

Quote:

Originally Posted by Badshah93 (Post 2347497)
What output this code gives ?

Code:

print_r(THIS_SCRIPT);

It seems this was a one off issue when I did a test installation on my dev site for some really strange reason. Havent been able to replicate the problem since at all, so would seem its a none issue. Cheers for your help though, is much appreciated.

soniceffect 07-14-2012 12:22 PM

Ok apparently I am still having the same issue. Its almost like the name is not picked up until after the first run, however its only on my custom skin. Doesnt happen on the default skin at all. Even happens are upgrade


All times are GMT. The time now is 10:51 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.01009 seconds
  • Memory Usage 1,725KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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