is there a good way to add the sort of tracking code like google analytics and similar? I know there's a module specifically for analytics but I've some other tracking code so I was looking for a generic way to add it. If it's just a case of editing the template which template is it exactly?
Posts: 304
http://codex.gallery2.org/Gallery3:Modules:custom_header
http://codex.gallery2.org/Gallery3:Modules:code_block
Posts: 7
thanks, that looks just what I needed. I had seen code_block already but it wasn't quite what I wanted.
custom_header looks exactly the right thing but unfortunately it doesn't seem to work as described. For example this :
[script type:\"text/javascript\" src:\"/slimstat/?js\"][/script]
gets rendered as
<script type:\"text/javascript\" src:\"/slimstat/?js\"></script>
and if you do try to save it as :
[script type:"text/javascript" src:"/slimstat/?js"][/script]
then the quotes just get escaped again. So there's some hookiness between mysql_real_escape_string and addslashes etc
Posts: 16504
Just edit your theme's page.html.php file. You can put straight HTML code in there
http://codex.gallery2.org/Gallery3:Tutorials:Themes
So much easier than loading and relying on a custom module that may or may not work on a future upgrade, especially while G3 is still in development. Where if your theme stops working on a future upgrade, simply switch to the default, wind, theme and reapply your changes.
BTW, you may also want to install the purifier module if you haven't done so already. Without that, yes, anything that looks like HTML gets sanitized.
http://codex.gallery2.org/Gallery3:Modules:purifier
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 304
@SwissMountainLeader: I've added a stripslashes command to the output, see if that helps.
@nivekiam: This module doesn't need the purifier, it bypasses it.
And theme pages are updated once in a while, too, making changes hard to track.
Posts: 27300
http://codex.gallery2.org/Gallery3:Modules:google_analytics
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7
seriously? could you not read at least the first sentence before replying?
Posts: 27300
Perhaps you go adapt this module to the way you desire? But perhaps you don't want to or did not mention that you can't or won't.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team