Upload Module (File and Image Attachment)

Register an Account
Reply
 
Thread Tools
Upload Module (File and Image Attachment)
Developed by Yankidank Yankidank is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page
Designed for: Gold 1.0.0
License: Creative Commons Attribution-Noncommercial-Share
Released: 03-20-2009
Last Update: 03-26-2009
Installs: 111
Supported by Author
Makes Database Changes
Uses Module System
Template Edits Not Required
Includes Files to Upload
Translations Accepted
This module allows you to attach a file or image to a Pligg article. There are a lot of settings to configure it from the Admin panel to allow you to do pretty much anything with it. This module comes with Pligg versions 1.0 RC3 and above.
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:
  • Upload image to your website
  • Grab an image from another site
  • Generate multiple thumbnails for attached images
  • Attach files to articles.
  • Select what file types you want to allow from the upload settings page. (Ex: zip jpg psd )
  • Add additional fields for each uploaded file. Use it require a name, description, author, etc. for each file.
  • Automatically embed image thumbnails into posts. Just tell it what template hook to use from the upload settings page.
  • Automatically embed an attached image list. Like above, just tell it what template hook to use to place the list.
  • Easily add HTML before and after the thumbnails or attached files list. Use these settings fields in the upload settings page to add the needed HTML to apply javascript effects to your images, or customize how the images and file list look.
  • Use template tags to embed the uploaded images into your template.
Example:
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:
  • {image1}
  • {image1_100x100}
  • {image2}
  • {image2_250x250}
The numbers in those examples are from the sizes setup from the Upload module settings page. After you upload an image it should show a thumbnail and display one of these tags next to it for you to use if you want to embed it in the article.

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

File Type: zip upload-module-v1.1.zip (23.2 KB, 2680 views)

Screenshots

File Type: jpg upload-settings.jpg (381.1 KB, 1642 views)
File Type: png uploaded.png (23.1 KB, 8157 views)
File Type: png upload-1.png (5.3 KB, 7966 views)

License Agreement

Creative Commons Attribution-Noncommercial-Share Alike License
You 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

  • If you like this download support the author by donating.
  • This download may not be copied, reproduced or published elsewhere without author's permission.

Similar Downloads
Download Developer Category Replies Last Post

Comments
  #102 (permalink)  
Old 09-08-2009, 10:49 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Quote:
Originally Posted by MarkC View Post
I checked the php.ini it reads as

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30
max_input_time = 60
memory_limit = 64M

There is nothing like ;max_input_nesting_level = 64 ;

What should I put for max_execution_time, max_input_time and memory_limit?

And should I include max_input_nesting_level = 64 into php.ini?

Up the execution and input time to something like 180 and see what happens. You may not need that nesting level configuration line.

Quote:
Originally Posted by MarkC View Post
Pligg Version 1.0.1, Default Template

1. By default the upload module appears on the top of story submission page (step 2) - Is there any way to bring it in the bottom?

2. By default the upload module reads like Attach file(s) (jpg jpeg png gif extensions are allowed) - Is there any way to rename it as Attach image(s), Attach video(s) etc.?

3. By default the upload module prompts to upload all file at a time mentioning Attach file(s) - Is there any way to make the upload module prompt to upload specific stuffs eg. Attach image(s) (jpg jpeg png gif extensions are allowed), Attach video(s) (avi flv wmv extensions are allowed) and other specific types.

Any help is appreciated!
See the Upload module settings page and language file (lang.conf stored in the module directory)

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #103 (permalink)  
Old 09-08-2009, 11:25 AM
nellaitamil's Avatar
Constant Pligger/Designer
Pligg Version: 1.1.3
Pligg Template: ar...
 
Join Date: Dec 2008
Location: india
Posts: 208
Video plus light box methed how to use in upload module?

is passible...?
pls help anybody plliggers?
.................................................. .................................................. ......................................
My site - TAMILERS.COM - Your Source for Social News and Networking
Reply With Quote
  #104 (permalink)  
Old 09-08-2009, 01:17 PM
New Pligger
Pligg Version: 1
 
Join Date: Jul 2009
Posts: 20
Quote:
Originally Posted by Yankidank View Post
Up the execution and input time to something like 180 and see what happens. You may not need that nesting level configuration line.



See the Upload module settings page and language file (lang.conf stored in the module directory)
Thanks for the reply but I am not sure what to edit in those files? However renaming Attach file(s) is possible through lang.conf. FYI, I am not a programmer ..so please step by step guide is much appreciated!
Reply With Quote
  #105 (permalink)  
Old 09-11-2009, 12:33 AM
jamirdesign's Avatar
Casual Pligger
Pligg Version: 1.0.1
Pligg Template: Silverbullet
 
Join Date: Sep 2009
Location: Philippines
Posts: 41
At first, let me thank you guys for this great module. I use this in my community now and love it but with some issues in terms of modifying it to fit the style of my site.

The first issue that I want to bring is the image below with the red circle.


Is it possible to remove the said part of that so that the image attachment/thumbnails will automatically places in the page base from the settings in the admin thru module hooks?

Second image is with two lines horizontal.


The thumbnail/attachment is placed in tpl_link_summary_pre_story_content and I made a changes in the CSS file where I float into the right the said image.

I cannot figure out how to align the image and the said content.

Any help from the coder please!!!!

Thanks!
Reply With Quote
  #106 (permalink)  
Old 09-11-2009, 12:30 PM
New Pligger
 
Join Date: Dec 2006
Posts: 3
Quote:
1. By default the upload module appears on the top of story submission page (step 2) - Is there any way to bring it in the bottom?
I'd like to know the answer for that as well. Thanks.
Reply With Quote
  #107 (permalink)  
Old 09-12-2009, 05:04 PM
New Pligger
Pligg Template: wistie
 
Join Date: May 2009
Posts: 9
Quote:
Originally Posted by 5h4rk View Post
1. By default the upload module appears on the top of story submission page (step 2) - Is there any way to bring it in the bottom?
I created instructions not to move the Image Upload options to the bottom, but rather to the right of the page because there was plenty of room. This involves adding to your CSS style file and creating some new Divs.

Note, these were for Pligg ver 1.0, so there might be some minor differences if you are using ver. 1.0.1.

Moving Upload Image placement on Submit Step 2

Hope that helps!

rmikealm
Reply With Quote
  #108 (permalink)  
Old 09-13-2009, 02:56 AM
New Pligger
 
Join Date: Dec 2006
Posts: 3
Quote:
Originally Posted by rmikealm View Post
I created instructions not to move the Image Upload options to the bottom, but rather to the right of the page because there was plenty of room. This involves adding to your CSS style file and creating some new Divs.

Note, these were for Pligg ver 1.0, so there might be some minor differences if you are using ver. 1.0.1.

Moving Upload Image placement on Submit Step 2

Hope that helps!

rmikealm
That is such an excelent idea! The problem is that I'm using a template that has the categories on the sidebar, so there is no much room in there =(


EDIT:

I've managed to move the upload image block down by changing in upload_init.php:

Quote:
module_add_action_tpl('tpl_pligg_submit_step2_star t', upload_tpl_path . '/upload_files.tpl');
// module_add_action_tpl('submit_step_2_pre_extrafiel ds', upload_tpl_path . '/upload_files.tpl');
to

Quote:
// module_add_action_tpl('tpl_pligg_submit_step2_star t', upload_tpl_path . '/upload_files.tpl');
module_add_action_tpl('submit_step_2_pre_extrafiel ds', upload_tpl_path . '/upload_files.tpl');
But now the submit button doesn't work.

Last edited by 5h4rk; 09-17-2009 at 10:58 PM.
Reply With Quote
  #109 (permalink)  
Old 09-23-2009, 04:07 PM
New Pligger
Pligg Version: 1.0.2
 
Join Date: Sep 2009
Posts: 14
Quote:
Originally Posted by jamirdesign View Post
At first, let me thank you guys for this great module. I use this in my community now and love it but with some issues in terms of modifying it to fit the style of my site.

The first issue that I want to bring is the image below with the red circle.


Is it possible to remove the said part of that so that the image attachment/thumbnails will automatically places in the page base from the settings in the admin thru module hooks?

Second image is with two lines horizontal.


The thumbnail/attachment is placed in tpl_link_summary_pre_story_content and I made a changes in the CSS file where I float into the right the said image.

I cannot figure out how to align the image and the said content.

Any help from the coder please!!!!

Thanks!
Hello!
I have the same problem. Perhaps this help to find a solution:

I am trying to wrap the text around an image uploaded by Image/File Upload Module v1.1
I found in some posts that we can put this code before the thumbnail:

<div style="margin: 0pt 10px 10px 0pt; overflow: hidden; float: left; position: relative;">

and close the div after the thumbnail.

That works good but the top of the image is not aligned with the top of the text.
That's because there is an extra <br> that I dont know how to delete.

Here is the result code:

<div class="storycontent">
<div style="margin: 0pt 10px 10px 0pt; overflow: hidden; float: left; position: relative;">
<a href="/pligg/modules/upload/attachments/coz.jpg">
<img src="/pligg/modules/upload/attachments/thumbs/coz120x90.jpg"/>
</a>
</div>
<br/>
<span class="news-body-text">
<span id="ls_contents-0">
<a class="source-link" href="http://testing.me">http://testing.me — </a>
some text<br/>
</span>
</span>
</div>

What file should I edit to remove that extra <br/>

Thank's
Reply With Quote
  #110 (permalink)  
Old 09-23-2009, 08:41 PM
New Pligger
Pligg Version: 1.0.2
 
Join Date: Sep 2009
Posts: 14
Quote:
Originally Posted by Filipe View Post
Hello!
I have the same problem. Perhaps this help to find a solution:

I am trying to wrap the text around an image uploaded by Image/File Upload Module v1.1
I found in some posts that we can put this code before the thumbnail:

<div style="margin: 0pt 10px 10px 0pt; overflow: hidden; float: left; position: relative;">

and close the div after the thumbnail.

That works good but the top of the image is not aligned with the top of the text.
That's because there is an extra <br> that I dont know how to delete.

Here is the result code:

<div class="storycontent">
<div style="margin: 0pt 10px 10px 0pt; overflow: hidden; float: left; position: relative;">
<a href="/pligg/modules/upload/attachments/coz.jpg">
<img src="/pligg/modules/upload/attachments/thumbs/coz120x90.jpg"/>
</a>
</div>
<br/>
<span class="news-body-text">
<span id="ls_contents-0">
<a class="source-link" href="http://testing.me">http://testing.me — </a>
some text<br/>
</span>
</span>
</div>

What file should I edit to remove that extra <br/>

Thank's
I found the solution!
I will leave it here for future reference:

1 - edit the file modules/upload/templates/upload_thumb.tpl
2 - remove the last <br> you can find ( i have put like this: {if sizeof($images)}<!--br-->{/if}
3 - the extra space will disapear. Now perhaps you will have to adjust the div values for the margins of the image. Mine looks like this: <div style="margin: 5px 10px 0px 0pt; overflow: hidden; float: left; position: relative;">

Hope that helps
Reply With Quote
  #111 (permalink)  
Old 10-19-2009, 10:34 AM
New Pligger
 
Join Date: Oct 2009
Posts: 4
I'm beginner for Pligg. I just download from the site version 1.0.1. Anyone can show me step by step to add the upload image for step 2 because I hard to get the solution for this. Please. Thank you for your helpful.
Reply With Quote
Reply

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


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