[MOD] Image Upload Module (v1.0) -- Now Available

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 07-06-2007, 03:30 AM
New Pligger
 
Join Date: Jul 2007
Posts: 5
hi cent... can you help me change the link of the thumbnail from what it is now to the story link ? ...

I meen if someone clicks the thumbnail now it will take him to the picture in full size, i want to change this and when someone clicks the thumbnail to take him to the story page or to the site were the story is...

Thanks
Floryn
Reply With Quote
  #22 (permalink)  
Old 07-06-2007, 07:25 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
The image upload module has a setting -- module_imageupload_usesmarty -- that outputs smarty variables instead of displaying the image so that you can have complete freedom of how you want to display your images in link_summary.tpl.

In image_upload_settings.php set module_imageupload_usesmarty to true. This will then create 3 variables: module_imageupload_thumbnail_src, module_imageupload_image_filename, and module_imageupload_image_caption.

In link_summary.tpl after the image upload preview code insert:

Code:
<a href="{$story_url}"><img src="{$module_imageupload_thumbnail_src }/{$module_imageupload_image_filename}" /></a>
This will create a thumbnail image that links to your story page instead of displaying the full size image.

If you want the full size image to still be displayed on the story page you could probably use this:

Code:
<a href="{$story_url}"><img src="{if $pagename neq "story"}{$module_imageupload_thumbnail_src }/{/if}{$module_imageupload_image_filename}" /></a>
Reply With Quote
  #23 (permalink)  
Old 07-06-2007, 12:15 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
Yeah that code works ...

A couple of things you can try ...
1 - in the code i posted there is an extra space at the end of {$module_imageupload_thumbnail_src } ... it should be {$module_imageupload_thumbnail_src}

2 - make sure you are still including the image upload module action in link_summary.tpl before you use the smarty variables.

{php}
// START: Image Upload Module
check_actions('image_upload_preview');
// END: Image Upload Module
{/php}


If this doesn't work, post a link to your site so we can see what's going on.
Reply With Quote
  #24 (permalink)  
Old 07-06-2007, 01:23 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
Is this just a problem with the smarty variables? Is the image upload module working properly when you turn off smarty variables?

Do you have a link to your site?
Reply With Quote
  #25 (permalink)  
Old 07-13-2007, 12:36 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
Hi, I installed it and everything its ok, the only thing is that thickbox its not working, when clicking an image it takes you to a blank page with the image.

Any idea what can I have wrong ?

Is there a way to implement a URL image below the choose file, so users can send directly or just paste the URL ?

I'm using Pligg 9.7

Thanks.

Last edited by Peter; 07-13-2007 at 12:50 PM.
Reply With Quote
  #26 (permalink)  
Old 07-13-2007, 11:35 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
Peter,

I had the same problem. I made the modification indicated in Cent's notes on v9.6in the Mod, and it fixed the problem.

Check this link out: http://forums.pligg.com/downloads.php?do=file&id=34
Reply With Quote
  #27 (permalink)  
Old 07-14-2007, 01:02 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
Quote:
Originally Posted by not2serious View Post
Peter,

I had the same problem. I made the modification indicated in Cent's notes on v9.6in the Mod, and it fixed the problem.

Check this link out: http://forums.pligg.com/downloads.php?do=file&id=34
Thanks, but I tried that also, changing "tpl_pligg_pre_title" to "tpl_pligg_pre_title_thickbox" in thickbox_init.php but its not working.

Any other idea what can be wrong ?

Thanks.
Reply With Quote
  #28 (permalink)  
Old 07-19-2007, 03:56 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
No one ?

Thanks.
Reply With Quote
  #29 (permalink)  
Old 07-19-2007, 07:15 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
if you click the thumbnail and it simply takes you to a blank page with the image on it (linked directly to image URL), then the problem is with Thickbox not being triggered correctly. If you post your site's URL or PM it to me, I can take a look.

Best,
Cent
Reply With Quote
  #30 (permalink)  
Old 07-19-2007, 11:41 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
there it is

Last edited by Peter; 12-12-2007 at 05:46 AM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload Module (File and Image Attachment) Yankidank Free Modules 157 03-13-2010 11:31 AM
Simple question: Has anyone got the image upload module to work? Citizenslide Questions and Comments 7 07-30-2009 01:44 AM
[MOD] Image Upload Module (v0.93) -- Please test cent Questions and Comments 54 05-01-2009 10:12 PM
Image Upload Module - Really confused thefandango Questions and Comments 3 01-05-2009 11:01 AM
Image Upload Module -- Call for feature requests cent Questions and Comments 12 11-15-2008 12:13 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development