HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Does lightbox2 work with images in catalogs?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#70217 (In Topic #14862)
Avatar

Community saint

As above. If I have an image as an entry in a catalog, will lightbox2 display it?

Thanks for the help.

Bob
Back to the top
 
Posted
Rating:
#70229
Avatar

Put these in themes/default/templates_custom and it will make the lightbox work for download images, catalogue picture fields, and eCommerce products.

Attachment
» Download: CATALOGUE_products_ENTRY.tpl (2 Kb, 143 downloads so far)
Attachment
» Download: CATALOGUE_DEFAULT_ENTRY_FIELD_PICTURE.tpl (414 Bytes, 123 downloads so far)
Attachment
» Download: DOWNLOAD_SCREEN_IMAGE.tpl (654 Bytes, 129 downloads so far)


We'll include it in the next lightbox2 plugin version.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70255
Avatar

Community saint

Trying to download the second and third attachment produced the following in Safari:
{$CSS_INCLUDE,lightbox} {$JAVASCRIPT_INCLUDE,javascript_prototype} {$JAVASCRIPT_INCLUDE,javascript_scriptaculous} {$JAVASCRIPT_INCLUDE,javascript_scriptaculous_builder} {$JAVASCRIPT_INCLUDE,javascript_scriptaculous_effects} {$JAVASCRIPT_INCLUDE,javascript_lightbox} {+START,IF,{$NEQ,{I},0}}{+END}{+START,IF,{$NEQ,{I},0}}{+END}

Works fine in Firefox.

Bob
Back to the top
 
Posted
Rating:
#70256
Avatar

Community saint

Chris-

Thanks for this fix. It works nicely in the catalog view.

Bob
Back to the top
 
Posted
Rating:
#70265
Avatar

Community saint

Chris-

Spoke too soon. The file CATALOGUE_DEFAULT_ENTRY_FIELD_PICTURE.tpl causes the following problems after clearing caches:

Safari renders a blank page (no error message)

Firefox displays the following:
An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser's error console. The error was:

1: syntax error
http://xxxxxxxxxxx.com/404.htm

Google Chrome seems to be okay.

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#70266
Avatar

That's not possible… the error you're reporting is on a 404 error screen, which could not be caused by a template change. Something else must have changed too.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70268
Avatar

Community saint

The only other changes I made was for the bug in the catalog sort (View topic: v7.0.1 - Bug in Catalog sort - ocPortal) which I reverted for testing.

It is 100% repeatable. If CATALOGUE_DEFAULT_ENTRY_FIELD_PICTURE.tpl is in /default/templates custom/ I have the problem. If I remove it from that directory, no problem. You need to clear the caches for the problem to be triggered/fixed.

I have made no other changes to code (even those suggested to address other issues) because I wanted to make sure I am working from a stable base.

Bob
Back to the top
 
Posted
Rating:
#70295
Avatar

Hmm, the Firefox reference to 404.htm doesn't make any sense to me, but I suppose maybe something is going wrong with dependent URLs within the page and it's coming up about them rather than the main page.

All I can think is that this uses 5 large Javascript files and a CSS file, on top of what ocPortal normally uses, so doing it from a cleaned cache might be a bit too much for the server. Things probably stabilise, and if this isn't the first screen you are loading after the cache is emptied probably there's less of a regeneration step for it and it would be fine also.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70303
Avatar

Community saint

I tried this again from a cleaned cache and it worked fine so I suspect you are right that it has something to do with server load which is surprising given that I tried this over many hours.

Ata any rate, it will hopefully not be a significant problem.

Bob
Back to the top
 
Posted
Rating:
#70305
Avatar

Community saint

This gets more and more interesting. It seems that the front page always loads now although I did have a few more of the Firefox warnings:
An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser's error console. The error was:

1: syntax error
http://xxxxxxxxxxx.com/404.htm

When you click continue the page renders properly. Now this message does not even appear after flushing cache. So strange.

However, with Firebug enabled, I am getting 6 syntax errors in Firebug which result in 404 errors even though the page renders:

Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHT.../xhtml1/DTD/xhtml1-transitional.dtd"> 404.htm line 1


Back to the top
 
Posted
Rating:
#70332
Avatar

I'm afraid there's nothing for me to go on here. All I could do is look on a server directly.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70353
Avatar

Community saint

After some investigation, this appears to be two issues.

First, there is the syntax error in the DOCTYPE declaration for the 404.htm file. I can't even find this file. I expected it to be either in / or /pages/html/.

The second issue is why is the 404.htm triggered 6 times when loading the front page. It appears to be due to some JS which is not being cached:

Code

[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxx/templates_cached/EN/javascript_sound.js, referer: http://xxxxxxxxxxxxx.com/start.htm
[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxxx/templates_cached/EN/javascript_dragdrop.js, referer: http://xxxxxxxxxxxxx.com/start.htm
[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxxxx/templates_cached/EN/javascript_slider.js, referer: http://xxxxxxxxxxxxx.com/start.htm
[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxxxx/templates_cached/EN/javascript_effects.js, referer: http://xxxxxxxxxxxxx.com/start.htm
[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxxxx/templates_cached/EN/javascript_controls.js, referer: http://xxxxxxxxxxxxx.com/start.htm
[Sun Jun 12 14:38:54 2011] [error] [client 68.104.56.50] File does not exist: /home/xxxxxx/public_html/ritter/themes/xxxxxxxx/templates_cached/EN/javascript_builder.js, referer: http://xxxxxxxxxxxxx.com/start.htm

I get these errors even after reloading the page over and over. Those .js files are simply not being being cached even though there are many other files (including *.js files) in the /templates_cached/EN/ directory.

Let me know if you want access to my server to review the problem.

Bob


Last edit: by BobS
Back to the top
 
Posted
Rating:
#70381
Avatar

Fix attached. Was unrelated to caching. Just you had to be logged in as admin on a browser that can report Javascript error messages via ocPortal, and reports them for syntax errors. I think only recently Firefox started doing this, and previously Chrome didn't support it.

Attachment
themes/default/templates_custom/JAVASCRIPT_SCRIPTACULOUS.tpl
» Download: JAVASCRIPT_SCRIPTACULOUS.tpl (3 Kb, 152 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70387
Avatar

Community saint

Thanks, Chris. That did the trick - no errors and my front page loads much faster.

Bob
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: