SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 25, 2012, 11:45:25 am

Login with username, password and session length
Members
Total Members: 10073
Latest: makablue
Stats
Total Posts: 28694
Total Topics: 4979
Online Today: 88
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 61
Total: 61
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Need Help Coding Mod  (Read 1063 times)
webdzr
Ad Seller Pro Customer
Newbie
*****
Offline Offline

Posts: 14


View Profile
« 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
Administrator
Hero Member
*****
Offline Offline

Posts: 9680


View Profile
« 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
Ad Seller Pro Customer
Newbie
*****
Offline Offline

Posts: 14


View Profile
« 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
Administrator
Hero Member
*****
Offline Offline

Posts: 9680


View Profile
« 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
Ad Seller Pro Customer
Newbie
*****
Offline Offline

Posts: 14


View Profile
« Reply #4 on: November 30, 2011, 01:30:40 pm »

That sounds like it might just work.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9680


View Profile
« Reply #5 on: November 30, 2011, 02:42:46 pm »

Attach your adseller2.php and will see what I can do.
Logged
webdzr
Ad Seller Pro Customer
Newbie
*****
Offline Offline

Posts: 14


View Profile
« Reply #6 on: November 30, 2011, 03:20:35 pm »

here it is
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9680


View Profile
« Reply #7 on: November 30, 2011, 04:27:02 pm »

Try this

And change the template call to ShowAdFiveLocation
Logged
webdzr
Ad Seller Pro Customer
Newbie
*****
Offline Offline

Posts: 14


View Profile
« 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
Administrator
Hero Member
*****
Offline Offline

Posts: 9680


View Profile
« Reply #9 on: December 01, 2011, 10:06:19 am »

Glad to help
Logged
Tarasu
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #10 on: February 15, 2012, 01:13:55 pm »

I had the same issue. Many thanks for your advice! Wink
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 10:52:25 am]

[Today at 10:35:29 am]

[May 24, 2012, 08:02:50 am]

[May 24, 2012, 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 4.749 seconds with 20 queries.