Page 1 of 1
Where do I put this?
Posted: Fri Jan 14, 2005 7:08 am
by yngexec
I want to install a visitor tracking system on my site, and it's all installed, but I need to put a php include on the pages i want tracked....all of them
What file in Serendipity would I be able to put this in so it would automatically generate all pages with the code inside?
Re: Where do I put this?
Posted: Fri Jan 14, 2005 10:48 am
by garvinhicking
The best file for this would in 0.7.1 be the 'serendipity_genpage.inc.php' file. In 0.8 this is the 'include/genpage.inc.php' page.
Or you put it inside your templates directory 'layout.php' file.
Regards,
Garvin
Posted: Fri Jan 14, 2005 10:43 pm
by Guest
thx a ton! Now if i use the layout.php page, does it matter which theme folder it's in? the theme i'm using now doesnt have a layout.php, so I'm assuming i should use the one in "Default"
thx again!
Posted: Sat Jan 15, 2005 3:22 pm
by garvinhicking
Yes, right. If no layout.php is in your folder, Serendipity uses the templates/default/layout.php. You can copy that file over to templates/yourtemplate/layout.php and there make the adjustments.
Be warned that in 0.8 this will lead to an "old way compatibility" mode. There the proper way to do what you want is to create a file templates/yourtemplate/config.inc.php where you can make the tracking stuff. So remember that when you'll upgrade to 0.8.
Regards,
Garvin