sorry guy. Why in the "new" page, after uploaded an image (but didn't post the article) I cannot see a thumb preview but only filename?
tnx


![]() |
| | Thread Tools |
Upload Module (File and Image Attachment) | |||||||||||
|
Developed by Yankidank Developer Last Online: Feb 2012
An early Beta version of the module was included with 1.0 RC2, but we suggest that users uninstall it and start from scratch with the version provided with RC3 to prevent any bugs from appearing. Support This module was developed by the Pligg team and is being released for free, but we do ask that if you use this module please consider donating a small amount ($10-20) to help us recuperate our losses for the amount of time involved in developing this module. This is probably the most advanced module designed for Pligg yet and we designed it so that it could be used in a broad array of sites. Because we had to design it with so many uses in mind it took us a very long time to get it just right. If you plan on using this module for commercial use (generating income greater than $30/month from the site), we require that you submit a donation of at least $10. Technical support will be provided for BUGS that are recognized as valid and applicable to a large number of sites. We cannot support requests for features unless you are willing to pay for the extra features to be developed and to allow the feature to be contributed back to the community. Features:
Below is a screenshot of the upload module as seen at the top of Submit Step 2. ![]() Below is a screenshot of what happens after I have attached an image and clicked the Upload button: ![]() Upload Module Tags If you want to manually control where images are inserted into story content you will want to use the image tags provided next to the example thumbnail(s) during the upload process in submit step 2. Example tags might be:
Upload Module Template Tags This module will insert thumbnails automatically into your template by using template hooks. This was designed so that you wouldn't need to edit your template files manually in order to start using the module. If you want to customize where the images are individually displaying in the template, for example show the first image at the top of the post and show the second uploaded image at the bottom, you should follow the usage examples below. To insert the first attached image at it's original file size you will insert the code {$image1} into link_summary.tpl where you want it to display. The second uploaded image would be {$image2} and so on. From the upload settings page I have created a thumbnail size of 500x500 pixels. This allows an uploaded image to have a maximum length of 500 pixels when being resized. So if you upload a 1000x500 pixel image it would be shrunk proportionately to 500x250 pixels. To embed that 500x250 pixel image into my template I would add the code {$image1_500x500} into link_summary.tpl to display the first uploaded file for a post at it's 500x500 pixel thumbnail size. {$image2_500x500} would display the second 500x500 attached file. In the case that no image is attached nothing extra will be inserted into your template. Examples Please see the attached image for a screenshot of the Upload module settings page and examples of what the upload process looks like for the submit step 2 page. Download Now
Screenshots License Agreement Creative Commons Attribution-Noncommercial-Share Alike LicenseYou are free to Share and Remix this work under the following conditions: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). You may not use this work for commercial purposes. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. Supporters / CoAuthors Show Your Support
|
Similar Downloads | ||||
| Download | Developer | Category | Replies | Last Post |
| Comments |
| |||
|
sorry guy. Why in the "new" page, after uploaded an image (but didn't post the article) I cannot see a thumb preview but only filename? tnx |
| ||||
| Because you have not configured the module correctly. Go through the settings again and configure the thumbnail and output.
|
| |||
|
Hi all, I"ve been banging my head for a little while now to get this module to work. My problem was that although the files were being uploaded, they would NOT post to my message. In fact after trouleshooting a bit, I found that the uploads were NOT being registered into the pligg_files table. After combing through the upload_main.php file, I've found the following code was messed up. Somone please correct me if I'm wrong, but it looks like the 3 insert statements in this file are written incorrectly in upload_main.php. I was having trouble with the database query that inserted the file upload details into the table. The existing query was written as... Line 210 - modules/upload/upload_main.php $db->query("INSERT INTO ".table_prefix."files SET file_size='orig', file_user_id={$current_user->user_id}, file_link_id={$linkres->id}, file_fields='".base64_encode(serialize($fields))." ', file_name='".$db->escape($url)."'"); After re-writing it to the following, I got the files to post to the table properly. I also had to modify the table properties to accept nulls and defaults for some fields. $db->query("INSERT INTO ".table_prefix."files (file_size, file_user_id, file_link_id, file_real_size, file_fields, file_name) VALUES ('orig',{$current_user->user_id}, {$linkres->id}, {$_FILES["upload_files"]["size"][$key]}, '".base64_encode(serialize($fields))."', '".$db->escape("$name.$ext")."')"); I am still having trouble with the file name being output properly in the upload section. Any help on that is much appreciated. |
| |||
|
I have a question about how this module works. I am a little uncertain about the way it uploads files... I can tell that when the main upload form is loaded, it goes and gets the highest link ID then increments it by one to get the next potential ID. When the user posts, it just figures that the user will be the next poster. Assuming we are on a high traffic site, with multiple posters, one could upload their link, then start writing the link summary. But, before they are done submitting their link, someone else could submit a link right before them and have the file attached to their post instead of the correct owner. Even if it checks to make sure it is the correct owner, it would still would be unable to find the post that really owns it because the previous poster would have taken the ID that it was assigned to. I haven't done too much research into this module, but I am wondering if this is really the way it functions. If so, maybe we need some native file upload support to pligg in general without modularizing, it really can't be that difficult to add in. |
| ||||
|
Once you start submitting a link it is assigned an ID number. That ID number is unique and no two posts share the same ID. The ID is then used by the Upload module to figure out which post each file is attached to. So your theory of 2 posts being submitted around the same time resulting in an incorrect file placement wouldn't be possible.
The Twitter Module for Pligg CMS! Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites! |
| |||
|
Thank you very much for the clarification and reassurance.
|
| |||
|
@same: what mysql version do you use? Also, the query there looks so: $db->query("INSERT INTO ".table_prefix."files SET file_size='orig', file_user_id={$current_user->user_id}, file_link_id={$linkres->id}, file_real_size='{$_FILES["upload_files"]["size"][$key]}', file_fields='".base64_encode(serialize($fields))." ', file_name='".$db->escape("$name.$ext")."'"); Did you forget to mention file_real_size line or you don't have it in your version? |
| |||
|
Upload portion works fine but the link to image/file gets this error ERROR: Can't read file http://www.parati.com.ve/images/articles/small/bienmesabe.jpg We have tried various different links and it is not the link or image that is causing the error. We operated this site same settings other than adding the Flickr Module to the one, and it worked fine on the other sit. This one seems to have this error, and we do not know why Heres our submit page Login | MeGusta Is there something wrong in our code, we did uninstall and reinstall the module but did not see the error go away Help is appreciated |
| |||
|
I was not able to preview the original image when clicking on the thumbnail, it seems I got the permission error (original image was set as permission 600). Any ideas?
|
| |||
|
I have installed this upload module in Pligg CMS 1.0.3b images are uploading and resizing but this images are not coming with my stories .i have checked in database too no records are inserted pligg_files table and when i upload images only uploading message only coming there are no images.i have tried many time but no use what is the problem in this module any one can help me?
|
![]() |
| Tags |
| last image, upload |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [MOD] Image Upload Module (v1.0) -- Now Available | cent | Questions and Comments | 190 | 01-08-2011 05:12 PM |
| Upload module 1.1 - Error uploading file | Citizenslide | Questions and Comments | 8 | 10-03-2009 09:18 PM |
| [MOD] Image Upload Module (v0.93) -- Please test | cent | Questions and Comments | 54 | 05-01-2009 11:12 PM |
| Image Upload 0.4 Module | ziadchatila | Questions and Comments | 3 | 08-05-2008 05:40 PM |
| [MOD] File Upload Module -- seeking requests for features | cent | Questions and Comments | 2 | 08-11-2007 05:39 AM |