preview thumbnail with pdf file
4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 22, 2011 (RSS)
By Maurice - January 11, 2011
Hi team,
When i upload a zip or pdf file i want to add a thumbnail of that file how would that be the best way to do that?
Greetz Maurice
When i upload a zip or pdf file i want to add a thumbnail of that file how would that be the best way to do that?
Greetz Maurice
-------------------------------------------
Dropmonkey.nl
Dropmonkey.nl
Re: [Maurice] preview thumbnail with pdf file
By Jason - January 11, 2011
Hi Maurice,
Currently, it's only possible to CMS Builder to create a thumbnail of an image file.
If you have a graphic that you would like to display for a zip or a pdf file, you can check the uploads extension field and then output that a corresponding image.
For example:
Hope this helps
Currently, it's only possible to CMS Builder to create a thumbnail of an image file.
If you have a graphic that you would like to display for a zip or a pdf file, you can check the uploads extension field and then output that a corresponding image.
For example:
<?php foreach ($record['upload'] as $upload):?>
<?php if($upload['extension']=="zip"):?>
*OUTPUT ZIP GRAPHIC*
<?php elseif ($upload['extension']=="pdf"):?>
*OUTPUT PDF GRAPHIC*
<?php endif ?>
<?php endforeach ?>
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] preview thumbnail with pdf file
I have just implemented this but I need to limit the pdf graphic to just one, so for example if 3 pdfs are uploaded I just want to display one graphic. The url is:http://www.wildcountryconsultants.co.uk/cms/wildcountry_consultants_uk_courses.php
Re: [Mercer Design] preview thumbnail with pdf file
By Jason - February 22, 2011
Hi,
Probably the easiest solution would be to have a separate upload field where you only allow pdfs to be uploaded. All you'll need to do then is check to see if there are any uploads. If there are, output your pdf graphic and then output all of your links.
Hope this helps
Probably the easiest solution would be to have a separate upload field where you only allow pdfs to be uploaded. All you'll need to do then is check to see if there are any uploads. If there are, output your pdf graphic and then output all of your links.
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/