vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Display vBGallery Link In Postbit If User Has One (https://vborg.vbsupport.ru/showthread.php?t=81398)

Lionel 05-11-2005 10:00 PM

Display vBGallery Link In Postbit If User Has One
 
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).


Quote:

$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


Quote:

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.


Quote:

<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]

bold 05-13-2005 10:29 AM

how would i make it display a link only if a member has an image in the members gallery since i don't allow sub-cats in my members gallery?

Lionel 05-13-2005 10:36 AM

browseimages.php?c=XX&userid=$post[catuserid]

XX is your main membercategory. That will pull all images under if you have, if not then...

bold 05-14-2005 09:24 AM

but it only shows a link if the user has created a category in the members category. i'm wondering how i can make it so that it shows a link if they have uploaded an image to the members category without creating a category.

Lionel 05-14-2005 09:28 AM

The way I understand it, the first time a member uploads, regardless if he created a category or not, a folder with his userid is automatically created on the server. This is that folderid that is being pulled.

Why don't you just try. Can't hurt.

Allan 05-14-2005 02:13 PM

this hack walk with which gallery ?

Lionel 05-14-2005 05:33 PM

<a href="http://www.vbadvanced.com/products.php?do=productinfo&p=5" target="_blank">celle la</a>

Vega 05-14-2005 06:02 PM

I'll try that. Thank you!

bold 05-14-2005 09:37 PM

Quote:

Originally Posted by Lionel
The way I understand it, the first time a member uploads, regardless if he created a category or not, a folder with his userid is automatically created on the server. This is that folderid that is being pulled.

Why don't you just try. Can't hurt.

i was asking because it wasn't working for me.

bold 05-14-2005 09:38 PM

the link only showed if a member had created another category.


All times are GMT. The time now is 08:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01070 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete