How to display a secondary image just like an entry?

Themes, templates, skins. css, Talk about customizing your PixyBlog.

Moderator: sven

How to display a secondary image just like an entry?

Postby jbron on Sun Sep 28, 2008 2:47 pm

Hello,

Sometimes it is interesting to show another version of a photo entry, like the original un-processed file or another view of a subject. I know I can upload a file from my control panel in PixyBlog and call it using HTML in the description text, but that would display the image on a blank browser page, just like any other jpeg file. I would like to display that image just as if it was an entry, but without creating a new entry in the blog. An example of that is Chromasia.com, for example on this entry. Can this be done with PixyBlog?
Thanks,
Jacques
My photoblog is at http://photoblog.jacquesbron.com/. Don't hesitate to leave a comment. Thanks.
jbron
 
Posts: 27
Joined: Sun Sep 28, 2008 2:35 pm

Re: How to display a secondary image just like an entry?

Postby sven on Mon Sep 29, 2008 6:58 am

That's a great idea Jacques. I would also be interested in that.

Cheers,
Sven
sven
 
Posts: 111
Joined: Thu Jun 12, 2008 5:48 am
Location: 2hrs south of polar circle

Re: How to display a secondary image just like an entry?

Postby rj on Tue Sep 30, 2008 10:12 am

Hi Jacques,

Thanks for the suggestion. I was actually quizzed about this a couple of months ago by Mr Fleming, but we never got a working solution. Mark wanted to show a before/after shot of the same photo but using an image roll-over technique rather than showing the image on a different page; but the problem (and solution) would be the same.

I've been thinking about it and I have a solution. We don't want these images to be part of the search, galleries etc, so I think it's best that we upload them separately (using the File Uploads). We can then link the uploaded image file to the entry using the newly added Reference Text #1 and/or Reference Text #2 fields which you can find in the Advanced Settings at the bottom of the New Entry page.

I think it will be easiest if I write a Wiki article about this, which I will later link to from this thread.

In the meantime I've got a working version on one of my entries; here. Look at the bottom for 'View the original, unprocessed version of this image'.

Get back to you here shortly.

Cheers,

Richard
PixyBlog - Expose Yourself
Woklife - Photoblog
rj
 
Posts: 418
Joined: Mon Jun 09, 2008 10:48 am

Re: How to display a secondary image just like an entry?

Postby rj on Tue Sep 30, 2008 12:01 pm

I've got the first draft of the Wiki article online:

http://wiki.pixyblog.com/Displaying_an_alternate_image

Hopefully it's enough to get you started. I would be interested in hearing of any improvements, changes or general feedback you have.

Based on the procedures outlined in the wiki article, I've placed a couple of different example on my photoblog:


Cheers,

Richard
PixyBlog - Expose Yourself
Woklife - Photoblog
rj
 
Posts: 418
Joined: Mon Jun 09, 2008 10:48 am

Re: How to display a secondary image just like an entry?

Postby jbron on Fri Oct 03, 2008 9:45 am

Hi rj,

This is a great addition to our photoblogs. Thanks for adding it tot the features and for writing the wiki article. Unfortunately :cry: , I can't display an alternate photo, the link doesn't seem to work for me. I haven't used the javascript version, just the regular link version, but from the popupcomment template instead of the Blog template. The link is built correctly, but it doesn't work . You can have a look at this entry.
Thanks for your help,
Jacques
My photoblog is at http://photoblog.jacquesbron.com/. Don't hesitate to leave a comment. Thanks.
jbron
 
Posts: 27
Joined: Sun Sep 28, 2008 2:35 pm

Re: How to display a secondary image just like an entry?

Postby rj on Fri Oct 03, 2008 10:16 am

Hi Jacques,

I can see everything is working fine except your image is not fading-in; it's there, but invisible. You should be able to correct that just by adding the following to your image tag:

Code: Select all
name="photo"


So, your image tag would look something like:

Code: Select all
<img src="$url.resource($resource)" alt="$resource" style="display:none;" name="photo">


Hopefully that should do the trick. Let me know if not.

Cheers,

Richard
PixyBlog - Expose Yourself
Woklife - Photoblog
rj
 
Posts: 418
Joined: Mon Jun 09, 2008 10:48 am

Re: How to display a secondary image just like an entry?

Postby jbron on Fri Oct 03, 2008 11:44 am

That did it rj, thanks a lot.

For those interested in doing that too, I have slightly modified the template (_day or _popupcomment) to also use the Reference Text #2 field. Now Reference Text #1 is used for "unprocessed image" and Reference Text #2 for "another photo of this subject", which is a potential alternate usage of this technique. Here is the code to add:

Code: Select all
#if(!$utils.isEmpty($entry.reference1))
<p><em><a href="$url.page('Alternate')?resource=$entry.reference1">View the original, unprocessed version of this image</a></em></p>
#end
#if(!$utils.isEmpty($entry.reference2))
<p><em><a href="$url.page('Alternate')?resource=$entry.reference2">View another photo of this subject</a></em></p>
#end


This page is an example of using both fields.
My photoblog is at http://photoblog.jacquesbron.com/. Don't hesitate to leave a comment. Thanks.
jbron
 
Posts: 27
Joined: Sun Sep 28, 2008 2:35 pm

Re: How to display a secondary image just like an entry?

Postby rj on Fri Oct 03, 2008 12:03 pm

Great idea Jacques,

I was thinking of suggesting that Reference Text #1 be the filename of the unprocessed image (as described in the Wiki article), and Reference Text #2 could be used as the title for the unprocessed image (e.g. "Unprocessed version of Sunset Boulevard"), but your idea offers another alternative. Maybe we need to add more Reference Text's ;-)
PixyBlog - Expose Yourself
Woklife - Photoblog
rj
 
Posts: 418
Joined: Mon Jun 09, 2008 10:48 am

Re: How to display a secondary image just like an entry?

Postby jbron on Fri Oct 03, 2008 12:44 pm

rj wrote:Maybe we need to add more Reference Text's ;-)


Well, maybe. The power of your template language is great, so a couple more fields like that might be useful in the future...
My photoblog is at http://photoblog.jacquesbron.com/. Don't hesitate to leave a comment. Thanks.
jbron
 
Posts: 27
Joined: Sun Sep 28, 2008 2:35 pm

Re: How to display a secondary image just like an entry?

Postby jbron on Fri Oct 03, 2008 12:48 pm

By the way, what is the purpose of the Enclosure URL field in the advanced Settings of an entry ?
My photoblog is at http://photoblog.jacquesbron.com/. Don't hesitate to leave a comment. Thanks.
jbron
 
Posts: 27
Joined: Sun Sep 28, 2008 2:35 pm

Next

Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

Terms and Conditions | Privacy Policy | About | Contact us | Copyright © 2006-2008 Pixy® Ltd. All rights reserved.