Where do I stick this footer code?

Started by trekkie2444, August 28, 2010, 05:13:03 PM

Previous topic - Next topic

trekkie2444

I used to be able to do this with SMF 1.1, but in SMF 2.0 I keep reading that it has to go somewhere else, but can't figure out exactly where. It's a revenue driving script.

IceXaos

Open Themes/*/index_template.php
Find "_below()"
Inside that function is your footer.

Hope that's what ya needed.

trekkie2444

I keep getting a parse error when I put it in there. Here's the script:

<script language="JavaScript" type="text/javascript" src="http://http.cdnlayer.com/drivingrevenue/dRev.js"></script>
<script language="JavaScript" type="text/javascript" >
var DR_id = '1068';
DrivingRevenue();
</script>

IceXaos

It's in PHP, so you'll need to echo any html.

echo'
<script language="JavaScript" type="text/javascript" src="http://http.cdnlayer.com/drivingrevenue/dRev.js"></script>
<script language="JavaScript" type="text/javascript" >
var DR_id = '1068';
DrivingRevenue();
</script>';

trekkie2444

Template Parse Error!

There was a problem loading the /Themes/Analysis203/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_LNUMBER, expecting ',' or ';'

IceXaos

Sorry, didn't check your code before I posted.  Inside the echo, you will need to either use " or \' instead of ' for values.  A regular ' will cause it to end the echo, then you will get errors.

Advertisement: