AdManagement built in
Jul0
The upcoming version of NoseRub will contain its own AdManagement. Why is there a need for that?
When you set up a social network, you probably want to put ads on some pages. We just added support for that to our widget system for the new themes. In a template it looks like this:
$noserub->widgetAd('sidebar');
sidebar is the name of the AdSpot and the theme designer needs to add a file called ads.php to his/her theme, which contains all the AdSpots for this theme:
/**
* Definition file for the ad spots of this theme.
*
* make sure not to start this file with <?php !!!!
* The pattern is like this:
* $theme_ad_spots = array(
*
* ‘name’ => ‘
* ’size’ => ‘
* ‘info’ => ‘
* )
* );
*
* The ad spot names are then used in the network admin interafce
* to place ads on them.
*/
$theme_ad_spots = array(
1 => array(
‘name’ => ’sidebar’,
’size’ => ‘200×200′,
‘info’ => ‘Used in the right sidebar’
)
);
This is the ads.php from our default theme that we’re currently working on. As you can see, there is only one AdSpot defined right now.
The AdManagement interface in the Admin area looks currently like this:

On the top you will see all AdSpots for the current theme and a select box under each where you can assign an Ad.
Below the AdSpots, there is the list of all Ads that you created. Width and height are only used for information and the flag allow php code is not yet used.
The basic idea is, that you create a couple of Ads, like eg. AdSense and then assign them to the appropriate AdSpots. If you design your own theme, you could even create AdSpots that are verify specific rather than so general like the sidebar example for our default theme.
This way you could have different ads for AdSpots like sidebar_location or sidebar_network. It’s up to you…
Enjoy this article?
Consider subscribing to our RSS feed!
No Comments
No comments yet.