Web Hosting Talk







View Full Version : Linking to code for a pop over


jamiedolan
02-09-2010, 05:25 PM
Hello;

I'm trying to add in some pop overs on a site that is using Invision Power Board. Some pages I have in php and some in html. The board uses a wrapper and template system. The script I have for a popover, javascript, requires code in the header and body. I can't get the pop over to load, I suspect it is related to how the header is processed with the template system.

I thought of a simple solution, but I am not sure how it is done. Aweber does pop overs and hosts the script, all you have to do is insert 1 line of javascript and that loads the script that loads the pop over. If I could have my pop over script load with just one line of javascript, I could make it work from within the CMS.

Could anyone point me in the right direction for how this is done? I apologize that I can't think of a better way to describe what I am looking for, I hope this makes sense to someone here.

Thanks in advance,

Jamie Dolan

Driver01
02-09-2010, 05:56 PM
IPB has a global header in the admincp 'look and feel' you can edit the templates and add code there.

jamiedolan
02-09-2010, 06:56 PM
IPB has a global header in the admincp 'look and feel' you can edit the templates and add code there.

Thanks. For the part of the Java script that is inserted into the body, when I put that into a php file, do I need to do anything special to insert the JS into the php file? Can JS just be put right into a php file?

Thanks
Jamie

Driver01
02-09-2010, 07:43 PM
No don't touch the php files, all you need to do is add the javascript to the template files, if you want it globally over the whole site then you can add the code to the header wrapper under look and feel in the admincp, this file has the global layout with the header, doctype and body. If you wanted it to just show on single pages like the main forum page then you will have to go into the edit templates and find the template file you require. Don't put the js in any php files you will mess up you forum.

jamiedolan
02-10-2010, 01:54 PM
Thank you for your help.