The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
PP Photo Count in Postbit Details »» | |||||||||||||||||||||||||
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> Code:
<if condition="$show['profile']"> <div class="smallfont">My Photos: $trackpadspppbit</div> </if> For Postbit Legacy Find: Code:
<div> $vbphrase[posts]: $post[posts] </div> Code:
<if condition="$show['profile']"> <div class="smallfont">My Photos: $trackpadspppbit</div> </if> Show Your Support
|
Comments |
#12
|
||||
|
||||
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! |
#13
|
|||
|
|||
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? |
#14
|
|||
|
|||
trackpads,
I have edited mine to look like the following: Code:
<if condition="$ppphotosinpostbit['count']"><div class="info">Photos: <strong>$trackpadspppbit</strong> <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> |
#15
|
||||
|
||||
Does the output provide an actual link to the users photo's, or is it just a query output of the number of photos?
|
#16
|
|||
|
|||
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 --> |
#17
|
||||
|
||||
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 |
#18
|
||||
|
||||
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.
|
#19
|
|||
|
|||
Sweet! Works in 3.6.2 and pp 5.5
|
#20
|
||||
|
||||
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. |
#21
|
|||
|
|||
Hello
Does this still work on 3.6 / 3.7? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|