The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
VB Gallery Photo Counts in Postbit Details »» | |||||||||||||||||||||||||
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> Code:
<if condition="$show['profile']"> <div class="smallfont">My Photos: $trackpadsvbgpbit</div> </if> For Postbit Legacy Find: Code:
<div> $vbphrase[posts]: $post[posts] </div> Code:
<if condition="$show['profile']"> <div class="smallfont">My Photos: $trackpadsvbgpbit</div> </if> Show Your Support
|
Comments |
#12
|
||||
|
||||
No, just checked. Not sure why, I will look into it.
-Jason |
#13
|
||||
|
||||
Quote:
|
#14
|
||||
|
||||
Thanks
Quote:
|
#15
|
|||
|
|||
I have a slight mod to this to display an icon instead of words.
instead of using Code:
<if condition="$show['profile']"> <div class="smallfont">My Photos: $trackpadsvbgpbit</div> </if> Code:
<td class="alt2"><a href="http://www.mysitename.com/gallery/browseimages.php?do=member&imageuser=$post[userid]" rel="nofollow"><img name="camera" src="$stylevar[imgdir_misc]/camera.gif" width="30" height="25" border="0" alt="My Photos: $trackpadsvbgpbit"></a> </td> i also changed the area where it will display. check out http://www.thepiratesreef.com/forums/index.php to see it working this will also display the number of photos when you hover over the icon. i included the image i'm using. |
#16
|
|||
|
|||
Awesome hack! Just what I was looking for to do what I wanted.
Here is what code I put it, it displays a link to the users gallery if they have uploaded any images and links to the gallery and if not, it says they haven't uploaded any images. Code:
<if condition="($show['profile']) AND ($trackpadsvbgpbit > 0)"> <div class="smallfont"><a href="http://www.example.com/gallery/browseimages.php?do=member&imageuser=$post[userid]" title="$post[username]'s gallery">$post[musername] has pics! <img src="http://www.example.com/cimages/camera.gif" width="30" height="25" border="0"></a> </div> <else /> <div class="smallfont">$post[musername] has no pics.</div> </if> Peace John |
#17
|
|||
|
|||
PS:
Quote:
Hope that helps |
#18
|
||||
|
||||
Thanks to everyone who constributes!!
|
#19
|
|||
|
|||
Is there a way to call this variable from the MEMBERINFO template (member profiles page)?
|
#20
|
|||
|
|||
I have the mod installed (but I put a camera.gif next to the number) it works fine in the Postbit of posts, but in PMs it shows the number of photos the person receiving the PM has in the PM Postbit with the sender's username and avatar.
However, even though it shows the PM receiver's photo quantity... the link takes you to the sender's gallery. So, that also means it shows the number (and camera.gif) in the PM Postbit of senders that don't have a gallery as well as those that do. Any ideas about this? |
#21
|
|||
|
|||
Yea, it does mess up on that but I don't really care because the search engines don't see it soo...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|