The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Our forum has a photo gallery (Photopost PHP) and on our user profiles, and on the postbit pages, it shows a link to the users gallery IF they have photos in it. There at one point WAS a script in our maintenance scripts that automatically ran to update this count (it was called update_photo_count.php - but it's nowhere to be seen on the drive, and probably hasn't been run since we moved ISP's 4 months ago). We have added a field to our user table in the FORUM DB called "photos"
Let's call the photo gallery DB "Gallery" and the vB DB "Forum" If I run this query on the GALLERY DB Quote:
Thanks ![]() |
#2
|
||||
|
||||
![]()
Not tested and I am not sure about your query but you can start with something like this:
PHP Code:
Code:
$total_photos[count] |
#3
|
||||
|
||||
![]()
Mostly what I'm looking for is something we can run as a scheduled task. Querying the DB like that for every thread view is time consuming. We had a script, but can't seem to locate it.
We have a field in our FORUM DB called "photos". I want to UPDATE user Set photos = count (photos from gallery DB) but I'm not sure how to do that where I query the Gallery DB and insert the results into the FORUM DB. Does that make more sense? EDIT - 9/16/07 (automatically edited by vB.org) Ok... I figured it out... Here it is. PHP Code:
To add this to user profile info, or on the postbit legacy - insert this Code:
<if condition="$post['photos']"><div>Photos: (<a href="/gallery/showgallery.php?cat=500&ppuser=$post[userid]">$post[photos]</a>) <a href="/gallery/showgallery.php?cat=500&ppuser=$post[userid]">View Gallery</a></div></if> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|