 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
October 12th, 2006, 06:33 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
| Recent Ads - Random Ads Question
I just upgraded to 2.5 and noticed a difference with the recent and random ads displayed on the index.
I have both configured to show 5 of each ad, and only ads with pictures.
on v 2.11, all 5 ads were always shown on the home page.
5 most recent, and 5 random.
Since upgrading to 2.5, I notice the recent and random ads are not fully populated. Sometimes only showing 1 or 2 ads.
This seems to change throughout the day.
|
| |
October 12th, 2006, 06:48 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,647
|
It all depends on permissions before permissions where not ran. Check your permissions to see they are set as you want them
|
| |
October 12th, 2006, 06:57 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
Chuck,
Maybe it's my lack of sleep the last couple of days. But I'm not sure what permissions you are referring to.
If you mean usergroups, then those are all configured correctly. So i'm not really sure what other permissions there are to check.
|
| |
October 12th, 2006, 06:58 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,647
|
well we check for permissions and also if you set it a certain way ads without pictures are not shown. There is a switch in admin for this
|
| |
October 12th, 2006, 07:22 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
I guess that's where I'm confused. I have it set to NOT show ads that don't have pictures. But there are ton's and ton's of ads with pictures. I used that same setting before I upgraded and it always fully populated the recent and random boxes. So I don't quite understand why it's not finding enough to populate the boxes. http://www.thumpertalk.com/classifieds/index.php |
| |
October 12th, 2006, 07:48 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,647
|
well look at your recent ads we will grab a certain number so if your going to want 5 ads we grab the last 15 results and see what you have via permissions and pictures to display.
If you only have 2 results then thats whats going to show
We limit the number grabbed to the number you want plus 10 more so as not to bog down performance scanning an entire products table
|
| |
October 12th, 2006, 11:43 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
ahh, ok...now i get it.
Thanks chuck!!!
|
| |
October 12th, 2006, 11:56 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
Could you point me to the file that that grabs the recent and featured ads so I can tinker with it a bit?
I have an extra field in product table for "hasimage" from a custom mod that you did for me last year (wich I ported over when i upgraded. I want to see if I can make use of that to pull only ads with hasimage=1 to expand the pool of random ads that contain photos to pull from (and thereby allowing for enough ads to populate the entire random and recent boxes)
Last edited by h2ojunkie; October 13th, 2006 at 12:06 AM.
|
| |
October 13th, 2006, 09:10 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Jul 2006
Posts: 100
|
Look for $grabnum in pp-inc.php.
And see my suggestion...
I later found out that 5 is added to $Globals['recentnum'], not 10 as Chuck said earlier.
Increasing this to 50 has kept my latest thumb row filled up.
It's a mystery to me that it's not obvious that something must be done with this routine... |
| |
October 13th, 2006, 09:47 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,647
|
it is a performance measure so we do not scan the entire products all of our products have a $grabnum
|
| |
October 13th, 2006, 10:54 AM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
Thanks for the info guys. Just adding in AND hasimage = 1 on the query that pulls the random/recent ads (since I already have that flag hacked into my system) worked out perfectly and problem solved.
|
| |
October 13th, 2006, 01:12 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Jul 2006
Posts: 100
| Quote:
Originally Posted by h2ojunkie since I already have that flag hacked into my system | Could you post this mod?
|
| |
October 13th, 2006, 02:51 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Jan 2005
Posts: 46
|
Well, the mod I did won't work for a normal PP install because to make it work I had to use a variable that is stored in my db that marks products that have images.
So you would first have to create field in your DB that marks wether an ad has photos or not. And that's seperate from this mod here.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 04:14 AM. | |