Nov

11

This article will show you how to change the adverts on the sidebar on Gallery2 depending on category. So you could have Adsense running on one category and the Amazon Affiliate Widget on another. We’ve developed a method to do all this. Read on if you want to start making money from Gallery2.

We’ve been working on our new anime screen shot gallery, pure anime gallery, which is based on the very latest Gallery2 script. During construction we began to think about how we could add advertising around the site. Adsense is always one option. But we wanted to sell the Anime DVDs from Amazon in the sidebar so that the ‘Death Note Gallery’ would show Death Note DVDs and the Ergo Proxy Gallery would show the Ergo DVDs.

Obviously including the Amazon Widget code in the sidebar would be the first step, but that means you could be looking at Ergo Proxy screenshots and seeing a buying opporunity for Death Note. This is a waste of time and surfers won’t bother using it. I wanted to make it targetted!

A quick intro to Gallery2 and how to change the way it looks.
Gallery2 uses a templating system, called Smarty, which works on .tpl files. Using the .tpl makes editing the look and functionality of Gallery2 much easier than 10,000 pages of code.

How’s it work in real life?

Have a look at our site : If you move into the Death Note Gallery -> Death Note Gallery Adsense will display on the sidebar within this gallery. Now, we wanted to test other forms of advertising so we added the Amazon Widget. !! So we’ve modded the Gallery2 code to chase down the category and be able to display different ads on different categories. Ergo Proxy Gallery -> Ergo Proxy Gallery on the other hand shows the Amazon widget, and Adsense is omitted.

The advertising stays put now matter how far you move deeper into that category.

How cool is that?

Now - down to the code ….

1) Go into your gallery template and find the sidebar.tpl - BACK THIS UP somewhere.

2) First in the same directory of sidebar.tpl make a directory called ” local ” if you haven’t already.

3) Copy the sidebar.tpl in this “local” directory

4) We’ll need to work on the code for sidebar.tpl. Here’s typically what it looks like in standard form:

Gallery2 SEO

What we are going to do is add a bit of code to detect which category we are on and which ad to show

Here is the code:

Gallery2 SEO - sidebartpl

With this fully integrated we get:

Gallery2 SEO - sidebartpl2

What this does is it looks at the title of the category and if it is “Ergo Proxy Gallery” then it runs the Amazon Widget. If the category is ‘Death Note Gallery’ then it executes to Adsense script.

At the moment it will only operate on top level categories and when a surfer looks at a photo ads won’t display. Have no fear, shortly, we’ll be showing you how to drill the ads into the sublevels of gallery2. Come back in a day or two and we’ll have the rest written up by then.

Make your Gallery2 earn, using the ads you want!

If you want to ask us questions then find us at the PRO SEO FORUMS and fire at us a question. To join is free!

Tags:, ,

Popularity: 23%


Comments

Name (required)

Email (required)

Website

Speak your mind

Close
E-mail It