Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript
Author Message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Wed Aug 19, 2009 11:10 am Reply with quote

Then this should work:

Code:


<?php
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
}
?>


A php file starts with <?php and ends with ?>
Before the start tag or closing tag it is allowed to use html.

You can also use plain html between a close/start tag , as we do now.
This should do the trick for you.
 
View user's profile Send private message Send e-mail
rickleigh
Worker
Worker



Joined: Jan 06, 2009
Posts: 183

PostPosted: Wed Aug 19, 2009 1:38 pm Reply with quote

wHiTeHaT wrote:
Then this should work:

A php file starts with <?php and ends with ?>
Before the start tag or closing tag it is allowed to use html.

You can also use plain html between a close/start tag , as we do now.
This should do the trick for you.


I wish I could say this worked right but it didn't. Placing the code how you provided dosn't allow the tracking script to work. But when I take out the ?> & <?php above and below the script the tracking works as it should but then gives the syntax error, unexpected '<' again in my error log.

I'm going to post below this one all the info I have on this setup. Maybe that will help everyone that is trying to help me out. Thanks to everyone that has been tryng. It means a lot to me Wink

_________________
Thanks,
Rick Leigh 
View user's profile Send private message
rickleigh







PostPosted: Wed Aug 19, 2009 1:53 pm Reply with quote

Ok this was a pretty straight forward setup. I'm trying to use the FREE LiveZilla.com system on my RN2.3 site.

Basically it is like a standalone system/server that runs in its own DIR. in your root. After you upload the files to your root/database, your able to copy this java 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 -->
to your site that will allow you to track the visitors on each page of your site. Could someone please test this on your test site and see if everything works for you?

When trying to place the code in the site using the blocks, footer, or any other area I can think of that would track all pages it doesn’t work Sad


Last edited by rickleigh on Wed Aug 19, 2009 2:02 pm; edited 1 time in total 
wHiTeHaT







PostPosted: Wed Aug 19, 2009 1:59 pm Reply with quote

Code:
<?php

echo "<!-- http://www.LiveZilla.net Chat Button Link Code --><!-- http://www.LiveZilla.net Tracking Code --><div id=\"livezilla_tracking\" style=\"display:none\"></div><script language=\"JavaScript\" type=\"text/javascript\">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>"

?>


If this doesnt work... then i dont now it anymore.( if i woulndt test it myself)
 
rickleigh







PostPosted: Wed Aug 19, 2009 3:16 pm Reply with quote

Nope Sad still no go! Thanks for trying. Anyone else want to give it a go? It might be faster if someone was willing to call me to talk through it. PM me for # Or I can call you Wink
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Aug 22, 2009 8:42 am Reply with quote

Try this:

Code:


echo <<<EOD
<!-- http://www.LiveZilla.net Chat Button Link Code --><!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">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>
EOD;

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
rickleigh







PostPosted: Sat Aug 22, 2009 9:26 pm Reply with quote

Montego,

That worked other then I'm getting this in log:Parse error: syntax error, unexpected T_SL in /custom_files/custom_footer.php on line 2

Here is my file:
Code:
<?php

echo <<<EOD
<!-- http://www.LiveZilla.net Tracking Code --><div id="livezilla_tracking" style="display:none"></div><script language="JavaScript" type="text/javascript">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>
EOD;
?>
 
montego







PostPosted: Sun Aug 23, 2009 6:35 pm Reply with quote

Check to make sure you do not have any whitespace characters after the EOD or EOD;
 
rickleigh







PostPosted: Sun Aug 23, 2009 7:58 pm Reply with quote

montego wrote:
Check to make sure you do not have any whitespace characters after the EOD or EOD;


Yeah, I had nothing.. Why do you think this Java script is having so much problems in RN? I have never had any issues with any other Java code. All I know is that this Java script is trying to communicate with the server.php file in my /livezilla Dir. What the heck would make this be such a big issue in RN's core coding?

Could it be NS or file permissions? Or how the root dir is setup in RN?

I just can't figure out what the heck is making this such a pain Evil or Very Mad

I still can't get into my admin area when I have this custom_footer.php file active either.
 
spasticdonkey
RavenNuke(tm) Development Team



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

PostPosted: Tue Aug 25, 2009 4:40 am Reply with quote

i can pretty much guarantee you this is not an RN problem. You must fix the major errors in your page first. The <body> <html> and </html> tags have all been used twice. This will break most any JS that requires the page to finish loading correctly. It looks like these extra tags were added in when you customized the header for your site. Look for:
Code:
<html>

<body bgcolor=#FFFFFF onload="preloadImages();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><script language="javascript" src="themes/ClanMtS/liveclock.js"></script>

<TABLE width=100% border=0 CELLPADDING=0 CELLSPACING=0 bgcolor=#3c3c3c>

   <TR>

      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=25 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=7 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=78 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=78 height=1></TD>
      <TD>

         <img src="themes/ClanMtS/images/header/spacer.gif" width=78 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=78 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=17 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=61 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=31 height=1></TD>

      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=5 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=287 height=1></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=25 height=1></TD>
      <TD></TD>
   </TR>
   <TR>

      <TD ROWSPAN=8>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_01.gif" width=25 height=235></TD>
      <TD ROWSPAN=8>
         <img NAME="ClanMts_hd_02" src="themes/ClanMtS/images/header/ClanMts-hd_02.gif" width=7 height=235></TD>
      <TD COLSPAN=7>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_03.gif" width=421 height=21></TD>
      <TD ROWSPAN=8 background="themes/ClanMtS/images/header/ClanMts-hd_mid.gif" width=100% height=235></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_05.gif" width=287 height=21></TD>

      <TD ROWSPAN=8>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_06.gif" width=25 height=235></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=21></TD>
   </TR>
   <TR>
      <TD COLSPAN=7>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_title.gif" width=421 height=45></TD>
      <TD ROWSPAN=2 align=right background="themes/ClanMtS/images/header/ClanMts-hd_search.gif" width=287 height=50><form action="modules.php?op=modload&amp;name=Search&amp;file=index" method="post"><input type="text" name="query" value style="width:140;height:20;FONT-SIZE: 10px;">&nbsp;<input type="image" value="search" src="themes/ClanMtS/images/header/go.gif" border="0">&nbsp;</TD></form>

      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=45></TD>
   </TR>
   <TR>
      <TD COLSPAN=7 ROWSPAN=2>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_09.gif" width=421 height=11></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=5></TD>
   </TR>

   <TR>
      <TD ROWSPAN=3 align=right background="themes/ClanMtS/images/header/ClanMts-hd_time.gif" width=287 height=28><script language="javascript"><!--
new LiveClock('verdana','1','#CCCCCC','#','<b>Time:','</b>','174','1','1','0','2','null');
//--></script>&nbsp;</TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=6></TD>
   </TR>
   <TR>
      <TD>
         <A HREF="index.php"
            ONMOUSEOVER="changeImages('ClanMts_hd_02', 'themes/ClanMtS/images/header/ClanMts-hd_02-ClanMts-hd_11.gif', 'ClanMts_hd_11', 'themes/ClanMtS/images/header/ClanMts-hd_11-over.gif', 'ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12-ClanMts-hd_11.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_11.gif');
return true;"
            ONMOUSEOUT="changeImages('ClanMts_hd_02', 'themes/ClanMtS/images/header/ClanMts-hd_02.gif', 'ClanMts_hd_11', 'themes/ClanMtS/images/header/ClanMts-hd_11.gif', 'ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17.gif'); return true;">

            <img NAME="ClanMts_hd_11" src="themes/ClanMtS/images/header/ClanMts-hd_11.gif" width=78 height=13 border=0 ALT="home"></A></TD>
      <TD>
         <A HREF="forums.html"
            ONMOUSEOVER="changeImages('ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12-over.gif', 'ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13-ClanMts-hd_12.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_12.gif'); return true;"
            ONMOUSEOUT="changeImages('ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12.gif', 'ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17.gif'); return true;">
            <img NAME="ClanMts_hd_12" src="themes/ClanMtS/images/header/ClanMts-hd_12.gif" width=78 height=13 border=0 ALT="Forums"></A></TD>
      <TD>
         <A HREF="account.html"
            ONMOUSEOVER="changeImages('ClanMts_hd_02', 'themes/ClanMtS/images/header/ClanMts-hd_02-ClanMts-hd_13.gif', 'ClanMts_hd_11', 'themes/ClanMtS/images/header/ClanMts-hd_11-ClanMts-hd_13.gif', 'ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12-ClanMts-hd_13.gif', 'ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13-over.gif',
'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_13.gif'); return true;"
            ONMOUSEOUT="changeImages('ClanMts_hd_02', 'themes/ClanMtS/images/header/ClanMts-hd_02.gif', 'ClanMts_hd_11', 'themes/ClanMtS/images/header/ClanMts-hd_11.gif', 'ClanMts_hd_12', 'themes/ClanMtS/images/header/ClanMts-hd_12.gif', 'ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17.gif');
return true;">
            <img NAME="ClanMts_hd_13" src="themes/ClanMtS/images/header/ClanMts-hd_13.gif" width=78 height=13 border=0 ALT="Account"></A></TD>
      <TD>
         <A HREF="downloads.html"
            ONMOUSEOVER="changeImages('ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13-ClanMts-hd_14.gif', 'ClanMts_hd_14', 'themes/ClanMtS/images/header/ClanMts-hd_14-over.gif', 'ClanMts_hd_15', 'themes/ClanMtS/images/header/ClanMts-hd_15-ClanMts-hd_14.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_14.gif');
return true;"
            ONMOUSEOUT="changeImages('ClanMts_hd_13', 'themes/ClanMtS/images/header/ClanMts-hd_13.gif', 'ClanMts_hd_14', 'themes/ClanMtS/images/header/ClanMts-hd_14.gif', 'ClanMts_hd_15', 'themes/ClanMtS/images/header/ClanMts-hd_15.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17.gif'); return true;">

            <img NAME="ClanMts_hd_14" src="themes/ClanMtS/images/header/ClanMts-hd_14.gif" width=78 height=13 border=0 ALT="Downloads"></A></TD>
      <TD COLSPAN=2>
         <A HREF="links.html"
            ONMOUSEOVER="changeImages('ClanMts_hd_15', 'themes/ClanMtS/images/header/ClanMts-hd_15-over.gif', 'ClanMts_hd_16', 'themes/ClanMtS/images/header/ClanMts-hd_16-ClanMts-hd_15.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17-ClanMts-hd_15.gif'); return true;"
            ONMOUSEOUT="changeImages('ClanMts_hd_15', 'themes/ClanMtS/images/header/ClanMts-hd_15.gif', 'ClanMts_hd_16', 'themes/ClanMtS/images/header/ClanMts-hd_16.gif', 'ClanMts_hd_17', 'themes/ClanMtS/images/header/ClanMts-hd_17.gif'); return true;">
            <img NAME="ClanMts_hd_15" src="themes/ClanMtS/images/header/ClanMts-hd_15.gif" width=78 height=13 border=0 ALT="Links"></A></TD>
      <TD>
         <img NAME="ClanMts_hd_16" src="themes/ClanMtS/images/header/ClanMts-hd_16.gif" width=31 height=13></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=13></TD>
   </TR>

   <TR>
      <TD COLSPAN=7>
         <img NAME="ClanMts_hd_17" src="themes/ClanMtS/images/header/ClanMts-hd_17.gif" width=421 height=9></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=9></TD>
   </TR>
   <TR>
      <TD COLSPAN=7>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_logo.gif" width=421 height=104></TD>

      <TD>
         <img src="themes/ClanMtS/images/header/ClanMts-hd_19.gif" width=287 height=104></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=104></TD>
   </TR>
   <TR>
      <TD COLSPAN=5 background="themes/ClanMtS/images/header/ClanMts-hd_u.gif" width=329 height=32><form action="account.html" method="post"><input type="text" name="username" value style="width:100;height:19;FONT-SIZE: 10px;"><font size="1" face="arial">&nbsp;<b>User</b>&nbsp;<input type="password" name="user_password" value style="width:100;height:19;FONT-SIZE: 10px;">&nbsp;<b>Pass</b></TD><TD COLSPAN=2 align=left background="themes/ClanMtS/images/header/ClanMts-hd_u2.gif" WIDTH=92 HEIGHT=32><input type="hidden" name="random_num" value="426257"><input type="hidden" name="gfx_check" value="262719"><input type="hidden" name="op" value="login"><input type="image" value="login" src="themes/ClanMtS/images/header/go.gif" border="0"></TD></form></font>

      <TD align=right background="themes/ClanMtS/images/header/ClanMts-hd_uname.gif" width=287 height=32><font face=arial size=2 color=#CCCCCC><b>Welcome &nbsp;Guest&nbsp;&nbsp;|&nbsp;&nbsp;<a href="account-new_user.html">Register</a>
</b>&nbsp;</font></TD>
      <TD>
         <img src="themes/ClanMtS/images/header/spacer.gif" width=1 height=32></TD>
   </TR>
</TABLE>

</html>

that is your offender. the use of body onload is frowned upon btw (but if you have to have it you need to edit your theme.php, whenever the one-and-only body tag is generated), and has been known to cause issues with other JS scripts
 
View user's profile Send private message Visit poster's website
rickleigh







PostPosted: Tue Aug 25, 2009 8:57 am Reply with quote

Well crap! Basically all I did was add some images to this theme. It sounds like I picked a bad one to uses. I'm going to have to do some learning to get it all cleaned up it sounds like Sad I'm not sure way they would have doubled them up like that.

The only thing I dont understand is I tested this java in the same them used here on RN and it wasn't working either.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©