Custom <head> and <body> scripts

Started by ɔɔɔɔɔɔuɥoɾ, August 09, 2010, 12:12:47 PM

Previous topic - Next topic

ɔɔɔɔɔɔuɥoɾ

Link to Mod

This mod will allow you to add any kind of scripts into your <head> section or <body> section of your page, this can be useful when you find a script maybe on dynamic drive website and want to integrate it, this mod makes that easy.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Afro

This is useful. It eliminates some trouble about adding analytics and other external codes to the index.template file.

ɔɔɔɔɔɔuɥoɾ

Yea, it can pretty much be used for anything, not just scripts but any html you need in the head or body section


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

thellie

it doesn't like my forum - it installs without a problem, but once in i can't access admin (blank screen). uninstall and everything is fine again.

i think (pure speculation) that it may conflict with simple portal - i'm going to install it again to replicate the problem and see if i can give you a bit more info...
If you have any support questions, feel free to ask - be safe in the knowledge that I won't help because... I know nothing!

thellie

sorry should have said earlier: SMF 2.0 RC3...

a bit more info...

all other areas visited on the forum are ok. but each page in the admin section is just a blank screen. (sorry i can't print off a screenshot for some reason...)

i'd advise people to take a copy of each of the updated files first, then give it a go - as i said, it may just be an issue with simple portal - it's easy enough to revert back again, as long as no other mods are added in the meantime.
If you have any support questions, feel free to ask - be safe in the knowledge that I won't help because... I know nothing!

Sabre™

Sounds like a good idea John.
Good work :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ɔɔɔɔɔɔuɥoɾ



SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

imnotron

Would you be able to use this mod to make full page script that would effect the entire forum?

ɔɔɔɔɔɔuɥoɾ

yes, these scripts will effect the entire forum, the head scripts will work with all themes too


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

imnotron

Would you be able to help me use your mod? I already have a script that i want to put on  that will effect all pages?

ɔɔɔɔɔɔuɥoɾ

Quote from: imnotron on September 01, 2010, 08:27:10 AM
Would you be able to help me use your mod? I already have a script that i want to put on  that will effect all pages?

Well, this mod is designed for just that, it alone can help you integrate scripts into your forum, simply copy the code of the script your tying to use into the form on the admin modification area.

Which script are you wanting to use?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

frx

Hello.

Can this mod be used to the google analytics code?

Thanks.

impreza

Portal ToTemat.pl - treści w postaci artykułów i filmów tematycznych.


frx

No one reply to me, but i've tried, and it's working :)

thanks for this mod

Masterd

There's a mod for Google Analytics.

http://custom.simplemachines.org/mods/index.php?mod=2210

However, on my forum I added Google Analytics Code without that mod. 

victor60

Quote from: ɔɔɔɔɔɔuɥoɾ on August 09, 2010, 12:12:47 PM
Link to Mod

This mod will allow you to add any kind of scripts into your <head> section or <body> section of your page, this can be useful when you find a script maybe on dynamic drive website and want to integrate it, this mod makes that easy.

I discovered that in Preview of the Post (in SMF 2.0 Final) the script inserted in the <head> or <body> or both does not load. Is there any way around?


I thought that I managed to hack SMF 2.0 (including betas) when I inserted line on line 3309 in Subs.php


  // ]]></script>';
echo "<script type='text/javascript' src='/mathjax/MathJax.js?config=default'></script>";
        if (!isset($context['page_title']))


However it appears that while everything works in Webkit-based browsers (Safari, Chrome, Omniweb) Firefox and Opera hang on Post Preview.

Thank you in advance

Victor

pushkardua

i installed a wrong sritp which file does it edit so that i can remove that manually

Matthew K.

If you're asking where the scripts are added to, check {db_prefix}settings in your database using phpMyAdmin

pushkardua

i typed a  chat bar script and now only forum background is showing up... Is there any way i can remove it manually? :(

Advertisement: