15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
News & Announcements miniBB Support Forums / News & Announcements /   

File Uploads & Photo Albums add-ons updated

Author Paul
Lead Developer
#1 | Posted: 30 Oct 2014 23:05 | Edited by: Paul 
The updated versions mostly include more sophisticated images displaying for mobile devices and scanning function added to uploaded files.

File Uploads add-on includes updates in the following codes:

* addon_fileupload.php - mobile updates in popUpFU function; added `if(!defined('MOBILE')...` - condition for mobiles (different picture handling in full version opening); $ImgPop code changed (with more reference to CSS); header("Content-Disposition:...) extended to have various headers for images and binaries (`{$disposition}`); JS functions like getCSRFCookie and confirmDeleteFile will now be visible only to registered users.

* bb_plugins.code.txt - more sophisticated output for auto-generated Rules page.

* bb_plugins2.code.txt - function createThumbnail(): `if($cmg)` replaced to `if(isset($cmg) and $cmg)` in 3 places; scanFilePHP added.

* templates/addon_fileupload_rules_***.html - all updated to have

...

enclosed title - it will appear in the tag of the Rules page as well.<br /><br />* <em>addon_fileupload_topic_thumbnails.code.txt</em> - SORT_NUMERIC added.<br /><br />* <em>css.code.txt</em> - a new code for pasting into the generic CSS file (related to pop-up's size and margins).<br /><br /><a href="http://www.minibb.com/pics.html" target="_blank">Photo album add-on</a> has been updated to have mostly the same major changes:<br /><br />- <em>addon_pics.php</em> - updates regarding picPopUp function; scanFilePHP function added.<br /><br />Both add-ons are now available to test on the <a href="http://minibb.org/minibb-test.php" target="_blank">complete miniBB demo</a>.</div></td></tr> </table> <br /><table class="forums"> <tr> <td rowspan="2" class="postedLeftCell"><img src="http://www.minibb.com/forums/img/s.gif" style="width:12px;height:9px;padding-top:6px" alt="Author" /></td> <td rowspan="2" class="pauthor" style="width:15%"><span class="username"><a href="http://www.minibb.com/forums/index.php?action=userinfo&user=2255" title="Forums Profile for "tom322"" rel="nofollow">tom322</a></span><span class="txtSm"><br />Active Member</span></td> <td class="txtSm" style="padding-left:3pt"><a id="msg39270" href="http://www.minibb.com/forums/msg.php?id=39270" class="txtSm" rel="nofollow">#2</a> <span class="sepr">|</span> Posted: 31 Oct 2014 20:46</td><td class="txtSm txtR"><script type="text/javascript">getQuotation('tom322', 2, 39270);</script><script type="text/javascript">getQuotation('tom322', 1, 39270);</script> </td> </tr> <tr><td class="caption1 tbCel2 postedTextCell" style="width:87%" colspan="2"><div class="postedText">Seems to work well, thanks!</div></td></tr> </table> <br /><table class="forums"> <tr> <td rowspan="2" class="postedLeftCell"><img src="http://www.minibb.com/forums/img/s.gif" style="width:12px;height:9px;padding-top:6px" alt="Author" /></td> <td rowspan="2" class="pauthor" style="width:15%"><span class="username">wilkinsmd</span><span class="txtSm"><br />Guest</span></td> <td class="txtSm" style="padding-left:3pt"><a id="msg39329" href="http://www.minibb.com/forums/msg.php?id=39329" class="txtSm" rel="nofollow">#3</a> <span class="sepr">|</span> Posted: 11 Nov 2014 15:02</td><td class="txtSm txtR"><script type="text/javascript">getQuotation('wilkinsmd', 2, 39329);</script><script type="text/javascript">getQuotation('wilkinsmd', 1, 39329);</script> </td> </tr> <tr><td class="caption1 tbCel1 postedTextCell" style="width:87%" colspan="2"><div class="postedText">I'm very happy to see this update, thanks.<br /><br />A question specifically related to photos/images...<br /><br />Previously, you set a size limit for images, and based on that limit you either allowed an upload or you rejected it. If you allowed it, the full image was stored on your server. A thumbnail was created for quick display but the full size image was still saved.<br /><br />With mobile devices creating larger and larger photos/image files, and I don't want to reject uploads when the user has little or no control over the file size, but I also don't want to use up all my server space storing all those large files.<br /><br />I'd like to see no size limit for images uploaded (well, maybe a very large limit like 10MB or 20MB), but then if it's larger than a certain size, for example 500KB or 1MB, the image gets resized automatically and the original upload is discarded, saving space on the server. I don't think it would be difficult to set a limit and if the upload is larger then reduce the dimensions and/or the image quality until it's below that size.<br /><br />If this capability is not in the new version, could you please point me to the appropriate location in the code where I could do some checking and reduce dimensions? Of course, would be happy to share results.<br /><br />Thanks<br />Mark</div></td></tr> </table> <br /><table class="forums"> <tr> <td rowspan="2" class="postedLeftCell"><img src="http://www.minibb.com/forums/img/s.gif" style="width:12px;height:9px;padding-top:6px" alt="Author" /></td> <td rowspan="2" class="pauthor" style="width:15%"><span class="username"><a href="http://www.minibb.com/forums/index.php?action=userinfo&user=9" title="Forums Profile for "Paul"" rel="nofollow">Paul</a></span><span class="txtSm"><br />Lead Developer</span></td> <td class="txtSm" style="padding-left:3pt"><a id="msg39333" href="http://www.minibb.com/forums/msg.php?id=39333" class="txtSm" rel="nofollow">#4</a> <span class="sepr">|</span> Posted: 13 Nov 2014 13:30</td><td class="txtSm txtR"><script type="text/javascript">getQuotation('Paul', 2, 39333);</script><script type="text/javascript">getQuotation('Paul', 1, 39333);</script> </td> </tr> <tr><td class="caption1 tbCel2 postedTextCell" style="width:87%" colspan="2"><div class="postedText">At first, uploaded file's size is limited in the generic PHP options, resp. <em>upload_max_filesize</em> and <em>max_file_uploads</em>. So whatever you may set in miniBB add-on, could be just lower than these options, or equal to them.<br /><br />In the current version of the add-on, there's an option called <em>$resizeBigPictures</em>. It operates on the width and height of the image and could resize an uploaded picture to new values. Not quite about what do you have in mind, but you may play with it at least.</div></td></tr> </table> <br /><table class="forums"> <tr> <td rowspan="2" class="postedLeftCell"><img src="http://www.minibb.com/forums/img/s.gif" style="width:12px;height:9px;padding-top:6px" alt="Author" /></td> <td rowspan="2" class="pauthor" style="width:15%"><span class="username"><a href="http://www.minibb.com/forums/index.php?action=userinfo&user=7792" title="Forums Profile for "samson"" rel="nofollow">samson</a></span><span class="txtSm"><br />Partaker</span></td> <td class="txtSm" style="padding-left:3pt"><a id="msg40573" href="http://www.minibb.com/forums/msg.php?id=40573" class="txtSm" rel="nofollow">#5</a> <span class="sepr">|</span> Posted: 8 Oct 2016 17:52</td><td class="txtSm txtR"><script type="text/javascript">getQuotation('samson', 2, 40573);</script><script type="text/javascript">getQuotation('samson', 1, 40573);</script> </td> </tr> <tr><td class="caption1 tbCel1 postedTextCell" style="width:87%" colspan="2"><div class="postedText">Thank you for that update</div></td></tr> </table> <br /> <table><tr><td> <input type="hidden" name="action" value="delmsg" /> <input type="hidden" name="page" value="1" /> <input type="hidden" name="forum" value="9" /> <input type="hidden" name="topic" value="6421" /> <input type="hidden" name="csrfchk" value="" /> </td></tr></table> </form> <table class="forums"> <tr> <td class="icon"><img src="http://www.minibb.com/forums/img/forum_icons/red.gif" style="width:16px;height:16px;vertical-align:middle" alt="News & Announcements" title="News & Announcements" /></td> <td class="caption3"><a href="http://www.minibb.com/forums/">miniBB Support Forums</a> / <a href="http://www.minibb.com/forums/news-9/">News & Announcements</a> / File Uploads & Photo Albums add-ons updated</td> <td class="caption3 txtR noWrap">↑ <span class="txtSm"><a href="#top" rel="nofollow">Top</a></span></td> </table> <script type="text/javascript"> <!-- var l_accessDenied="Sorry! You are not granted to do this."; var tlength=2; var anonPost=1; //--> </script> <form id="postMsg" action="http://www.minibb.com/forums/index.php?" method="post" class="formStyle"> <table class="tbTransparent"> <tr><td class="caption3"><a id="newreply"></a><h1 class="headingTitle">Your Reply <a href="JavaScript:getToPost();"><img src="http://www.minibb.com/forums/img/up.gif" style="width:8px;height:8px" alt="Click this icon to move up to the quoted message" title="Click this icon to move up to the quoted message" /></a></h1></td></tr> <tr> <td class="tbTransparent txtL vmiddle"> <table style="width:100%"><tr><td> <script type="text/javascript"> <!-- var enterSubject='Please, enter Subject!'; var enterMessage='Please, enter Message!'; var enterLogin='Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.'; //--> </script> <script type="text/javascript"> <!-- document.write('<a'+' h'+'re'+'f="JavaScript:paste_strinL(selektion,3,\'[b]\',\'[/b]\',\'\')" onmouseover="window.status=\'BB code for the Bold Style\'; return true" onmouseout="window.status=\'\'; return true" onmousemove="pasteSel()"><img src="http://www.minibb.com/forums/img/button_bold.gif" style="width:22px;height:22px" alt="BB code for the Bold Style" title="BB code for the Bold Style" /></'+'a'+'>  <a'+' h'+'re'+'f="JavaScript:paste_strinL(selektion,3,\'[i]\',\'[/i]\',\'\')" onmouseover="window.status=\'BB code for the Italic Style\'; return true" onmouseout="window.status=\'\'; return true" onmousemove="pasteSel()"><img src="http://www.minibb.com/forums/img/button_italic.gif" style="width:22px;height:22px" alt="BB code for the Italic Style" title="BB code for the Italic Style" /></'+'a'+'>  <a'+' h'+'re'+'f="JavaScript:paste_strinL(\'\',3,\'[imgs=\'+prompt(\'URL:\',\'http://www.minibb.com/forums\'+\'/img/p.gif\')+\']\',prompt(\'Describe%20this%20picture:\',\'\')+\'[/imgs]\',\'\')" onmouseover="window.status=\'BB Code for the Picture\';return true" onmouseout="window.status=\'\';return true"><img src="http://www.minibb.com/forums/img/button_image.gif" style="width:22px;height:22px" alt="BB Code for the Picture" title="BB Code for the Picture" /></'+'a'+'>  <a'+' h'+'re'+'f="JavaScript:paste_strinL(selektion,4,\'[url=\'+prompt(\'URL:\',\'http://www.minibb.com/forums\'+\'/\')+\']\',\'[/url]\',\'\')" onmouseover="window.status=\'BB code for the URL\'; return true" onmouseout="window.status=\'\'; return true" onmousemove="pasteSel()"><img src="http://www.minibb.com/forums/img/button_url.gif" style="width:22px;height:22px" alt="BB code for the URL" title="BB code for the URL" /></'+'a'+'>  <img src="http://www.minibb.com/forums/img/button_upload.gif" style="width:23px;height:22px" onclick="JavaScript:storagePopUp();" alt="Upload a File" title="Upload a File" />  '); //--> </script> </td> <td class="noWrap txtR"> <span class="txtSm" style="color:#9D9D98"><b>Short link for this topic:</b> <input type="text" name="relcode" id="relcode" style="width:240px;height:15px;font-size:10px;border:1px solid #DBDBDB;color:#9D9D98" onclick="javascript:document.forms['postMsg'].elements['relcode'].focus();document.forms['postMsg'].elements['relcode'].select();" readonly="readonly" value="http://www.minibb.com/forums/9_6421_1.html" /></span></td> </tr></table> </tr> <tr> <td class="tbTransparent txtL subjectPad"> <textarea name="postText" id="postText" class="textForm postingForm" tabindex="2"></textarea> <br /> </td> </tr> <tr><td class="tbTransparent txtL pformBottom"><script type="text/javascript"> <!-- function handleEnter(e) { var keynum; // IE if(window.event) keynum=e.keyCode; // Netscape/Firefox/Opera else if(e.which) keynum = e.which; if(keynum==13){ if(document.forms['login']) document.forms['login'].submit(); else if(document.forms['postMsg']) submitForm(); } return keynum; } //--> </script> <input type="text" size="18" maxlength="15" name="user_usr" value="" class="textForm" style="vertical-align:middle" tabindex="3" placeholder="Username" /> <input type="password" size="18" maxlength="32" name="user_pwd" class="textForm" style="vertical-align:middle" tabindex="4" onkeydown="JavaScript:handleEnter(event);" placeholder="Password" autocomplete="off" /> <sup class="capMenu"><a href="http://www.minibb.com/forums/index.php?action=sendpass" rel="nofollow">?</a></sup> <input type="hidden" name="mode" value="login" /> <input type="hidden" name="queryStr" value="action=vthread&forum=9&topic=6421&page=1&mdrw=on" /> <span class="txtSm"><br />You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.</span> <span class="txtSm"><br /><br /><strong>Before posting, make sure your message is compliant with our <a href="http://www.minibb.com/forums/7_843_0.html" target="_blank">forum posting rules</a>. If not, it may be locked or deleted with no explanation.</strong></span></td></tr> <tr> <td class="tbTransparent txtL"> <script type="text/javascript"> <!-- document.write('<input type="button" name="subbut" value="Sign in/Post Message" class="inputButton" tabindex="5" onclick="submitForm();" />'); //--> </script> <noscript><input type="submit" value="Sign in/Post Message" class="inputButton" tabindex="5" /></noscript> <input type="hidden" name="action" value="pthread" /> <input type="hidden" name="forum" value="9" /> <input type="hidden" name="topic" value="6421" /> <input type="hidden" name="anchor" value="" /> </td> </tr> </table> </form> <table class="tbTransparent"> <tr><td class="tbTransparentCell">  </td></tr> </table> <table class="tbTransparentmb"><tr><td class="tbTransparentCell"> <form action="http://www.minibb.com/forums/index.php?" method="get" class="formStyle"> <input type="hidden" name="action" value="vtopic" /> <select name="forum" class="selectTxt vmiddle" style="width:200pt"> <optgroup label="Main Forums"><option selected="selected" value="9">News & Announcements</option> <option value="7">FAQ</option> <option value="2">How To</option> <option value="3">Bugs</option> <option value="1">The Other</option> </optgroup><optgroup label="Coding Forums"><option value="11">Official Addons and Solutions</option> <option value="12">Custom Tutorials and Modifications</option> <option value="5">Master Class</option> </optgroup><optgroup label="Additional Forums"><option value="20">Specific</option> <option value="19">Re-cycled</option> </optgroup><optgroup label="Feedback Forums"><option value="4">Suggestions</option> <option value="8">Testimonials</option> </optgroup><optgroup label="Blogs"><option value="21">2014</option> </optgroup><optgroup label="Test Forums"><option value="6">qwerty</option> </optgroup> </select> <input type="submit" value="Switch Forum" class="inputButton vmiddle" /> </form> </td> <td class="txtR noWrap"></td> </tr></table> <script type="text/javascript"> <!-- if(document.forms['postMsg']) document.forms['postMsg'].elements['subbut'].disabled=false; //--> </script> <table class="tbTransparent"> <tr> <td style="width:3%;padding-right:7pt"><!--miniBB Copyright link. You are not allowed to remove it if you have not purchased the Commercial License. Refer to COPYING file for more--><a href="http://www.minibb.com/" target="_blank"><img src="http://www.minibb.com/forums/img/minibb.png" alt="miniBB Support Forums Powered by Forum Software miniBB ®" title="miniBB Support Forums Powered by Forum Software miniBB ®" /></a><!--End of copyright link--></td> <td class="noWrap txtL" style="width:70%;vertical-align:top"><span class="txtSm"><a href="http://www.minibb.com/features.html" title="miniBB Forum Software Features">Features</a>  <a href="http://www.minibb.com/require.html" title="miniBB Forum Script Requirements">Requirements</a>  <a href="http://minibb.org" target="_blank" title="miniBB Forums Demo - Full Mode with Add-ons" class="specialMenu">Demo</a>  <a href="http://www.minibb.com/download.html" title="Forum Program and Plug-ins - Download for Free!">Download</a>  <a href="http://www.minibb.com/sites.html" title="miniBB Forums Worldwide Showcase">Showcase</a>  <a href="http://www.minibb.com/gallery.html" title="The Gallery of miniBB Arts and Design Layouts">Gallery of Arts</a> <br /> <a href="http://www.minibb.com/com.html" title="miniBB Compiler" class="specialMenu">Compiler</a>  <a href="http://www.minibb.com/paid_addons.html" title="Premium Extensions and Add-ons for Your miniBB Forum" class="specialMenu">Premium Extensions</a>  <a href="http://www.minibb.com/paid_support.html" title="Elite Support for Forum Administrators and Customers">Premium Support</a>  <a href="http://www.minibb.com/commercial_license.html" title="miniBB Commercial License and Attribution Link Removal">License</a>  <a href="http://www.minibb.com/contacts.html">Contacts</a></span></td> <td><table style="width:350px;height:30px;margin-right:15px"><tr><td class="txtC"><div class="txtSm" style="color:red;display:block;line-height:15px;cursor:pointer" onclick="javascript:window.location='http://www.minibb.com/captcha.html';">Get the <a href="http://www.minibb.com/captcha.html" target="_blank" style="color:#002244">Captcha add-on</a>: protect your miniBB-forums from the automated spam and flood.</div></td><td><a href="http://www.minibb.com/captcha.html" target="_blank"><img src="http://www.minibb.com/forums/img/ads/new/captcha.png" style="width:16px;height:16px;border:0px;vertical-align:middle;" alt="Captcha Addon for miniBB" title="Captcha Addon for miniBB" /></a></td></tr></table></td> </tr> </table> <table class="tbTransparent"><tr><td></td></tr></table> </body> </html>