Notifications
Clear all

Adding Javascript to header.php

6 Posts
3 Users
0 Reactions
1,851 Views
(@nyanko)
Posts: 28
Eminent Member
Topic starter
 

Currently running efiction 3.5.2

This is probably insanly simple but I can't get the phrasing right !

I'm looking to add a twitter feed service to my site called juitter, here is a site with all the explaination : http://interactive.finelight.com/blog/aggregating-twitter-feeds/

However I can't find where to place the code :


<script type=”text/javascript” src="”js/" jquery-1.3.1.min.js”></script>
<script type=”text/javascript” src="”js/system.js”></script>"
<script type=”text/javascript” src="”js/" jquery.juitter.js”></script>

I'm guessing it's in the header.php around the line : echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."includes/javascript.js"></script>"

But I can't get the wording correct and end up with errors ... please can someone point me in the right direction ?


Now in my 11th fiction filled year !!
SailormoonFiction.com

 
Posted : 23/10/2011 5:45 pm
(@nyanko)
Posts: 28
Eminent Member
Topic starter
 

I tried to add in :


echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."js/jquery-1.3.1.min.js"></script>"
echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."js/javascript.js"></script>"
echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."jquery.juitter.js"></script>"

but I ended up with Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home2/sailormo/public_html/sailormoonfiction/revolution/header.php on line 224

what am I doing wrong !!


Now in my 11th fiction filled year !!
SailormoonFiction.com

 
Posted : 24/10/2011 10:24 am
(@calash)
Posts: 180
Estimable Member
 

It is early here and the coffee has yet to kick in so there may be something else wrong.  However each line needs to end with a ";


The World of Necrotania - Story Writing Community

 
Posted : 25/10/2011 7:22 am
(@nyanko)
Posts: 28
Eminent Member
Topic starter
 

Thank you for your reply  🙂

I tried adding ; to the end of each row and still got error : Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home2/xxxxxx/public_html/sailormoonfiction/revolution/header.php on line 224

I wondered about the ; thing too but noticed that the line echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."includes/javascript.js"></script>"
doesn't end with one  😕


Now in my 11th fiction filled year !!
SailormoonFiction.com

 
Posted : 25/10/2011 6:15 pm
(@babaca)
Posts: 722
Member Moderator
 

Nyanko,

I think Calash meant you needed both the quotation and the semi-colon.


******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3

 
Posted : 25/10/2011 6:40 pm
(@nyanko)
Posts: 28
Eminent Member
Topic starter
 

Ah ok I see  😀

I've updated that and am no longer getting errors... the javascript isn't working but I can tweak from here (I hope)

Many thanks for all of your help xxx


Now in my 11th fiction filled year !!
SailormoonFiction.com

 
Posted : 26/10/2011 5:07 pm
Share: