Where do I put this?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
yngexec
Regular
Posts: 17
Joined: Sun Dec 26, 2004 1:08 pm
Location: Cleveland
Contact:

Where do I put this?

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Where do I put this?

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply