sandman
11-14-2005, 07:06 PM
I was hoping to stuff an add block between the 1st and second news blocks on the main page, much like the hack to add a section between the first and second postbit. I looked at it and it seems that the post bit works as the template is called over and over as long as there is posts. There you can test for the post number and stuff the ad if its called for. In the news block its just a variable in the template with the actual building taking place in news.php. I looked at that file and found the loop that calls the news forum database location untill the max news count is set. I figure here would be the place to insert the ad code. Also here is where my coding skills end.
Could I add a new $getnews in an if statment in the loop that tests for the loop count right after the database query for the same variable?
Basically the add would become part of the first news bit that was queried.
Maybe something like...(Added right before the while loop that contains "$newscount++;"
if ($newscount == 0){$getnews = 'Add code or text here';}
Would this push the data I want onto the stack?
Let me know if I'm on track or not.
Thanks!
Could I add a new $getnews in an if statment in the loop that tests for the loop count right after the database query for the same variable?
Basically the add would become part of the first news bit that was queried.
Maybe something like...(Added right before the while loop that contains "$newscount++;"
if ($newscount == 0){$getnews = 'Add code or text here';}
Would this push the data I want onto the stack?
Let me know if I'm on track or not.
Thanks!