Jump to content

adding text to header.tpl when installing a module


bartman
 Share

Recommended Posts

what i need to do is alter header.tpl and add the following to the html tag when i install a module and obviously remove it when the module is uninstalled

xmlns:og="http://opengraphprotocol.org/schema/"
     xmlns:fb="http://www.facebook.com/2008/fbml"



I know i can open the file for reading loop through it looking for certain text then replace it with the corrected text, but is their an easier way

the hook in header.tpl is not in the correct place to achieve what i need to do,



thanks


Chris

Share this post


Link to post
Share on other sites

I have it hardcoded at the moment, can a module create a new hook, obviously it can create the db, but i would be in the same situation of writing the hook location to a file, maybe i am trying to do to much with a module, but I am trying to make it totally standalone without having to edit any files manually

regards



Chris

Share this post


Link to post
Share on other sites

Creating a new hook requires 4 things:

Adding it to the hooks database.
Adding a call to it in the php file.
Adding the variable in the tpl file.
Transplanting it in the backoffice.

Since you only need 2 lines that are static, hard coding would make most sense

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More