Putting Ads on forums
I know the first thing you're thinking... Well, why don't you use (insert ad hack/mod here)?
I would, if I didn't have certain conditions that I want for my ads. I think I'm doing this right, but considering my low experience with PHP/MySQL, I figured I'd double check before going ahead with this.
The ads I am inserting are flash buttons specific to each forum on my board. I run a sports forum, so each ad is for each team that has a forum. I can't have it be random, and I already have tools to analyze ad stats for this affiliate. Here's what I'm thinking for a plan of attack:
1] Generate the HTML for each flash button
2] Add a field to the table of forums in the database for the ads (We'll call it forumad for now).
3] Store the HTML for the flash button in forumad.
4] Add forumad to the list of fields retrieved in forumdisplay.php
5] In the FORUMDISPLAY template, add a line $foruminfo[forumad] to retrieve the ad.
If I'm doing this right, this should call the advertisement assigned to the forum in question. Am I doing anything wrong here?
|