Link to external

imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Mon, 2009-03-02 23:30

**EDIT**
Im trying to create a link on the photo page to another picture on the site (really just a higher res version of the same pic. we offer prints of our wallpapers)

We'll use the following example:
http://www.imagesofyosemite.com/2/main.php?g2_itemId=1161

The image (0008.heavens.on.earth 96dpi wallpaper) resides in /2/92/
the higher resolution version of this file (the 300dpi print) is located in /2/fp

Currently on the top right there is a link for "Download print" (this jumps to the www.~~~/2/fp/ directory)
I need that space for a link to the online book we are writing.

I would like to create a link on each photo page (in the description box to the right of the pic or above comments)
with a link to the higher resolution print. invoking the "Save file as" would be a bonus (I know this is based mostly on a local file setting so i cant control what a users default is, but i have seen sites that do this, any ideas?)

**that should be a little clearer**
(im pretty techie but new to coding. small words are appreciated)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Tue, 2009-03-03 03:53
Quote:
just cant get it to do that

I think you have to be a bit more specific. Please describe the steps you are taking to try to make it work.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Sat, 2009-03-07 14:33

anyone?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Sat, 2009-03-07 23:28

Still at a bit of a loss but the only thing I can think of is this module:
http://codex.gallery2.org/Gallery2:Modules:downloadlink

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Tue, 2009-03-10 17:46

let me try another way.

I have 2 different version of the same file (96dpi wallpaper & 300 dpi print) on my site.
i want to link from the photo page (where the comments appear) to the high res "print version" of that file (without having to create a link on each individual picture) Invoking the "Save file as" would be great (download link allows this but its grabbing the thumbnail and display resizes)

www.imagesofyosemite.com/2/92/0033.contrived.tranquility.jpg <---- this is the 96dpi wallpaper
www.imagesofyosemite.com/2/fp/0033.contrived.tranquility.jpg <---- this is the 9x12 inch, 300 dpi print version
we are giving a smaller sized print to people and explaining about how much you are paying for ink, paper, etc, etc.
We sell a 16x20 lab quality print for about $65, hand numbered and signed by the artist (no frame, but shipping is included - depending on your locale)

(im trying to make this as easy to navigate for my 62 year old dad as possible. he cant figure out how to reply to an email in firefox without help.)
i would like for the end-user to see a few links in item actions (or wherever, i dont care where it is as long as its easily found)

download wallpaper (1600x1200)
download wallpaper (1280x1024)
download Print (9x12 300dpi)

Maybe im going about this completely wrong.... i would prefer to avoid this method as im sure my host wont like me using their server to batch hundreds of 300dpi jpgs 7-8mB into thumbnails and wallpaper sized versions.
Download link is getting closer... is there a way to add an additional link to its list? (for the print version)

Theoretically i could import the 300dpi into gallery, use the internal tools (using gd graphics toolkit) to create thumbnails and the display images sizes (assuming these are kicked down to 96dpi. or do they use the base images settings?)

(wanted to use imagemagick but i can't get it to go. no shell access or something, forget what the issue was)

how would that affect my hosts server? (approx 50 pics at a time every so often)
would this even be feasible?

my biggest issues with this method being
#1: on the print version i have the title and copyright info, the wallpaper doesnt (it will get the www.imagesofyosemite.com branding soon)
#2: Server load?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Wed, 2009-03-11 01:50
Quote:
Download link is getting closer... is there a way to add an additional link to its list?

Don't know but it would take some coding to do anyway.

Quote:
(wanted to use imagemagick but i can't get it to go. no shell access or something, forget what the issue was)

Why not use netPBM? We have it in the download page:
FAQ: I am having trouble configuring a graphics toolkit (ImageMagick, NetPBM or ffmpeg). Help?

Quote:
how would that affect my hosts server? (approx 50 pics at a time every so often)
would this even be feasible?

\Most good hosts will allow that no trouble.
Ask you host for their restrictions.

Quote:
#1: on the print version i have the title and copyright info, the wallpaper doesnt (it will get the www.imagesofyosemite.com branding soon)

You can watermark the thumbs, re-sizes, or the original. See the watermark module for more info.

Quote:
#2: Server load?

That is up to you and your host.

You can also use the link item module:
http://codex.gallery2.org/Gallery2:Modules:linkitem

Quote:
Maybe im going about this completely wrong.... i would prefer to avoid this method as im sure my host wont like me using their server to batch hundreds of 300dpi jpgs 7-8mB into thumbnails and wallpaper sized versions.

I would not rely on restrictions placed upon you by a host as hosts come and go and you can find a good host that should fit your plan for a reasonable amount of money.

Why not just add the item and have multi resizes of that item?
the other option is to add a link to the other version in the description of the item.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Wed, 2009-03-11 15:42

Watermarking will work for the Wallpaper version, but im still stuck at square one (needing a link to another file, with the same name & similar path)

Watermark wont work for my print versions because i need the title of the picture (it adds a file as a layer, so they all have the same watermark)

guess im stuck hand writing all the links....

Thanks for all the advice.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-03-11 15:45
Quote:
guess im stuck hand writing all the links....

Put the links in a custom field, using the custom fields module.

Edit your template to display a link based on the content from that custom field.

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Wed, 2009-03-11 16:01
alecmyers wrote:
Put the links in a custom field, using the custom fields module.

Edit your template to display a link based on the content from that custom field.

That sounds like exactly what im trying to do. I couldn't code my way out of Qbasic. (and that was like 12 years ago when i actually used it)

Was playing around with custom links, but I'm rather dense with code. (feel like its Trained Chimpanzee VS Deep blue to be completely realistic)

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-03-11 16:08
Quote:
but I'm rather dense with code.

Well, that's something you'll have to fix if you're to achieve what you want. Nobody is going to do it for you.
See this thread (and the one I linked to there), get to grips with Smarty which is Gallery's template language and get stuck in.
http://gallery.menalto.com/node/86274

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Wed, 2009-03-11 16:27

Perfect, thanks.... God i love the opensource community. You guys rock...

*edit* (why do i see this becoming someones sig?)
Know of any good PHP for trained chimps books/sites/etc?

Floridave & Alecmyers your help has proved invaluable. Im definitely on the right track now (and understanding WTF im doing a little more, and more familiar with my available options)

If you guys wanna shoot me a PM with your addy i would like to send you a print. im adding a ton more pictures by the 25th of the month so i would wait until after then to pick a print (shooting for a few hundred more)

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-03-11 16:30

In generally, the O'Reilly books are good for php. You don't need a great deal of php, in fact; to do what you want you only need to look at the Smarty syntax and to use the Custom Fields module, I think.

 
imagesofyosemite

Joined: 2009-03-02
Posts: 7
Posted: Sun, 2009-04-05 15:16

Solution found: added the following lines to Photo.tpl (custom fields weren't appaering correctly. this eliminated some code and simplified the process.
This adds the two links (download print & wallpaper)

<div class="gsContentDetail">
<div class="gbBlock">
{if !empty($theme.item.title)}
<h2> {$theme.item.title|markup} </h2>
<p><a href="insert.url.here/{$theme.item.title|markup}.jpg">Download print</a></p>
{/if}
{if !empty($theme.item.title)}
<p><a href="insert.url.here/{$theme.item.title|markup}.jpg">Download wallpaper</a></p>
{/if}

then added the following to .htaccess (in each of the 2 dir) - this forces the browser to download instead of opening in a new window

<Files *.jpg>
ForceType application/octet-stream
Header set Content-Disposition attachment
</Files>

Thanks again for your help. Open source rocks!