View Full Version : When a user deletes a photo - their photo count doesn't go down
September 17th, 2007, 10:14 AM
When users delete photos, their post count still reflects the # of photos that they totally uploaded, and not the current actual number of photos in their gallery.
To get their photo count, we're using the following query.
Select userid, user, Count(*) AS num
FROM photos Group BY userid
September 17th, 2007, 10:28 AM
IF You have the switch to add to users post counts set to yes in upload photo options in admin.
Photo uploads increment user post count?
September 17th, 2007, 10:35 AM
Photo uploads increment user post count? is set to "YES"
I guess the main question is - the way I'm counting the photos is via our own SQL query to the photos Table in the PP Database. Is the photo count stored somewhere else in the DB already counted? We query this data and push it to our vB Database and show the info in the user profile "stats" in our vB postbit templates.
We have this thread on our board - http://www.scubaboard.com/forums/showthread.php?t=200880 and this issue is brought up in post #25 and beyond.
you can also notice that our users have a link to the gallery in their "stats" under their username.
September 17th, 2007, 11:22 AM
Your talking about some hack your doing so this is not a product support question. Users posts are photos and comments not just photos.
You can feel free to discuss code modifications and such in THE MOD CORNER.
September 17th, 2007, 12:08 PM
Let me simplify -
Are the post counts stored in the Database somewhere specifically?
September 17th, 2007, 12:11 PM
That switch we use in our program increments the users post count on the forum plus or minus this it is the users forum post count. It has nothing to do with a users photos or comments on the photopost site. We add or subtract the users forum post count when they upload or delete a photo or comment on the gallery.
I think the miscommunication here is I am discussing the functionality of our default code and you are trying to communicate some issue your having with a modification your trying to code up for display in your vbulletin forum. As instructed in my last post you are free to discuss code modifications in THE MOD CORNER which falls outside product support.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.