|
webdzr
|
 |
« on: November 28, 2011, 02:32:09 pm » |
|
Hello, First I would like to say that I think adseller pro is a great mod for smf. There is just one thing that I didnt realize before I purchaced. The ads only display one ad randomly on page refresh per location. I have read other posts on the forum about "stacking ads". That is just what I would like to do. The way adsense displays.
I realize you can create a custom location and create a <table> but in my case I want a tower on the left side of the forum index with 5 ads in it and different ads on the 6 other main pages of my forum (same location). If I made a custom location for each there would be 35 different locations/ad packages for customers to choose from. I do not want to do this. It would be better to have only 7 locations/ad packages.
Im not fluent in php/mysql but I think this could be done with a WHILE() loop on the query starting on line 2144 in sources/adseller2.php and change the ORDER BY RAND() LIMIT 1 to ORDER BY ID_AD DESC the number of ads that display could be set by the number of ad stock in the location(my case 5) Im not using the rev.share part or have any other ad locations.
Im just not sure how to write the while loop and where it should go.
I may be compleatly wrong in all this. If anybody understands any of this and can help I would be very thankful as I would really like to use this mod. I also feel this would be helpful to many other people. Thank You
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #1 on: November 28, 2011, 06:58:17 pm » |
|
Are you just showing ads in that one location/spot or are you having multiple locations.
Depending on that we can see which is the best way to go.
The function ShowAdLocation controls which ads are shown. Condition check by ad location on how many ads to return or just one A while loop would be needed to loop though and display and in that same loop formatting would be needed for table horizontal/vertical
|
|
|
|
|
Logged
|
|
|
|
|
webdzr
|
 |
« Reply #2 on: November 28, 2011, 08:46:24 pm » |
|
Thank you for the quick responce....I was going to have one other ad location at the top of the forum also, but i only want to offer 1 ad space/inventory for it and it is to display throughout the entire forum. I dont think the loop will affect this space unless there are more than one ads for that location.
Other than that i would like to have just the vertical 5 ads on the left of forum.
I think the table $adDisplayData already uses might work (im not sure) might need some space between ads. Having the advertise here link after the last ad would be a plus.
Im not sure if i want to use all text ads or image yet. It would be great if it worked for both.
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #3 on: November 30, 2011, 10:01:47 am » |
|
Had an idea last night what we could do is make a duplicate of the ShowAdLocation function change it and call it like ShowFiveAdLocations and then replace the calling code in the template with that function.
Then we would just tweak that the new function code to get the result that we want so we don't mess up the original function.
|
|
|
|
|
Logged
|
|
|
|
|
webdzr
|
 |
« Reply #4 on: November 30, 2011, 01:30:40 pm » |
|
That sounds like it might just work.
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #5 on: November 30, 2011, 02:42:46 pm » |
|
Attach your adseller2.php and will see what I can do.
|
|
|
|
|
Logged
|
|
|
|
|
webdzr
|
 |
« Reply #6 on: November 30, 2011, 03:20:35 pm » |
|
here it is
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #7 on: November 30, 2011, 04:27:02 pm » |
|
Try this
And change the template call to ShowAdFiveLocation
|
|
|
|
|
Logged
|
|
|
|
|
webdzr
|
 |
« Reply #8 on: December 01, 2011, 09:51:28 am » |
|
Thats it! Everything seems to be working perfectly.....Just what I was looking for...Ill put in some formating to give some space between ads and im done.
Thank You So Much!!!!!
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #9 on: December 01, 2011, 10:06:19 am » |
|
Glad to help
|
|
|
|
|
Logged
|
|
|
|
|
Tarasu
|
 |
« Reply #10 on: February 15, 2012, 01:13:55 pm » |
|
I had the same issue. Many thanks for your advice! 
|
|
|
|
|
Logged
|
|
|
|
|