Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
PP Photo Count in Postbit Details »»
PP Photo Count in Postbit
Version: 1.00, by trackpads trackpads is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-26-2006 Last Update: Never Installs: 16
Uses Plugins Template Edits
 
No support by the author.

This is an Addon for Photospost and VB 3.5.4 that will show the total number of photos a user has uploaded to your Photopost 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 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 pp in the same database as VB and for folks that dont. This is unnavoidable since PP users seem to have dramatically different databases. I personally have my VB and PP 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. [PP/VB in Same Dbase] - Once you download the XML file (PP Pics In Postbit.xml) you will need to open it in a Text Editor and edit the phrase 'pptablename' to the name of your PP Photos table. If you are using the default install then it should be 'photos' or 'pp_photos' if you chose a prefix. Do not edit this with an editor like Write or Word, use plain old notepad. Then save it and install below.

4. [PP/VB in different Dbase] -If you are using a seperate database for VB and PP then edit the XML file (PP Pics In Postbit-sep dbase.xml) and replace 'databasename' with the name of the Database that PP 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: $trackpadspppbit</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: $trackpadspppbit</div>
</if>
And that is it! Please click install!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-01-2006, 09:01 PM
SHalliday's Avatar
SHalliday SHalliday is offline
 
Join Date: Jan 2002
Location: Norwalk, CT
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jason,

Thank you very much for another great hack!

I am also interested in adding this to the memberinfo page. I did a search for "Photopost" but all I was able to come up with was the "Photopost Latest uploads in user profile". I have this installed and it works great. Unfortunately it does not show how many photos the member has in the photopost gallery. I am hoping you will consider releasing a version of your postbit hack for the memberinfo page.

Thanks again for all the fine work!
Reply With Quote
  #13  
Old 07-08-2006, 03:57 PM
zendiver zendiver is offline
 
Join Date: Sep 2004
Location: Houston, TX
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

trackpads,

From the looks of this, it is very nice but it seems that using (<if condition="$show['profile']">), it would show up in the postbit/postbit_legacy EVEN when a member doesn't have photos uploaded. Any work around on this one?
Reply With Quote
  #14  
Old 07-08-2006, 04:18 PM
zendiver zendiver is offline
 
Join Date: Sep 2004
Location: Houston, TX
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

trackpads,

I have edited mine to look like the following:
Code:
<if condition="$ppphotosinpostbit['count']"><div class="info">Photos: <strong>$trackpadspppbit</strong>&nbsp; <a href="$vbpoptions[urldir]/gallery/showgallery.php?cat=500&ppuser=$post[userid]"><img class="inlineimg" src="$stylevar[imgdir_button]/camera.gif" alt="Users Photo Gallery" border="0" /></a></div></if>
This way if a member doesn't have photos uploaded in PhotoPost, then the information doesn't show up in their postbit/postbit_legacy.
Reply With Quote
  #15  
Old 07-08-2006, 05:33 PM
morrow's Avatar
morrow morrow is offline
 
Join Date: Mar 2002
Location: NJ
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the output provide an actual link to the users photo's, or is it just a query output of the number of photos?
Reply With Quote
  #16  
Old 07-12-2006, 02:59 AM
TwinsForMe TwinsForMe is offline
 
Join Date: Oct 2004
Location: Canada
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did a combination of this hack, plus zendiver's modification, and TOZ's hack.

Code:
<!-- Photo Gallery Link Start -->
		<if condition="$ppphotosinpostbit['count']"><div class="info"><a href="http://www.campwidows.com/forums/photopost/showgallery.php?$session[sessionurl]ppuser=$post[userid]&cat=500"><img class="inlineimg" src="http://www.campwidows.com/images/camera.gif" alt="View $post[username]'s Gallery" width="21" height="18" border="0" title="View $post[username]'s Gallery" /></a><strong>$trackpadspppbit</strong></div></if>
<!-- Photo Gallery Link End -->
This creates a clickable link to the member's gallery when you click the camera.
Reply With Quote
  #17  
Old 09-19-2006, 07:15 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, just been a while since last time I mod photopost. just jump into this one of you Jason.

I made a similar hack for the same pupose for another site, but maybe I never had that released, dont remember.

anyway, for this, I think it'd be better using "photopost" hack, rather than vB hack.

All you need to do is creating a custom field for "photos" in vB, and display it in your postbit. No additional query in vB.

for photopost, just add a query when someone upload, to "add" the total photo count in userfield table.

that would save alot of queries running on server. You dont need two versions for same/different database either.

----------------

ah, found it here
http://www.photopost.com/forum/showthread.php?t=116575
Reply With Quote
  #18  
Old 11-06-2006, 12:10 AM
TheRed's Avatar
TheRed TheRed is offline
 
Join Date: Oct 2003
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

isn't there a way to load the number of photos (doing a count query like the current add-on) and store it in $bbuserinfo['photos'] or similar. Would save a lot in threads where a member replied more than once assuming the current hack runs the query every postbit.
Reply With Quote
  #19  
Old 11-06-2006, 03:37 AM
amnesia623 amnesia623 is offline
 
Join Date: Jul 2006
Location: Glendale, AZ
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet! Works in 3.6.2 and pp 5.5
Reply With Quote
  #20  
Old 06-10-2007, 02:27 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried adding this to memberinfo by having the same plugin run but on member_start instead of postbit_display_start and it didn't work.

Can someone help?

I want to display the number of photos on the memberinfo page as well.
Reply With Quote
  #21  
Old 01-27-2008, 05:18 PM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

Does this still work on 3.6 / 3.7?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10045 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete