James Stephens

January 12, 2006

Using Adsense With Linpha

Filed under: Adsense, Photography — James Stephens @ 1:07 pm

This post explains how to add Google Adsense ads to Linpha.

The Linpha PHP Photo Archive is a great piece of software for publishing images to the web, but there seems to be no straightforward way to add Google Adsense ads to Linpha. With some playing around I managed to work out how to add an image bar to the top of all pages:

Within the Linpha file structure create the file include/adsense.php that looks something like like this:

Now add an include for adsense.php in the file header.php below the include for session.php. Here’s what the relevant piece from header.php should look like when you are done:

include_once(TOP_DIR.'/include/session.php');
include_once(TOP_DIR.'/include/adsense.php');

That’s it …. ads will now appear at at the top of each page in Linpha.

By the way, this idea works just as well for Yahoo ads or Amazon Associates.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress