PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro How Do I...?

Photopost Pro How Do I...? Wondering how to do things in PhotoPost?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old April 2nd, 2010, 09:12 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Jul 2002
Location: London
Posts: 273
Question How to add total photo views anywhere

Hi,

I would like to be able to display the total photo views anywhere on my vb4/PP based site. I use 2 databases, one for vb and one for pp.

I just want to be able to add $totalviews or similar and see the total photo views count for the site. If what I do also adds comment counts and similar great.. it is the photo view count I really need though.

I've tried to do this myself by looking at codes used in various photopost files, and I thought this might do it as a plugin, it doesn't seem to be right though. Help!

Code:
Content visible to verified customers only.
Thanks for any help you can give.

Steve
Steve_UK is offline   Reply With Quote
Old April 2nd, 2010, 07:13 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
well when making your plugin you need to do many things. One being write the plugin so it works meaning have you defined the actual database info. Next after defining the variable you then need to declare it properly in the vb4 template you need it and your plugin also needs to be set to the right location.

vb has tutorials on how to write vb4 plugins.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 3rd, 2010, 04:32 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Jul 2002
Location: London
Posts: 273
Chuck,

I doubt if I'll ever be able to write serious plugins, I've never learnt PHP for a start.

We've had the PP total views live count on our site front page for years - it was done by adding a little of the code from the normal stats count to your inc_features.php file.

We feel the best way to promote the PP part of the site to those passing through the site via the front page is to show them a live count for photo views, which are around 29 million and will be ever higher each time they view them.

The site uses your great hack for putting vbCMS 4.2 and PP7.1 together - and that defines heaps of variables and does most things we would have wanted to do. Only putting the photo views count on the front page, and adding a random photo to the front page to promote the PP part of the site are needed now.

If you can help by actually telling us how to do it that would be great. If not we'll keep playing with adding bits to what you've done to try and get there ourselves.

Have a great Easter.

Steve
Steve_UK is offline   Reply With Quote
Old April 3rd, 2010, 07:06 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
Steve I really can't nudge you in the right direction without knowing where your trying to know where your doing it. We do not really get into code mods for vb in product support here.

1. For instance if you want to show the totalviews on the forumhome template you need to make sure to place your plugin code to execute at that location and maybe define your query variable a unique name like $pptotalviews.

2. THE COMPLICATED PART. Your mysql query looks valid but nothing works in vb4 without defining it within the template. Look at the rest of the forumhome plugin for instance in the vb4 code I released. You will see how we define the pppro_imagebits variable into the forumhome template. That variable is not valid in vb4 until you define it.

This is why I suggested you read up on the vb4 plugin system.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 4th, 2010, 05:59 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Jul 2002
Location: London
Posts: 273
Chuck,

Thanks for the extra pointers anyway, I'm sure they will help. I'm expecting to get this done today and it will probably be fun to try a few things.

Steve
Steve_UK is offline   Reply With Quote
Old April 4th, 2010, 08:00 AM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
yeah you can look at my mod for pointers indeed.

The real mystery of course to anyone pointing you anywhere is where your putting things. vb4 is very very specific and the template stuff needs to be done right.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Views sean9715 Photopost Pro How Do I...? 3 November 15th, 2007 02:18 PM
Need SQL just to pull total photo views Swanny Photopost Pro Installation & Upgrades 2 December 13th, 2004 11:33 AM


All times are GMT -5. The time now is 01:49 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0