Log in

View Full Version : Early place i can put my debuging code and not interfer with the processing of script


Frank H. Shaw
01-25-2009, 08:19 PM
I have been testing the following and this is the first place in the calandar.php where i can do the print_r() function and not get the error message.

Unable to add cookies, header already sent.
File: C:\Inetpub\vhosts\burningtaper.org\httpdocs\forums \calendar.php


<php>

($hook = vBulletinHook::fetch_hook('calendar_displaymonth_c omplete')) ? eval($hook) : false;

echo '<pre>';
print_r($vbulletin->userinfo['userid']);
echo '</pre>';

</php>

Is this the first place or should i be looking to do this early as posiable and not interfer with the opration of the calandar page.

I need to understand why this is and are there things i can do to have this happen early in the process?

Please explain.

THANKS

Frank H. Shaw

--------------- Added 1232923875 at 1232923875 ---------------

Looking again at the calandar page I see that by putting the print_r after the hook there is some functulitly loss mainly the threads or nav bar and title of the calandar when is looking at so the print_r must be later on.

<php>

($hook = vBulletinHook::fetch_hook('calendar_displaymonth_c omplete')) ? eval($hook) : false;

echo '<pre>'; // // loose the nav bar threads
print_r($vbulletin->userinfo['userid']);
echo '</pre>';

</php>

So I moved the test to the next hook and my test does not show so it has to be between the two hooks


<php>

eval('print_output("' . fetch_template('CALENDAR') . '");');

echo '<pre>'; // loose everything but page so what ever it must be before
print_r($vbulletin->userinfo['userid']);
echo '</pre>';

</php>

I was able to get the item to show up at the bottom if the page unstead of the top - I WANTED THE TOP AND NOT LOSSE THE FUNCTULITY OF THE PAGE.

<php>
$debugmsg = $vbulletin->userinfo['userid'];
eval('print_output("' . fetch_template('CALENDAR') . $debugmsg . '");');
</php>


I need to ask again where is the best place for my debug code AT THE TOP and not loose the functulity of the calandar.php?



THANKS

Frank H. Shaw