SMFHacks.com

Ad Seller Pro => Support => Topic started by: amwebby on January 23, 2013, 01:01:56 am

Title: Add ad location for child boards
Post by: amwebby on January 23, 2013, 01:01:56 am
I'm trying to set up sponsored child boards, each of which is owned by one advertiser. In that child board he can add posts and ads where he specifies.

I've managed to do all that. Now I would like to place a banner or image in the board index for each child board. I guess I would create s custom location but not sure where to place it in index.template.php?

Edit: I've done some experimentation and you can add html into the description field of a board or child board. If push comes to shove I could do it manually but injecting it via Ad Seller Pro would be much cooler and enable me to put together a package to allow the client to manage it. Any ideas? Suggestions?
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 23, 2013, 07:49:52 am
Can I get a screenshot of where you want it and I can see what I can do
Title: Re: Add ad location for child boards
Post by: amwebby on January 23, 2013, 08:57:01 am
Here's a screenshot of what I mean. This has been done manually, by adding the html code for a banner ad in the Description fields of the two child boards.
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 23, 2013, 10:29:14 am
So you want the ad in the description of each child board?
Title: Re: Add ad location for child boards
Post by: amwebby on January 23, 2013, 10:30:55 am
Yes. Tricky I know.
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 23, 2013, 09:45:07 pm
Well looks you will need a custom ad location for each child board.

Then modify the messageindex.template.php file.
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 01:36:16 am
Hmm, that's what I thought, actually more work than manually adding it to the description field.

Taking another approach, is it possible to set up a location where ads are stacked vertically instead of being presented in rotation?
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 07:59:52 am
If you have the latest version of AdSeller Pro yes you can.
Just requires a tweak to calling code in the templates.

So here is the function call information  ShowAdLocation($LocationID, $boardID = 0, $checkReturn = false, $showAdsCount = 1, $verticalAd = false)

You would change the ShowAdLocation(###) to something like ShowAdLocation(###,0,false,5,true);
And that would should five vertical ads
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 08:25:44 am
Cool, just what I wanted. Thanks.
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 09:07:38 am
Now I have overcome my initial euphoria I have a couple of questions:


Edit: OK, I found it in adseller.php. It seems, if I want two types of ad locations I need to create a new function, following your guidance, to allow for a location that has multiple vertical ads and then call that function from the ad location?
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 10:21:31 am
1. It would depend on what placement you are editing all ad locations are stored in the template files.

2. You can do that using multiple ad locations or custom ad locations.


You should never need to modify adseller.php for any new locations just use the ad new location area in the admin area of adseller pro that will give you the code you need.
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 10:26:52 am
Than I am confused. I could only find the code you mentioned in adseller.php

I did intend to do this using custom locations, where are they stored?

Edit, sorry, just figured it out. I create a custom location then change the instance of ShowAdLocation(###) in that to ShowAdLocation(###,0,false,5,true); Sorted, thanks!
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 10:31:27 am
Yes you got it that's it!
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 10:43:31 am
Then it is just a matter of finding the template location to paste it in or placing it in my SSI module, thanks.

Now I have two tiers of ads on my site, those shown to non-members and those shown to members. Is there any way to differentiate these in the "Purchase Ad Space" section?
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 11:42:16 am
I would setup an add package and just put it either in the title or the ad package description itself and explain how it works.
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 11:44:21 am
OK. That was my workaround.

Currently trying to work out how to place a space between each vertically stacked ad?
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 12:46:35 pm
That would require an edit to AdSeller.php in the showadlocation an extra br tag/new line would help
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 01:08:19 pm
But that would be global, would it not? I only require the extra br in the custom location.
Title: Re: Add ad location for child boards
Post by: SMFHacks on January 24, 2013, 01:22:43 pm
But that would be global, would it not? I only require the extra br in the custom location.
Yes it would be unless you added a condition in the code that if the $id passed is equal to the location id you want to show the spacing then and only then show the spacing.
Title: Re: Add ad location for child boards
Post by: amwebby on January 24, 2013, 01:25:55 pm
Ah, good thought. I may be back to check why my PHP parsing doesn't work...