Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 Lighbox w/ quotes in cdescription??
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AftrBrnr
Starting Member

32 Posts

Posted - August 17 2007 :  15:52:40  Show Profile  Reply with Quote
Firstly, yes - I know the Lightbox code isn't officially supported but it's way too cool to *not* use

And I got it plugged in and running in 15 minutes or so. I'm having one small problem with it, though. Whenever the data in cdescription contains a quotation mark it fails because it's passed into the string for the image.

This wouldn't be a problem in the ASP page, but I'm using an HTML template. Can some kind offer any suggestion on how to urlencode cdescription or otherwise modify the cdescription?

Thanks in advance for any suggestions or advice

AftrBrnr
Starting Member

32 Posts

Posted - August 17 2007 :  21:40:07  Show Profile  Reply with Quote
Disregard. A better look at the manual answered my question:

[urlencode cdescription]

...so now the product page renders correctly

However, now it passes the urlecoded string to the lightbox. That problem I'll have to tackle in the javascript

Edited by - AftrBrnr on August 17 2007 21:43:54
Go to Top of Page

AftrBrnr
Starting Member

32 Posts

Posted - August 18 2007 :  23:11:05  Show Profile  Reply with Quote
Okay, so I'm not much of a javascript guru... From what I've been able to learn I could decode the URLEncoding (to allow quotes) in the JS file using 'unescape' if I understood js well enough to plug it into the js correctly. After numerous (admittedly) hack attempts I went back to the ASP - which is something I'm at least pretty good with.

My solution was to add this to my shopfileio.asp file:


        Case "URLENCODE2"
               value = replace(value,"""","''")


...and add this to my lb-template.html:


       <a href="[extraimage1]" rel="lightbox" title="[urlencode2 cdescription]">


It seems to work fine (so far) but if anyone has a more elegant solution, please share

AftrBrnr
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00