PDA

View Full Version : PP Classified Ads Count in Postbit


trackpads
04-26-2006, 10:00 PM
This is an Addon for PP Classifieds and VB 3.5.4 that will show the total (current) number of classifieds a user has uploaded to your Photopost Classifieds. 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 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 classifieds in the same database as VB and for folks that dont. This is unnavoidable since classifieds users seem to have dramatically different databases. I personally have my VB and classified 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. [CC/VB in Same Dbase] - Once you download the XML file (ppc In Postbit.xml) you will need to open it in a Text Editor and edit the phrase 'pptablename' to the name of your classifieds table. If you are using the default install then it should be 'products' or 'cc_products' 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. [CC/VB in different Dbase] -If you are using a seperate database for VB and RP then edit the XML file (ppc In Postbit-sep dbase.xml) and replace 'databasename' with the name of the Database that classifieds 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 Ads: $trackpadsppcpbit</div>
</if>




For Postbit Legacy

Find:



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



Add After:




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



And that is it! Please click install!

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

Snake
04-27-2006, 12:03 PM
Great job on makin' the hack. Thanks!

MillerLight
04-28-2006, 01:46 AM
What should the "hook location" be set to?

trackpads
04-28-2006, 07:27 AM
What should the "hook location" be set to?
?? Dont touch that, just edit the database/tablename like in the instructions above and it will work.

-Jason

WreckRman2
05-04-2006, 05:14 PM
This is great... and I was quickly able to do the same for my Photopost Gallery and my vbAdvanced Links.

http://www.rchangout.com

SHalliday
06-01-2006, 08:39 PM
Great Hack! I am a little concerned about the extra load it adds. Moving to a new server in a couple of weeks and will definately install then.

Just wondering, is there any chance this could instead display on the memberinfo page?

ludachris
03-12-2007, 03:07 PM
I'm noticing that the $trackpadsppcpbit is displaying a wrong number. What should I check?

ArchangelX
09-06-2007, 07:49 AM
Great Hack! I am a little concerned about the extra load it adds. Moving to a new server in a couple of weeks and will definately install then.

Just wondering, is there any chance this could instead display on the memberinfo page?

same here!