 |

ChrisTitchenal
User
Feb 22, 2008, 7:41 AM
Post #1 of 4
(363 views)
Shortcut
|
|
Linking an Image to a PDF ?
|
Can't Post
|
|
Hello All, Just want to say thanks to all your help. The site is live now http://www.ragefootball.com and about 90% was made with the help of CMS Builder. There are some pages that still need to be done. One such page will be a page for kids to download/open a PDF and print it out to be colored. Now I know in the admin part I can add pdf as a file type that can be uploaded but to link it to a thumbnail I assume I will need a separate jpg for that unless CMS can make one from a pdf. So other than making the field a wysiwyg and doing it the html way by placing an image then linking it to the file. Can it be done with just upload boxes ? Thanks Chris
|
|
|  |
 |

Dave
Staff
/ Moderator

Feb 22, 2008, 10:27 AM
Post #2 of 4
(357 views)
Shortcut
|
|
Re: [ChrisTitchenal] Linking an Image to a PDF ?
[In reply to]
|
Can't Post
|
|
Hi Chris, No, unfortunately there is no automatic thumbnailing for PDFs. I did a quick search and I couldn't find any well supported or built-in PHP function that did that either. Some options: You can upload PDFs through the wysiwyg and link them. You'd click the image button, upload an image, then highlight it, click the link button and upload your PDF. Without using the wysiwyg you could have a section for coloring pages, with an upload field for thumbnail and PDF, each allowing only one upload and then link them together with some PHP. Or, you could just have text links or the same icon for each (not very much fun I know). Would any of those work for you? Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

ChrisTitchenal
User
Feb 22, 2008, 11:20 AM
Post #3 of 4
(353 views)
Shortcut
|
|
Re: [Dave] Linking an Image to a PDF ?
[In reply to]
|
Can't Post
|
|
Hey Dave, Yeah I was thinking I would need to go with a wysiwyg. My only problem is out of the staff that keeps the site updated, maybe 2 would know how to do that. Lets hope this page hardly gets updated. Thanks for your help I thought of another question this is for another site we are going to use cms for. They will be listing locations and want to have the address link to mapquest or google maps. I know listing manager did that atomically. So how would I have a link that says "click here for a map" and have the fields pulled from the entered data. Thanks again Chris
|
|
|  |
 |

Dave
Staff
/ Moderator

Feb 22, 2008, 1:32 PM
Post #4 of 4
(350 views)
Shortcut
|
|
Re: [ChrisTitchenal] Linking an Image to a PDF ?
[In reply to]
|
Can't Post
|
|
For linking to a map sites (or any site that takes input) here's what you do: You go to the site (let's use Google Maps) and search for an address. I'll search for our office address: 2730 Commercial Drive, Vancouver, BC, Canada. With Google I click "Link to this Page" and I get a long link like this: http://maps.google.com/maps?f=q&hl=en&geocode=&q=2730+Commercial+Drive,+Vancouver,+BC,+Canada& sll=49.250899,-122.939304&sspn=0.010533,0.019548&ie=UTF8&z=16&iwloc=addr I see how much I can remove and still have the link work. I get this: http://maps.google.com/maps?q=2730+Commercial+Drive,Vancouver,BC,Canada So I just replace the values with PHP tags, like this: http://maps.google.com/maps?q=<?php echo $record['address']; ?>,<?php echo $record['city']; ?>,<?php echo $record['state']; ?>,<?php echo $record['country']; ?> Except because it's an url you need to "url encode" so spaces get converted to + and so on. So we use the PHP urlencode() function like this: http://maps.google.com/maps?q=<?php echo urlencode($record['address']); ?>,<?php echo urlencode($record['city']); ?>,<?php echo urlencode($record['state']); ?>,<?php echo urlencode($record['country']); ?> And there's your link. You can use that process to automatically create links to map sites passing an address, amazon.com passing a product name, or many other sites. Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 | |  |
|