Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Category Page Sponsorship - Yahoo Templates

Quote Reply
Category Page Sponsorship - Yahoo Templates
I'm using the Yahoo templates on my site and would like to make use of the 'yellow' space on the top right-hand side of the category and subcategory pages. It is kind of similar in concept to Google's AdWords program which is strictly a text-based program. I would manually edit these inidividual pages.

My question is how do I get the text edits to stay on the category page templates after I do a 'Build All'? Everytime I do a 'Build All' it erase any text I placed in the 'yellow space' on the template.

Thanks in advance.


Mark G.
OhioBiz

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
mgeyman,

If you're manually editing the category pages (I'm assuming you are), when you do a re-build, Links will re-build each of the category pages and overwrite any manual changes you have made.

There are two ways you could approach this:

1) Manual Updates

Using this method you'd create a field to contain the text-link and manually add/edit/remove the content through the Links Admin panel, for each and every category:

• Add a new field to your category table, maybe something like 'AdText'
• Add a 'placeholder' for the contents of this new field to your category.html template, maybe <%textforad%>
• Edit nph-build.cgi to pass the contents of the new field (AdText) to your template (<%textforad%>) when it rebuilds the category pages.

This will allow you to add whatever content you want to each and every category and when the pages are rebuilt, the contents of the new field will be added to the output via the template and become a part of the physical HTML page.

The main advantage of this method is control. You get to specific each text-ad for every single category, which allows for very specific targeting.

The main disadvantage to using this method is that once you start adding a lot of categories, the management of these text-ads will become quite time consuming.


2) SSI Inserted (if your host allows it?)

For this you'd probably be better off using an existing ad-serving script.

Within the ad-server you'd define your text-ads. Using the required method advised by your ad-server script, you'd then place a bit of HTML on your category template to 'call' an ad onto the page. (You can go deeper into this by creating zones/regions that the ads will be targeted to, but I won't complicate it too much for now!)

The main advantage to this method is that you don't have to edit each individual category if you want to change one of your text-ads. You simply update the record in the ad-server, and when the ad is next 'called' the modified version will be served.

The main disadvantage is that it is not as specific as manually placing text-ads on each individual category page, and it will most likely use a bit more of your server resources to 'push' the ads into place.


Hope this helps.

All the best
Shaun

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Shaun,

Thanks for the info. It is greatly appreciated.

Happy holidays!


Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Shaun,

I did take a look at this, but not being a programmer, you lost me when you got to the nph-build.cgi step. I'm not sure what code would need to be included where??

Thanks.


Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Look for $OUT{category_id} = $category_r->{'ID'};.

Add $OUT{adverts} = $category_r->{'ADText'};.

Change ADText to whatever you have named the advertisement field.

Then simply add:

Code:

<%if adverts%>
<%adverts%>
<%endif%>


in the category.html file.

Regards,

Eliot Lee
Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
I followed your directions and the previous person's (steps 1 & 2) but when I do a "Build All", it wipes out any text I typed in on the category page. Where am I suppose to be typing in the text ad for a particular subcategory page? On the Yahoo template, I'm trying to put the text where the yellow box is in the upper right-hand corner of the page is located.

Thanks in advance.

Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
In Reply To:
Where am I suppose to be typing in the text ad for a particular subcategory page?
Did you ADD a field called ADText or something like that in the Category table. If not, then that is your problem.

You need to add text for the ADs in the ADText field in the Category table via the admin.cgi script.

Regards,

Eliot Lee
Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
OK, let's have a look at adding the new field in more detail:

1) Go to your Links SQL admin
2) In the left control panel, look for Table Maintenance (down near the bottom)
3) Click on Category (calls up the specs for the Category table)
4) Click on Add a new Field
5) Now add the following:

Column: AdText
Type: CHAR
Form Length: 0
Max Length: 500 (or whatever you consider would be the longest string of text to make-up an ad)
Not Null: No (you'd want to allow for blank entries, or empty category ad spaces)
Default Value: Leave Blank
Validation: Leave Blank
Index Weight: Leave Blank

Once you've added the new field it should be applied to all your current category table records, so now you'll need to put some ad-text links into your categories:

Again, look in the left nav-panel for the heading Categories (a couple of sections above the table maint.):

1) Click on Modify
2) Search for a 'known' category and bring it up on-screen to be modified
3) You should see the new 'AdText' field at the bottom of the form
4) Place your cursor in the input box and type/paste the text/HTML for your advert, or whatever you want placed on the page
5) Click modify

Now follow Eliot's previous advice on how to insert the 'AdText' field into your output.

Hope this helps Smile

All the best
Shaun

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Eliot,

I got it working properly!

Thanks for your help and have a nice holiday season!

Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Shaun,

Thanks so much for you help, too! I got it working.

Have a great holiday season!

Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
Eliot and Shaun,

One more question, is it possible to do something like this with the search results pages? If so, I'd assume it would take a lot more customized programming???

Thanks.

Mark G.

Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
In Reply To:
One more question, is it possible to do something like this with the search results pages? If so, I'd assume it would take a lot more customized programming???
This could be possible. However, it would take a lot of custom programming to get it to work.

Regards,

Eliot Lee
Quote Reply
Re: Category Page Sponsorship - Yahoo Templates In reply to
For the search results, you'd need to 'call' something to the page since the results are dynamically generated each time, as opposed to the category pages which are 'fixed' HTML files.

There are a variety of applications you could use for this (ideally you'd want to use SSI to insert the ad-text), try looking http://cgi.resourceindex.com/...Perl/Advertisements/ at CGI-Resources.com.

All the best
Shaun