SMFHacks.com
Ad Seller Pro => Support => Topic started 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?
-
Can I get a screenshot of where you want it and I can see what I can do
-
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.
-
So you want the ad in the description of each child board?
-
Yes. Tricky I know.
-
Well looks you will need a custom ad location for each child board.
Then modify the messageindex.template.php file.
-
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?
-
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
-
Cool, just what I wanted. Thanks.
-
Now I have overcome my initial euphoria I have a couple of questions:
- Which template files is this in?
- I only want to set up a couple of locations like this, one a a specific board and the other to be called via SSI. Is this possible or is this an all or nothing approach? I realise the answer to this question is dependant to the answer to the first...
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?
-
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.
-
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!
-
Yes you got it that's it!
-
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?
-
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.
-
OK. That was my workaround.
Currently trying to work out how to place a space between each vertically stacked ad?
-
That would require an edit to AdSeller.php in the showadlocation an extra br tag/new line would help
-
But that would be global, would it not? I only require the extra br in the custom location.
-
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.
-
Ah, good thought. I may be back to check why my PHP parsing doesn't work...