Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 186
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 190
Total: 190

Author Topic: Need Help Coding Mod  (Read 11136 times)

0 Members and 1 Guest are viewing this topic.

Offline webdzr

  • Member
  • *
  • Posts: 15
    • View Profile
Need Help Coding Mod
« 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« 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 
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline webdzr

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Need Help Coding Mod
« 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.




Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline webdzr

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Need Help Coding Mod
« Reply #4 on: November 30, 2011, 01:30:40 pm »
That sounds like it might just work.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« Reply #5 on: November 30, 2011, 02:42:46 pm »
Attach your adseller2.php and will see what I can do.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline webdzr

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Need Help Coding Mod
« Reply #6 on: November 30, 2011, 03:20:35 pm »
here it is

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« Reply #7 on: November 30, 2011, 04:27:02 pm »
Try this

And change the template call to ShowAdFiveLocation
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline webdzr

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Need Help Coding Mod
« 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!!!!!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« Reply #9 on: December 01, 2011, 10:06:19 am »
Glad to help
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Tarasu

  • Member
  • *
  • Posts: 1
    • View Profile
Re: Need Help Coding Mod
« Reply #10 on: February 15, 2012, 01:13:55 pm »
I had the same issue. Many thanks for your advice! ;)

Offline Selena_Kitt

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Need Help Coding Mod
« Reply #11 on: December 05, 2012, 01:55:15 pm »
I'm looking for a similar fix for my site.

Is there code available?

Thanks!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« Reply #12 on: December 05, 2012, 02:59:09 pm »
I'm looking for a similar fix for my site.

Is there code available?

Thanks!
For AdSeller Pro?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Selena_Kitt

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Need Help Coding Mod
« Reply #13 on: December 05, 2012, 03:36:25 pm »
I'm looking for a similar fix for my site.

Is there code available?

Thanks!
For AdSeller Pro?

yes, for Pro!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Need Help Coding Mod
« Reply #14 on: December 05, 2012, 03:43:36 pm »
Upgrade your account to move to customer group here
http://www.smfhacks.com/index.php?action=license


Then let me know what you want done and we can go from there.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3044 Views
Last post May 30, 2009, 12:58:57 pm
by menew
1 Replies
3596 Views
Last post November 14, 2009, 07:55:22 pm
by SMFHacks
1 Replies
3715 Views
Last post January 10, 2012, 12:23:41 pm
by SMFHacks
0 Replies
3801 Views
Last post August 06, 2016, 01:43:18 am
by shuban
14 Replies
4859 Views
Last post March 23, 2017, 08:37:58 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal