Back to vBulletin 3.0 Add-Ons

Display vBGallery Link In Postbit If User Has One
Mod Version: 1.00, by Lionel

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

Here is a simple mod to display a link in postbit to post user gallery only if he has one.

in showthread.php make the following changes highlighted in red once.
I had to change the select statement to select distinct because for some reasons, it was displaying the post in triplicate (thanks to Dark Visor).


$posts = $DB_site->query("
SELECT DISTINCT
post.*, post.username AS postusername, post.ipaddress AS ip,
user.*, userfield.*, usertextfield.*,galleries.catuserid,


a few lines down in the same query


LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "adv_gallery_categories AS galleries ON(galleries.catuserid = user.userid)

then place that conditional in postbit/posbit legacy template where you want to display it, replacing the red with your own.


<if condition="$post['catuserid']">
<a href="http://www.site.com/forums/gallery/browseimages.php?c=XX&userid=$post[catuserid]">My Gallery</a>
</if>
update:

For those who don't have a specific member category use this link
browseimages.php?do=member&imageuser=$post[catuserid]

Download

No files for download.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024