RobParker
04-12-2007, 09:29 AM
Hi all,
Hopefully this is possible and simple as it's really important that we manage to get this done.
We have a VB site running vbadvanced as the homepage/news section and then linking to our forums.
We have the header and footer templates modified to put the right hand column down the side of the entire site on every page and use this column for our adverts. The code for the ads themselves are linked through a plugin we've set.
The code looks like this:
<!-- Right Column Code -->
</td>
<td width="120" valign="top" align="left">$advertcode</td>
</tr>
</table>
</td></tr>
</table>
<!-- End Left Column Code -->
The plugin is then:
ob_start();
include('urls/to/site/forums/adverts.php');
$advertcode= ob_get_contents();
ob_end_clean();
And the adverts.php file contains the html/javascript for our adverts.
The problem we have now is that we need to differentiate between our forums pages and our other pages and display different advertising code depending on the two.
What we basically need to do and what I hope is possible is that we can do the following:
<!-- Right Column Code -->
</td>
<td width="120" valign="top" align="left">
IF location = forums ($advertcode)
ELSE ($newadvertcode)
</td>
</tr>
</table>
</td></tr>
</table>
<!-- End Left Column Code -->
And add in some kind of if statement to set the code to a different plugin to display different ads depending on whether you're on the forums or not.
Is this possible at all? It's quite urgent as we've just been informed that we need to make this change ASAP.
Cheers for any help.
Rob
Hopefully this is possible and simple as it's really important that we manage to get this done.
We have a VB site running vbadvanced as the homepage/news section and then linking to our forums.
We have the header and footer templates modified to put the right hand column down the side of the entire site on every page and use this column for our adverts. The code for the ads themselves are linked through a plugin we've set.
The code looks like this:
<!-- Right Column Code -->
</td>
<td width="120" valign="top" align="left">$advertcode</td>
</tr>
</table>
</td></tr>
</table>
<!-- End Left Column Code -->
The plugin is then:
ob_start();
include('urls/to/site/forums/adverts.php');
$advertcode= ob_get_contents();
ob_end_clean();
And the adverts.php file contains the html/javascript for our adverts.
The problem we have now is that we need to differentiate between our forums pages and our other pages and display different advertising code depending on the two.
What we basically need to do and what I hope is possible is that we can do the following:
<!-- Right Column Code -->
</td>
<td width="120" valign="top" align="left">
IF location = forums ($advertcode)
ELSE ($newadvertcode)
</td>
</tr>
</table>
</td></tr>
</table>
<!-- End Left Column Code -->
And add in some kind of if statement to set the code to a different plugin to display different ads depending on whether you're on the forums or not.
Is this possible at all? It's quite urgent as we've just been informed that we need to make this change ASAP.
Cheers for any help.
Rob