Author |
Message |
rickleigh
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 06, 2009
Posts: 183
|
Posted:
Thu Aug 13, 2009 7:00 pm |
|
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? |
_________________ Thanks,
Rick Leigh |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Fri Aug 14, 2009 3:43 am |
|
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 http://validator.w3.org/ or the tidy html validator addon for firefox. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 14, 2009 2:36 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
Site Admin
![](modules/Forums/images/avatars/502a2d1345d88a86ddb4a.png)
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Sat Aug 15, 2009 10:36 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Aug 15, 2009 8:39 pm |
|
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 It works fine in my stand alone ZenCart and Classifieds area of the site. It only throws an error in the RN pages ![Confused](modules/Forums/images/smiles/icon_confused.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 16, 2009 4:32 am |
|
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.
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... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 16, 2009 9:21 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 16, 2009 10:10 am |
|
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
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](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 16, 2009 4:28 pm |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 16, 2009 5:23 pm |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 5:01 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 10:09 am |
|
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
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
I'm also getting this in my log file:
PHP Parse error: syntax error, unexpected '<' |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 1:03 pm |
|
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? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 5:40 pm |
|
Anyone? ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 6:47 pm |
|
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";
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Aug 17, 2009 7:48 pm |
|
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 ';' |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 18, 2009 3:04 pm |
|
rickleigh wrote: |
This corrected the error and has let the tracking script work like it should
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
I'm also getting this in my log file:
PHP Parse error: syntax error, unexpected '<' |
Still looking for help on this please;) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wHiTeHaT
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 18, 2004
Posts: 579
|
Posted:
Tue Aug 18, 2009 3:38 pm |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 18, 2009 4:34 pm |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 18, 2009 7:21 pm |
|
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 ) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
evaders99
Former Moderator in Good Standing
![](modules/Forums/images/avatars/803d73f6452557b947721.jpg)
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Tue Aug 18, 2009 7:24 pm |
|
You don't even need all the echo code then. Just put the original script between ?> and <?php |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 18, 2009 8:18 pm |
|
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 : http://yourhobbycommunity.com/
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.1 Gecko/20081029 Firefox/2.0.0.18 (.NET CLR 3.5.30729)
Redirect Status : 401 | when I have the custom_footer.php active 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 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](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 19, 2009 7:46 am |
|
Dont give up on me now ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wHiTeHaT
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 19, 2009 9:49 am |
|
could you put your full file content in here? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rickleigh
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 19, 2009 10:46 am |
|
wHiTeHaT wrote: | could you put your full file content in here? |
The last post was the full file content
Am I missing something else ![Question](modules/Forums/images/smiles/icon_question.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|