Link to external
|
imagesofyosemite
Joined: 2009-03-02
Posts: 7 |
Posted: Mon, 2009-03-02 23:30
|
|
**EDIT** We'll use the following example: The image (0008.heavens.on.earth 96dpi wallpaper) resides in /2/92/ Currently on the top right there is a link for "Download print" (this jumps to the www.~~~/2/fp/ directory) I would like to create a link on each photo page (in the description box to the right of the pic or above comments) **that should be a little clearer** |
|

Posts: 22888
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
Posts: 7
anyone?
Posts: 22888
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
Posts: 7
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?
Posts: 22888
Don't know but it would take some coding to do anyway.
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?
\Most good hosts will allow that no trouble.
Ask you host for their restrictions.
You can watermark the thumbs, re-sizes, or the original. See the watermark module for more info.
That is up to you and your host.
You can also use the link item module:
http://codex.gallery2.org/Gallery2:Modules:linkitem
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
Posts: 7
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.
Posts: 4338
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.
Posts: 7
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)
Posts: 4338
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
Posts: 7
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)
Posts: 4338
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.
Posts: 7
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!