Back to vBulletin 3.0 Add-Ons

Automatically include a link to a users' photopost gallery in vbulletin
Mod Version: 1.02, by wirewolf

This modification is in the archives.
vB Version: 3.0.7 Rating: (0 vote - 0 average) Installs: 12
Released: 13 May 2005 Last Update: 14 May 2005 Downloads: 17
Not Supported  

Updated on May 14th, 2005 to include as an option:
Gallery stats for the user in the MEMBERINFO template that will show next to the gallery link, like this: View username's Photo Gallery - Has xxx photos in the Photo Gallery, with a total of xx,xxx views to date.
Edit to vbulletins' member.php file required and change to the MEMBERINFO template edit.

Example - http://www.shipmodeling.net/vb_forum/member.php?u=3 and attachment #6

readme.zip file updated to readme2.zip

I found a way to automatically include a link to a users' gallery in the users' postbit dropdown menu, in the edit line of the postbit (graphic image), and in the users' profile page. It involves adding two lines of code (a query) in the image-inc.php file, in the editphoto.php file, creating a new User Profile field (in vbulletin), and editing of the postbit and the MEMBERINFO templates. http://shipmodeling.net/vb_forum/showthread.php?p=2161#post2161 and see the attached images. http://www.photopostdev.com/index.php?t=1318

Works with vBulletin Version 3.0.7 integrated with PhotoPost PHP 5.02 vB3 Enhanced, but it should work with earlier versions of both. With thanks to MarcoH64, vBulletin.org Moderator for assistance with working out the sql query.

This will work only if your photopost and vbulletin share the same database!!

What this modification does:
Whenever a user uploads a photo, a line of code in the image-inc.php file will automatically UPDATE the userfield (vbulletin's) table by SETTING the value of 1 to a field number you create below. The link to his gallery will then show in the postbit and in the MEMBERINFO template based on the condition of this field. If the number is already set to 1 (user has previously uploaded photos), it will just overwrite with another value of 1 (no harm). If it is the first time a user is uploading photo(s), the value in this field will be null, but the line of code in the image-inc.php or editphoto.php files will now set it to a value of 1

So far the only little kink in this mod, is if a users has only uploaded one photo and if they delete this one photo (if you have allowed permissions for user delete), the field will still be set to 1, meaning the link in the postbit and MEMBERINFO will still be there. In experimenting on my board with this hack, I had such a case. But if you click the link, and even though the user has no photo(s), it doesn't generate an error, just shows the normal gallery page for this member, but with no photos to display (see attachment5). I'm trying to work out some code to check if a user has ANY photos at all in the database, and based on that condition, "reset" the field value back to NULL.

1 - Create a New User Profile field
2 - Edit two files in photopost, image-inc.php and editphoto.php.
3 - Edit two templates in vBulletin, postbit and MEMBERINFO.

See attachments

In attached zip file:
readme2.txt with the instructions

Note:
Members that already have Photos in the Gallery prior to installing this mod, will have to go to their UserCP's Options to Check the "Show Link to Photo Gallery" box, or you will have to do it in the Admin Users'. When I first installed this, I made a general announcement to my Members and included an update in our Forum's weekly Bulletin. Most did update, but I had to select just a few members that hadn't.

If a member already has photos in the Gallery, does not have the box Checked in their UserCP prior to installing this mod, but then uploads a photo(s), the "Show Link to Photo Gallery" will then be updated.

In other words, this mod will not automatically update the check boxs when you first install it. Only after, when a user uploads new photos, or uploads photos for the first time.

John

Download

This modification is archived and cannot be downloaded.

Screenshots

       

   

Similar Mods

Integration with vBulletin Add a link to a user's Photopost Gallery vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024