PDA

View Full Version : PP Photo Count in Postbit


trackpads
04-26-2006, 10:00 PM
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 (https://vborg.vbsupport.ru/member.php?u=40385). 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 (http://www.photopost.com)!

This hack is based on the Referers in Postbit Hack by Developer. (https://vborg.vbsupport.ru/member.php?u=111455)

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:



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



Add After:




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




For Postbit Legacy

Find:



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



Add After:




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



And that is it! Please click install!

trackpads
04-27-2006, 09:06 AM
Reserved

Snake
04-27-2006, 12:04 PM
You the man! :D

HC.
04-27-2006, 12:05 PM
Thanks been waiting for this for 3.5

b6gm6n
04-27-2006, 05:49 PM
Very neet my man!

-b6

trackpads
04-27-2006, 06:31 PM
Thanks! Please click install!

Quarterbore
04-27-2006, 06:51 PM
I am not so concerned about this in my post view but I assume this can be done in a person's profile, right? I have to look at the code and see if I can cut this down to just that part...

Also, I assume this is for the PhotoPost PHP Pro program, right?

Last time I tried to install Photopost hacks it was for the Gallery program and not the Pro :confused:

trackpads
04-27-2006, 08:07 PM
It can but I think there is already a hack for that, search for Photopost here on the forums and I think you will find it. If not let me know and I will make one.

-Jason

b6gm6n
04-27-2006, 08:33 PM
Have not installed for myself! - but it's a great mod!

-b6

trackpads
04-27-2006, 10:19 PM
Np, thanks!

SHalliday
06-01-2006, 09:01 PM
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!

zendiver
07-08-2006, 03:57 PM
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?

zendiver
07-08-2006, 04:18 PM
trackpads,

I have edited mine to look like the following:


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

morrow
07-08-2006, 05:33 PM
Does the output provide an actual link to the users photo's, or is it just a query output of the number of photos?

TwinsForMe
07-12-2006, 02:59 AM
I did a combination of this hack, plus zendiver's modification (https://vborg.vbsupport.ru/showpost.php?p=1025037&postcount=13), and TOZ's hack (https://vborg.vbsupport.ru/showthread.php?t=111812).

<!-- 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.

mtha
09-19-2006, 07:15 PM
:) 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

TheRed
11-06-2006, 12:10 AM
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.

amnesia623
11-06-2006, 03:37 AM
Sweet! Works in 3.6.2 and pp 5.5

gopherhockey
06-10-2007, 02:27 PM
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.

dutchbb
01-27-2008, 05:18 PM
Hello

Does this still work on 3.6 / 3.7?

Defkalion
04-09-2008, 02:15 PM
Yes, I've been using it on my forum, v3.6.8.

But I can't make it work in a GARS postbit, anyone has any idea?

Bryan Ex
11-07-2011, 12:36 AM
Issue I have is in PMs. PM messages shows the counts for the person reading the message not the person the message is from.

VB 3.8 & PP 7.1