vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   VB Gallery Photo Counts in Postbit (https://vborg.vbsupport.ru/showthread.php?t=114195)

trackpads 04-26-2006 10:00 PM

VB Gallery Photo Counts in Postbit
 
This is an Addon for PP VB Gallery and VB 3.5.4 that will show the total (current) number of photos a user has uploaded to your Photopost VB Gallery. For the other PP Products please see my profile. I apologize for any errors in advance, I am new at this :)

Special thanks to everyone in the coders forum as well as Zachery, Hambil, Geoligist, Developer and tn3yguy! And of course Photopost!

This hack is based on the Referers in Postbit Hack by Developer.

For support please click install!



Notes before you install!!

1. This hack will add on one query per postbit on your showthread pages. On my site it is unnoticeable but if you experience a load problem then try disabling it. I am working on a second version but it will require actually hacking PP code and this is the easier version.

2. I have 2 versions of the XML, for those that have their PPVB Gallery in the same database as VB and for folks that dont. This is unnavoidable since PPVB Gallery users seem to have dramatically different databases. I personally have my VB and PPVB Gallery installs in the same dbase so I have not tested the XML for seperate dbases. Please let me know if it doesnt work or if there is a better way.

3. [VBG/VB in Same Dbase] - Once you download the XML file (VBG Pics In Postbit.xml) you will need to open it in a Text Editor and edit the phrase 'vbgtablename' to the name of your PPVB Gallery table. If you are using the default install then it should be 'adv_gallery_images'. Do not edit this with an editor like Write or Word, use plain old notepad. Then save it and install below.

4. [VBG/VB in different Dbase] -If you are using a seperate database for VB and PP then edit the XML file (VBG Pics In Postbit-sep dbase.xml) and replace 'databasename' with the name of the Database that the VBG is installed in, then do the edit in #3 for the table name.

5. Go to your Admin cp > Plugin System > Download/Upload Plugin. Then upload the plugin.

6. Go to your Admin cp > Styles and Templates > Postbit Templates and add the following:

For Postbit

Find:

Code:


<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

Add After:


Code:


<if condition="$show['profile']">
    <div class="smallfont">My Photos: $trackpadsvbgpbit</div>
</if>


For Postbit Legacy

Find:

Code:


<div>
$vbphrase[posts]: $post[posts]
</div>

Add After:


Code:


<if condition="$show['profile']">
    <div class="smallfont">My Photos: $trackpadsvbgpbit</div>
</if>

And that is it! Please click install!

Zachariah 04-27-2006 11:16 AM

Add a link to show gallery uploads for that user.

In Postbit, Postbit Legacy

Find:
$trackpadsvbgpbit

Replace:
Code:

<a href="http://www.yoursite.com/gallery/browseimages.php?do=member&imageuser=$post[userid]" rel="nofollow">$trackpadsvbgpbit</a>
- Replace BOLD w/ your site URL to gallery

Snake 04-27-2006 12:03 PM

Thanks! Works just fine.

tnguy3n 04-27-2006 12:16 PM

Quote:

Originally Posted by Zachariah
Add a link to show gallery uploads for that user.

In Postbit, Postbit Legacy

Find:
$trackpadsvbgpbit

Replace:
Code:

<a href="http://www.yoursite.com/gallery/browseimages.php?do=member&imageuser=$post[userid]" rel="nofollow">$trackpadsvbgpbit</a>
- Replace BOLD w/ your site URL to gallery

When it comes to Photopost products, Zachariah is da master. ;)

Nice addon, trackpads.

Nutz 04-27-2006 05:31 PM

I fail to see why Photopost product addon's are being allowed on vBulletin.org?

Thanks,
Mat

trackpads 04-27-2006 10:21 PM

Quote:

Originally Posted by Nutz
I fail to see why Photopost product addon's are being allowed on vBulletin.org?

Thanks,
Mat

Its not an addon for PP but an integration for it with VB. Next time send me a PM and I will help you out on the finer points...

nonamer69 04-28-2006 12:34 AM

Quote:

Originally Posted by Nutz
I fail to see why Photopost product addon's are being allowed on vBulletin.org?

Thanks,
Mat

This is great. I've been needing this for a long time. Thanks trackpads for coming through with it.

wii 04-28-2006 04:31 AM

Doesnt?t work for me:

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT COUNT(*) AS count FROM vbgtablename WHERE userid = 3;

MySQL Error : Table 'forumsql.vbgtablename' doesn't exist
Error Number : 1146
Date : Friday, April 28th 2006 @ 12:30:19 AM
Script : http://www.forum.com/showthread.php?p=125405
Referrer : http://www.forum.com/index.php
IP Address : xx.xx.xx.xx.xx
Username : wii
Classname : vb_database

wii 04-28-2006 04:38 AM

My mistake - works fine.

Thanks

wii 04-29-2006 05:48 AM

Will this work in the postbit of VBGallery itself ?


All times are GMT. The time now is 02:22 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.01061 seconds
  • Memory Usage 1,740KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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