PDA

View Full Version : User's image count is wrong (zero)


MediaHound
July 5th, 2013, 10:47 PM
I cant seem to post in a more relevant subforum, so here goes. (I am a photopost license holder from almost ten years ago, but have been inactive on these forums for the majority of that time).


In my vbulletin memberinfo template, I typically display the user's number of photos like this:

Images: $post[photos]

That works fine most of the time.
But for some users, it shows a zero.
I am trying to figure out why.

In the "Scan Database" area of PhotoPost administration, there is a utility to "Check here to recalculate photos/posts numbers and check children."
I ran that and it did not fix the issue.

Does anyone have an idea why vbulletin $post[photos] variable wouldn't be parsing properly to show the correct number of photos 100% of the time, but works fine most times?

I also use something similar, a condition in postbit_legacy to add a link to that users gallery, but for some users, they do not have a link appearing and its not only annoying for me, but for many members of my site.

<if condition="$post['photos']"><div><b><a href="http:///www.mysite.whatever/gallery/showgallery.php?cat=500&amp;ppuser=$post[userid]">$post[musername]'s Photo Gallery</a></b></div></if>

Chuck S
July 5th, 2013, 11:26 PM
You would have to go back to whatever mod you did to show that custom link. The variable your talking about is one you most likely have coded up so I would suggest you look at whatever query you have issued to define such a variable as $post[photos] is not a regular vbulletin variable nor any variable that has anything to do with photopost.

Chuck S
July 7th, 2013, 11:25 PM
did you find out what hack or mod you did?

Our vb4 plugins have a link to user photos but we do not use an if clause because to do so we would need to issue a query for each user against the photopost database to grab that users photo count. That is alot of extra queries.