Forum

Notifications
Clear all

Adding Javascript to header.php

Nyanko
(@nyanko)
Eminent Member

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

Quote
Topic starter Posted : 24/10/2011 12:45 am
Nyanko
(@nyanko)
Eminent Member

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

ReplyQuote
Topic starter Posted : 24/10/2011 5:24 pm
calash
(@calash)
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

ReplyQuote
Posted : 25/10/2011 2:22 pm
Nyanko
(@nyanko)
Eminent Member

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

ReplyQuote
Topic starter Posted : 26/10/2011 1:15 am
babaca
(@babaca)
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

ReplyQuote
Posted : 26/10/2011 1:40 am
Nyanko
(@nyanko)
Eminent Member

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

ReplyQuote
Topic starter Posted : 27/10/2011 12:07 am
Share: