Customizing SMF > SMF Coding Discussion
Writing a mod to modify the head/body/document?
Flynnn:
Is it possible to write a mod which, regardless of the theme used, can insert arbitrary HTML somewhere between the <html>, <body> or <head> tags of every page? I don't really care where it goes, I am just trying to insert a stat counter, but I would like the mod to be independent of the theme if possible. Can I do something with $context?
I am using smf version 2.0
EDIT:
I goofed and di not read the "READ THIS FIRST"
I am now updating this post with all the information.
Arantor:
To do what exactly?
Instead of focussing on how you want to do some, concentrate on what it is you want to do. There are already methods in SMF for doing some of those things easily, and all can be accomplished without even editing the theme files - depending on what you're trying to do. But I'm not a mind reader.
Flynnn:
Very sorry -- I would have deleted this post until I could add the needed information, but that was unfortunately now allowed :(
I'd like to insert a statcounter -- Just some HTML that doesn't actually modify the appearance of anything, but is present in all webpages
Arantor:
Well, it depends on the stat counter... how exactly does it work?
Why do you need to add a stat counter when SMF can already do that itself without any changes (just it's off by default for performance)?
Flynnn:
I would prefer to use the http://statcounter.com statcounter -- It's just a JS embed that needs to be present in all webpages.
That's al lI want, I'd like to add some arbitrary html which is present in all webpages, and does not rely on modifications to the theme.
Is this not possible?
Navigation
[0] Message Index
[#] Next page
Go to full version