PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Thu Aug 13, 2009 7:00 pm Reply with quote Back to top

I have installed the LiveZilla freeware support system on my RavenNuke site. The system comes with a JavaScript to track your visitors.

Now...I have the script embedded in my stand alone Classifieds and ZenCart which are ran from Sub Directories and is working like it should. But, when I put it in my RN2.3 site it comes up with the following error on the bottom left of IE after loading:

Code:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Timestamp: Wed, 12 Aug 2009 21:38:38 UTC


Message: Object expected
Line: 1
Char: 1
Code: 0
URI: http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse=0.11006134724575894


The JavaScript that was given to us is:
Code:
<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">
<!-- DON'T REMOVE ANY LINE BREAKS-->
<!--
var script = document.createElement("script");script.type="text/javascript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);
// -->
</script><!-- http://www.LiveZilla.net Tracking Code -->


Is there something in the nuke code that would be blocking this script from being able to function right?
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Fri Aug 14, 2009 3:43 am Reply with quote Back to top

Thats a JS error. You have used the <head> and <body> tags more than once, which can break JS that depends on the body to finish loading. There are many other validations errors, any of which could be causing the problem.

Try using a code validation service such as
Only registered users can see links on this board!
Get registered or login to the forums!
or the tidy html validator addon for firefox.
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Fri Aug 14, 2009 2:36 pm Reply with quote Back to top

How can I embed this code:
Code:
<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">
<!-- DON'T REMOVE ANY LINE BREAKS-->
<!--
var script = document.createElement("script");script.type="text/javascript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);
// -->
</script><!-- http://www.LiveZilla.net Tracking Code -->
so that all pages are tracked? Maybe in the header.php but, I'm not sure where to put it and how to code it.
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3038
Location: United Kingdom

PostPosted: Sat Aug 15, 2009 10:36 am Reply with quote Back to top

How are you trying to add it?

Try adding it in the preferences section of the admin control panel. Switch the editor to source and paste the code.

This works for the Google Analytics code.
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Sat Aug 15, 2009 8:39 pm Reply with quote Back to top

jakec wrote:
How are you trying to add it?

Try adding it in the preferences section of the admin control panel. Switch the editor to source and paste the code.

This works for the Google Analytics code.


I tried that and I get the error I stated in my fisrt post. Man this code is being a pain in my butt Evil or Very Mad It works fine in my stand alone ZenCart and Classifieds area of the site. It only throws an error in the RN pages Confused
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Sun Aug 16, 2009 4:32 am Reply with quote Back to top

I'm pretty sure unless you fix some of the major errors in the page you will continue to have issues, no matter where you put the code.

Image

at least fix the <body> and <head> issue, those tags should only be used once per page.

btw it works ok in firefox, more tolerant of the errors...
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Sun Aug 16, 2009 9:21 am Reply with quote Back to top

So I take the theme I chose to use wasn't made right? I was unaware that there were so many errors as it has always loaded right.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Sun Aug 16, 2009 10:10 am Reply with quote Back to top

well the theme might not be that bad off, some of the errors will compound themselves. Looks like the code added to fade the header images maybe included a little too much. Try adding this to includes/javascript.php before ?>
Notice I changed script to s cript, fix that Smile

Code:
echo '<s cript type="text/javascript" src="themes/ClanMtS/FADE.JS"></s cript>'."\n";
echo '<s cript type="text/javascript">'."\n";
echo '<!--'."\n";
echo 'function newImage(arg) {'."\n";
echo '   if (document.images) {'."\n";
echo '      rslt = new Image();'."\n";
echo '      rslt.src = arg;'."\n";
echo '      return rslt;'."\n";
echo '   }'."\n";
echo '}'."\n\n";
echo 'function changeImages() {'."\n";
echo '   if (document.images && (preloadFlag == true)) {'."\n";
echo '      for (var i=0; i<changeImages.arguments.length; i+=2) {'."\n";
echo '         document[changeImages.arguments[i]].src = changeImages.arguments[i+1];'."\n";
echo '      }'."\n";
echo '   }'."\n";
echo '}'."\n\n";
echo 'var preloadFlag = false;'."\n";
echo 'function preloadImages() {'."\n";
echo '   if (document.images) {'."\n";
echo '      ClanMts_hd_02_ClanMts_hd_13_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_02-ClanMts-hd_13.gif");'."\n";
echo '      ClanMts_hd_02_ClanMts_hd_11_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_02-ClanMts-hd_11.gif");'."\n";
echo '      ClanMts_hd_11_ClanMts_hd_13_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_11-ClanMts-hd_13.gif");'."\n";
echo '      ClanMts_hd_11_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_11-over.gif");'."\n";
echo '      ClanMts_hd_12_ClanMts_hd_13_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_12-ClanMts-hd_13.gif");'."\n";
echo '      ClanMts_hd_12_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_12-over.gif");'."\n";
echo '      ClanMts_hd_12_ClanMts_hd_11_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_12-ClanMts-hd_11.gif");'."\n";
echo '      ClanMts_hd_13_ClanMts_hd_14_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_13-ClanMts-hd_14.gif");'."\n";
echo '      ClanMts_hd_13_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_13-over.gif");'."\n";
echo '      ClanMts_hd_13_ClanMts_hd_12_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_13-ClanMts-hd_12.gif");'."\n";
echo '      ClanMts_hd_14_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_14-over.gif");'."\n";
echo '      ClanMts_hd_15_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_15-over.gif");'."\n";
echo '      ClanMts_hd_15_ClanMts_hd_14_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_15-ClanMts-hd_14.gif");'."\n";
echo '      ClanMts_hd_16_ClanMts_hd_15_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_16-ClanMts-hd_15.gif");'."\n";
echo '      ClanMts_hd_17_ClanMts_hd_15_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_15.gif");'."\n";
echo '      ClanMts_hd_17_ClanMts_hd_14_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_14.gif");'."\n";
echo '      ClanMts_hd_17_ClanMts_hd_13_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_13.gif");'."\n";
echo '      ClanMts_hd_17_ClanMts_hd_12_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_12.gif");'."\n";
echo '      ClanMts_hd_17_ClanMts_hd_11_over = newImage("themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_11.gif");'."\n";
echo '      preloadFlag = true;'."\n";
echo '   }'."\n";
echo '}'."\n\n";
echo '// -->'."\n";
echo '</S CRIPT>'."\n";


and remove however you added that scripting before. That might fix your other error with the livesupport script in itself. As far as the other errors many are not too hard to fix.
These won't usually cause layout of script problems, but in xhtml,
<br> should be <br />
<hr> should be <hr />
<img src="someimage.jpg"> should be <img src="someimage.jpg" />

you can also create a custom header file to load your scripts, you'll have to search the forums for that Smile
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Sun Aug 16, 2009 4:28 pm Reply with quote Back to top

Well...I put the fade script in the Javascript.php file like you said and still no luck on getting the livesupport script to work. I'm tring to look and figure out the /> errors one by one as I'm still learning php coding. Thanks for helping on this and if you can think of anything for me to look for in my theme that would deny the support tracking code let me know.

Thanks
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Sun Aug 16, 2009 5:23 pm Reply with quote Back to top

Ok.. I did a simple test and loaded RN's fisubice theme to see if the issue with this LiveZilla tracking script was being messed with because of the theme I was using.

The same error happens no matter what theme I use. So this tells me that its something to do with the script not working well with the RN core coding.

Any new ideas from this new info would be appreciated Wink
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3038
Location: United Kingdom

PostPosted: Mon Aug 17, 2009 5:01 am Reply with quote Back to top

Are you able to view source? Just wondering if any of the tracking code is being stripped out?

If it is an alternative may be to add a custom_footer.php file with the code in and copy it to your includes/custom_files directory on the server.
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Mon Aug 17, 2009 10:09 am Reply with quote Back to top

jakec wrote:

If it is an alternative may be to add a custom_footer.php file with the code in and copy it to your includes/custom_files directory on the server.


This corrected the error and has let the tracking script work like it should Exclamation Exclamation Very Happy

But.... It has caused another issue. Now when I try and go to my admin area it gives me a page error.

Error 401
The request needs user authentication


So it acts like its not allowing for the popup that ask for my User name & PW. Is there something I need to put in the custom file other then the script code?

Here is the code as I have it now:
Code:
<?php

<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><s cript language="JavaS cript" type="text/javas cript">
<!-- DON'T REMOVE ANY LINE BREAKS-->
<!--
var s cript = document.createElement("s cript");s cript.type="text/javas cript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("s cript.src=src;document.getElementById('livezilla_tracking').appendChild(s cript)",1);
// -->
</s cript><!-- http://www.LiveZilla.net Tracking Code -->
?>

I spaced "script" like S cript for this post so that it didnt block me as some forums do Wink
I'm also getting this in my log file:
PHP Parse error: syntax error, unexpected '<'
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Mon Aug 17, 2009 1:03 pm Reply with quote Back to top

I think I need to echo the script. Can anyone help me echo this the correct way so that it will correct the syntax error and tell me if this would also make it to where I get the issue with not allowing my user/pw for the admin section as I stated above?
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Mon Aug 17, 2009 5:40 pm Reply with quote Back to top

Anyone? Wink
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Mon Aug 17, 2009 6:47 pm Reply with quote Back to top

try this
Code:
echo '<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><s cript language="JavaS cript" type="text/javas cript">'."\n";
echo '<!-- DON\'T REMOVE ANY LINE BREAKS-->'."\n";
echo '<!--'."\n";
echo 'var s cript = document.createElement("s cript");s cript.type="text/javas cript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("s cript.src=src;document.getElementById(\'livezilla_tracking\').appendChild(s cript)",1);'."\n";
echo '// -->'."\n";
echo '</s cript><!-- http://www.LiveZilla.net Tracking Code -->'."\n";
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Mon Aug 17, 2009 7:48 pm Reply with quote Back to top

spasticdonkey wrote:
try this
Code:
echo '<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><s cript language="JavaS cript" type="text/javas cript">'."\n";
echo '<!-- DON\'T REMOVE ANY LINE BREAKS-->'."\n";
echo '<!--'."\n";
echo 'var s cript = document.createElement("s cript");s cript.type="text/javas cript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("s cript.src=src;document.getElementById(\'livezilla_tracking\').appendChild(s cript)",1);'."\n";
echo '// -->'."\n";
echo '</s cript><!-- http://www.LiveZilla.net Tracking Code -->'."\n";


Nope, didnt work:(

I get this in the log file:PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Tue Aug 18, 2009 3:04 pm Reply with quote Back to top

rickleigh wrote:

This corrected the error and has let the tracking script work like it should Exclamation Exclamation Very Happy

But.... It has caused another issue. Now when I try and go to my admin area it gives me a page error.

Error 401
The request needs user authentication


So it acts like its not allowing for the popup that ask for my User name & PW. Is there something I need to put in the custom file other then the script code?

Here is the code as I have it now:
Code:
<?php

<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><s cript language="JavaS cript" type="text/javas cript">
<!-- DON'T REMOVE ANY LINE BREAKS-->
<!--
var s cript = document.createElement("s cript");s cript.type="text/javas cript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("s cript.src=src;document.getElementById('livezilla_tracking').appendChild(s cript)",1);
// -->
</s cript><!-- http://www.LiveZilla.net Tracking Code -->
?>

I spaced "script" like S cript for this post so that it didnt block me as some forums do Wink
I'm also getting this in my log file:
PHP Parse error: syntax error, unexpected '<'

Still looking for help on this please;)
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 442
Location: Netherlands

PostPosted: Tue Aug 18, 2009 3:38 pm Reply with quote Back to top

put your code that worked around this:

Code:
if (!defined('ADMIN_FILE')) {

*******your code***********
}


If you used plain javascript do:

Code:

if (!defined('ADMIN_FILE')) {
?>
*******your code***********
<?php
}


Wink
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Tue Aug 18, 2009 4:34 pm Reply with quote Back to top

Now I get this error in the log:PHP Parse error: syntax error, unexpected '}'

Here is my code:

Code:
if (!defined('ADMIN_FILE')) {
?>
echo '<!-- http://www.LiveZilla.net Tracking Code -->'."\n";
echo '<div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">'."\n";
echo '<!-- DON'T REMOVE ANY LINE BREAKS-->'."\n";
echo '<!--'."\n";
echo 'var script = document.createElement("script");script.type="text/javascript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);'."\n";
echo '// -->'."\n";
echo '</script>'."\n";
echo '<!-- http://www.LiveZilla.net Tracking Code -->'."\n";
<?php
}


Is this correct? I've tried it both ways Wink
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Tue Aug 18, 2009 7:21 pm Reply with quote Back to top

Would really like to get this going. Its holding back a project on my site. It seems like such a simple fix for some that knows what there looking for (NOT ME Sad )
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Aug 18, 2009 7:24 pm Reply with quote Back to top

You don't even need all the echo code then. Just put the original script between ?> and <?php
View user's profile Send private message Visit poster's website
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Tue Aug 18, 2009 8:18 pm Reply with quote Back to top

evaders99 wrote:
You don't even need all the echo code then. Just put the original script between ?> and <?php


After taking out the echo, I get this error in my logs:
PHP Parse error: syntax error, unexpected '}'

Here is the code as I have it now:
Code:
if (!defined('ADMIN_FILE')) {
?>
<!-- http://www.LiveZilla.net Tracking Code -->
<div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">
<!-- DON'T REMOVE ANY LINE BREAKS-->
<!--
var script = document.createElement("script");script.type="text/javascript";var src = "http://www.yourhobbycommunity.com/livezilla/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);
// -->
</script>
<!-- http://www.LiveZilla.net Tracking Code -->
<?php
}
Plus I still get the
Quote:
The request needs user authentication
Hint: The request requires user authentication - The server might return this response for a page behind a failed login

Refered From :
Only registered users can see links on this board!
Get registered or login to the forums!

Your IP : 166.232.55.107
Page Requested : /admin.php
Agent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1Cool Gecko/20081029 Firefox/2.0.0.18 (.NET CLR 3.5.30729)
Redirect Status : 401
when I have the custom_footer.php active Sad What a pain in the butt! Can't beleave this has been such a pain to get working correctly. It works fine in the stand alones I have running Rolling Eyes I dont get it. You would think I could just copy and paste it in my footer but for some reason the script wont work in there Sad
View user's profile Send private message
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Wed Aug 19, 2009 7:46 am Reply with quote Back to top

Dont give up on me now Wink
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 442
Location: Netherlands

PostPosted: Wed Aug 19, 2009 9:49 am Reply with quote Back to top

could you put your full file content in here?
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rickleigh
Worker
Worker


Joined: Jan 06, 2009
Posts: 183

PostPosted: Wed Aug 19, 2009 10:46 am Reply with quote Back to top

wHiTeHaT wrote:
could you put your full file content in here?


The last post was the full file content Very Happy

Am I missing something else Question
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum