News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How do I add a script in the header tag?

Started by TeaTephi, January 22, 2011, 10:18:17 AM

Previous topic - Next topic

TeaTephi

I want to add this script:
<script src="http://www.blueletterbible.org/scripts/blbToolTip/BLB_ScriptTagger-min.js" type="text/javascript"></script>

<script type="text/javascript">

BLB.Tagger.Translation = 'NKJV';

BLB.Tagger.HyperLinks = 'all'; // 'all', 'none', 'hover'

BLB.Tagger.HideVersions = false;

BLB.Tagger.TargetNewWindow = true;

BLB.Tagger.Style = 'par'; // 'line' or 'par'

</script>



from http://www.blueletterbible.org/freeoffer/BLB_ScriptTagger/

directions from the website:

Quote from: from http://www.blueletterbible.org/freeoffer/BLB_ScriptTagger/ Copy the following lines of code into the <head> tag or footer of your webpage. If you use an include or template for your website, insert these lines of code into that template.

Which php file would I add this to so that, whenever someone types a Bible reference, it will access this script and show the pop up window?

Thanks!
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

SlammedDime

Themes/[your theme]/index.template.php (or if you don't use a custom theme, choose the default folder)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

TeaTephi

I got a parse error

The file you tried to save generated the following error:
Parse error: syntax error, unexpected '<' in index.template.php on line 81

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title_html_safe'], '" />
   <meta name="keywords" content="', $context['meta_keywords'], '" />
   <title>', $context['page_title_html_safe'], '</title>';
<script src="http://www.blueletterbible.org/scripts/blbToolTip/BLB_ScriptTagger-min.js" type="text/javascript"></script>

<script type="text/javascript">

BLB.Tagger.Translation = 'NKJV';

BLB.Tagger.HyperLinks = 'all'; // 'all', 'none', 'hover'

BLB.Tagger.HideVersions = false;

BLB.Tagger.TargetNewWindow = true;

BLB.Tagger.Style = 'par'; // 'line' or 'par'

</script>
   // Please don't index these Mr Robot.
   if (!empty($context['robot_no_index']))
      echo '
   <meta name="robots" content="noindex" />';

   // Present a canonical url for search engines to prevent duplicate content in their indices.
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

kat

#3
IMMEDIATELY after the head tag?

Although, I just tried that script on my site and it hates it, for some reason...

TeaTephi

I tried that and got this:

The file you tried to save generated the following error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in index.template.php on line 80
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

TeaTephi

here is my index.template.php can anyone help me ?  every time I try to add it I get a parse error.  I've tried adding this code:


echo 'my_html_code_here';

echo '

SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Matthew K.

Seriously?

Topic Starter - Attach your ./Sources/Load.php and I'll add it for you.
Quote from: SlammedDime on January 22, 2011, 10:45:24 AM
Themes/[your theme]/index.template.php (or if you don't use a custom theme, choose the default folder)

TeaTephi

SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Matthew K.


TeaTephi

Parse error: syntax error, unexpected T_STRING in /home/content/b/i/b/biblevoyages/html/forum/Sources/Load.php on line 1622
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Matthew K.


TeaTephi

Quote from: Labradoodle-360 on January 23, 2011, 11:27:39 PM
Try this one instead...

It worked!  Thanks Labradoodle! Can't wait to see it in action.
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

TeaTephi

#12
Hey Labradoodle I tried to edit it to 'KJV'  instead of 'NKJV'  and I got an error and so I put it back the way you had it.  Honestly, didn't think I could mess it up by changing one letter, but can you correct it for me again?  Thanks, I should have told you that to begin with Sorry!
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Matthew K.

The value has to be inside \'\'. Example: \'value\'

TeaTephi

Oh ok, I tried a second time, and it works now!  whew!  Thanks again.
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Matthew K.


Advertisement: