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 January 24th, 2008, 12:32 PM   #1 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2006
Posts: 18
Need help editing showphoto.tmpl

I'm trying to use javascript to count page views using a third-party company called Omniture. I've been doing it for months by putting the javascript in the showphoto.tmpl template. Works great. But...

Now I need to put in another set of this js code that is specific to a particular category. I tried this, and it didn't work:

if ($cat == 1070) {
javascript code here
}

The template displayed fine but I saw this at the bottom of the page:

if (1070 == 1070) {}

when i went to that category, and the omniture code showed up properly when i viewed source. So far so good, except for seeing the conditional on the page.

But, I saw this:

if (1036 == 1070) {}

on the page when I went to another category. And the omniture js code was there too, which is wrong.

So... i think the use of the $cat variable is correct, but the conditional is not peing processed correctly.

What am I doing wrong? And is there some place else I should put that code?

Any help or ideas appreciated!

NOTE: I'm using PhotoPost Pro version 5. Would version 6 help me in any way to do this?

Last edited by trgreen; January 24th, 2008 at 12:41 PM.
trgreen is offline   Reply With Quote
Old January 24th, 2008, 01:20 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
I would suspect your not escaping your html and going back to php in that template. This is what it would look like if you place it within the html somewhere

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old January 24th, 2008, 02:42 PM   #3 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2006
Posts: 18
Thanks so much -- it works perfectly!
trgreen is offline   Reply With Quote
Old January 24th, 2008, 02:46 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
enjoy your evening glad to assist.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old January 24th, 2008, 02:55 PM   #5 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2006
Posts: 18
Thanks. But... I just found a problem -- probably with my logic.

Here's the thing: when I go to the specific military category from the front of PhotoPost, it works fine -- I get the Omniture code like I should. And when I go to another category (non-military) through the front of PhotoPost, I DON'T get the Omniture could, which is correct.

However... when I click another (non-military) image from the vertical list beside the photo in showphoto WHILE viewing a photo while I'm in the military category, the query keeps the military category in the URL, and therefore, the Omniture code shows up when it's not supposed to.

In other words, while viewing a military photo in the military category, if I click on a non-military photo, the military category seems to be carried along, and that gives me a "false positive" on a military photo view.

I hope this makes sense... and I hope there's a way to do it. Can I maybe expand the conditional?

Last edited by trgreen; January 24th, 2008 at 03:13 PM.
trgreen is offline   Reply With Quote
Old January 24th, 2008, 03:04 PM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
Maybe use the variable $dbcat instead in your code?
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old January 24th, 2008, 03:12 PM   #7 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2006
Posts: 18
That did it. Thanks for making something I was very worried about easy to fix!
trgreen is offline   Reply With Quote
Old January 24th, 2008, 03:13 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
Not a problem at all.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   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
5.6 ppopen.tmpl and ppclose.tmpl invalid html Astaran Photopost Pro Bug Reports 1 November 23rd, 2006 07:10 PM
Editing Showproduct.tmpl sidebar code SHalliday ReviewPost How do I...? 3 May 8th, 2006 03:20 PM
Editing menubar.tmpl to add new links? spartanic ReviewPost How do I...? 1 March 17th, 2006 06:40 PM
Custom1pal.tmpl Nicke71 Photopost Pro Installation & Upgrades 5 August 7th, 2004 11:25 AM


All times are GMT -5. The time now is 08:57 AM.

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