 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
February 1st, 2005, 02:44 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2005 Location: Lafayette, CA
Posts: 30
| Ad Counts not updating correctly
The ad counts on my classifieds index page are wrong. They do not update correctly.
For example - in the catagory Fishing boats it says there are 16 ads there are 8. http://www.coastsidefishingclub.com/classifieds
I have approved all the ads as they come in.
Any idea on what I have done wrong?
Thanks.
|
| |
February 1st, 2005, 03:05 PM
|
#2 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,834
|
What happens if you run the Scan DB and recalc products numbers?
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| |
February 1st, 2005, 03:36 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2005 Location: Lafayette, CA
Posts: 30
|
I tired that but it did not change the counts.
|
| |
February 1st, 2005, 04:21 PM
|
#4 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,834
|
I'm not sure, I'll have to setup some kind of test since I can't duplicate the problem (I dont have the same layout you do, so will try to replicate it).
I set Contains Ads? to no on those categories which do not have ad placements and are "category headers" for subcats.
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| |
February 1st, 2005, 04:33 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2005 Location: Lafayette, CA
Posts: 30
|
I am setup the same way. So I am not sure what I can do to at least clear the ad counts in the catagories list.
|
| |
February 7th, 2005, 09:31 AM
|
#6 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
|
my ad counts are duplicating too but only in the "Ads" colum of index table
I have 4 it says I have 8
it is counting correctly at the bottom of index where it says number of users and number of ads and also correct in all sub categories
ran scan and recalc and no change - main categories set to "no" for ads but sub categories yes, obviously lol!!
any thoughts? I'm out of them |
| |
February 10th, 2005, 02:46 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
| |
| |
February 16th, 2005, 07:39 PM
|
#8 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
|
just wondering if anyone has had any success resolving this one yet?  is it counting the category and the sub category totals - therefore doubling it?
Or did I do something wrong along the way - I installed classifieds within my foum database.
Last edited by jazz74; February 16th, 2005 at 07:41 PM.
|
| |
February 17th, 2005, 09:26 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
|
I still have this issue as well.
|
| |
February 17th, 2005, 12:46 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Jan 2005 Location: Lafayette, CA
Posts: 30
|
Okay guys 2 weeks has gone by - other people havethe same issue as I do but no one here is responding with an answer.
I paid for the software. Does ANY type of support come with it?
If I did something wrong can you point me in the right direction? If its a bug will you please post a fix.
This feature is somewhat important and not having it work correctly is causing problems at this point.
Some input PLEASE...
Thanks
|
| |
February 17th, 2005, 07:43 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
Problem is we cant duplicate problem at all
Are you running the sendnotice.php cron?
Have you tried a scan database?
The scan database should easily recount the index counts incorrect ad counts |
| |
February 17th, 2005, 08:01 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
|
I am running the sendnotice.php cron.
Scan database does not fix it for me.
|
| |
February 17th, 2005, 08:23 PM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
Replace your upgradecategories function in pp-inc.php with this one and run scan database recount posts Quote:
function upgradecategories( $parent=0 ) {
global $Globals, $link;
// update categories
//
if ( $parent == 0 )
$query = "SELECT id,catname,description,catorder,parent,thumbs,children FROM {$Globals['pp_db_prefix']}categories ORDER BY catorder ASC";
else
$query = "SELECT id,catname,description,catorder,parent,thumbs,children FROM {$Globals['pp_db_prefix']}categories WHERE id=$parent ORDER BY catorder ASC";
$boards = ppmysql_query($query, $link);
while ( list( $id, $catname, $catdesc, $order, $catparent, $catthumbs, $children ) = mysql_fetch_row($boards) ) {
catlist( $id );
$lastposttime=""; $lastpostby=""; $lastpostlink="";
$lastphoid=""; $lastphoby=""; $lpholink="";
$newproducts=""; $laston=0;
if ( $children != "" ) $children = "$id,$children";
else $children = "$id";
$cproducts=0; $catposts=0;
$quid = "cat IN ($children)";
if ( $quid != "" && $quid != "cat=" ) {
// first we need to get last product/post info
$query = "SELECT id,user,userid,date FROM {$Globals['pp_db_prefix']}products WHERE $quid AND status=0 AND approved=1 ORDER BY date DESC";
$lastp = ppmysql_query($query, $link);
list( $lastphoid, $lastphoby, $lastphobyid, $lastphotime ) = mysql_fetch_row($lastp);
ppmysql_free_result($lastp);
//now we get the number of product, just in this category
$query = "SELECT id FROM {$Globals['pp_db_prefix']}products WHERE cat=$id AND status=0";
$lastp2 = ppmysql_query($query, $link);
$cproducts = mysql_num_rows($lastp2);
ppmysql_free_result($lastp2);
$query = "UPDATE {$Globals['pp_db_prefix']}categories SET lastproduct='$lastphoid', products='$cproducts' WHERE id=$id";
$resulta = ppmysql_query($query,$link);
}
}
return;
} |
Last edited by Chuck S; February 17th, 2005 at 09:34 PM.
|
| |
February 18th, 2005, 02:09 AM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
|
It is correct now.
Thank you.
|
| |
February 18th, 2005, 10:32 AM
|
#15 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
|
Thank you very much guys - all is working well now - did need to re-run the scan after uploading the changes to pp_inc, counts are now correct
Had it not been for this problem I wouldn't have found sifuhalls forums - most excellent, now a happy member over there too |
| |
February 18th, 2005, 11:44 AM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Jan 2005 Location: Lafayette, CA
Posts: 30
|
Thanks fixed it - now I can stop answering questions - like "where are all the other items - says there are 40 but I can only see 8" - thanks.
John
|
| |
February 18th, 2005, 12:01 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
| Quote: |
Originally Posted by jazz74 Thank you very much guys - all is working well now - did need to re-run the scan after uploading the changes to pp_inc, counts are now correct
Had it not been for this problem I wouldn't have found sifuhalls forums - most excellent, now a happy member over there too  |  Thanks
|
| | |
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 02:04 AM. | |