miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

File Bank

 
 
Page  Page 4 of 5:  « Previous  1  2  3  4  5  Next »

Author Steve Shaw
Partaker
#46 | Posted: 13 Nov 2018 00:30 
Hi Paul - there is no 'REF' line.
No other text at all...

Steve

Author Paul
Lead Developer 
#47 | Posted: 13 Nov 2018 00:45 
It seems this error message (without REF) is displayed only in one case - when no file has been uploaded at all, i.e. this code is FALSE:

if(isset($_FILES['userfile']['name']) and is_uploaded_file($_FILES['userfile']['tmp_name']))
For me it's hard to say why it happens with no additional information; but definitely you need to debug the script before this line to see what actually happens with your file, and specially, with $_FILES['userfile'] array.

Author Steve Shaw
Partaker
#48 | Posted: 13 Nov 2018 01:28 
Unfortunately, that's way beyond my pay-grade...
Pictures upload ok - and pdfs used to upload too.
I've changed nothing, so I expect a change in our hosting server?
But, I have no idea what...

Steve

Author Paul
Lead Developer 
#49 | Posted: 13 Nov 2018 18:23 
Steve Shaw:
I've changed nothing, so I expect a change in our hosting server?
I couldn't be sure on it without knowing debugging results.

Author Paul
Lead Developer 
#50 | Posted: 15 Nov 2018 20:14 
Update to the issue described above: I've investigated it on the paid support basis, and discovered that PDF files is not truly the issue here. Uploading a small size PDF went fine, so it was only about PDF file which was about 3.2 Mbytes in size. I've went to PHP info which could be easily produced as:

<?php
phpinfo();
?>
and there it's easy to find 2 major settings which define file uploads:

upload_max_filesize - which has been set just to 2 Mbytes;
post_max_size - which has been to 8 Mbytes.

So, before setting up the max.sizes in the File Bank add-on, at first you should always refer to those settings. These settings are server-wide, and they couldn't be changed from a PHP script. That means, if in the PHP script you set the max.uploaded size to 5 Mb, but upload_max_filesize is equal to 2 Mb, and you upload the file which is 3,2 Mb, the file won't be uploaded; and that is, you'll get no infos on it (that's why no REF message is provided in the File Bank).

Only increasing upload_max_filesize in php.ini on the server makes the bigger files truly allowed for upload. And then, you could rely on this setting to adjust options for max.sizes in the File Bank add-on (as well, in the File Attachments add-on, too).

Also, keep in mind that post_max_size, which defines the total size of the post data sent, incl. texts, descriptions, titles, hidden vars and so on, should always be relatively bigger than upload_max_filesize.

Author Steve Shaw
Partaker
#51 | Posted: 1 Mar 2022 21:29 
Hi Paul — been reading the user guides, but can't see the answer to this.

To keep things looking consistent, can I force Upload Files to default to using the thumbnail option?
(Obviously this is specifically for pictures.)
And will that force the set size only if the picture being attached is larger than the set thumbnail size?
(So not up-size a smaller picture.)

Steve

Author Paul
Lead Developer 
#52 | Posted: 2 Mar 2022 17:03 
Steve Shaw:
To keep things looking consistent, can I force Upload Files to default to using the thumbnail option?
I suppose, you mean the File Bank? And this form below:

File Bank form — Thumbnail Checkbox

And you'd like the checkbox on the screen always checked by default, correct?

If so, you have to modify /templates/addon_storage_fileform.html and instead of {$cthumbChecked}, put this: checked="checked".

Yes, this box acts for pictures only. Even if you upload any other binary file, it won't be applied — or at least it shouldn't...

Steve Shaw:
And will that force the set size only if the picture being attached is larger than the set thumbnail size?
That's correct, the resizing action is applied only to pictures having bigger dimensions than defined.

Author Steve Shaw
Partaker
#53 | Posted: 25 Jul 2022 16:34 
Hi Paul — how can I have the 'create a thumbnail' option enabled by default?

Create thumbnail

Author Steve Shaw
Partaker
#54 | Posted: 25 Jul 2022 16:56 
I thought it would be — $thumbnailDefaultChecked=TRUE; — in — addon_storage_options.php — but that doesn't work...

Steve

Author Paul
Lead Developer 
#55 | Posted: 25 Jul 2022 20:11 
Hey Steve,

thanks for this report.

Steve Shaw:
I thought it would be — $thumbnailDefaultChecked=TRUE; — in — addon_storage_options.php — but that doesn't work
It appears to be the mystery option indeed :) seems to be present in the config file, but it's nowhere present in the script.

Obviously I didn't implement it because putting the checked box by default is quite simple: somewhere in bb_plugins.php (right after the opening <?php tag or right after the /* Storage addon */ comment code) try to paste the following:

if($action=='storage') $cthumbChecked='checked="checked"';
I'll keep it in my notes and in the next version of this add-on will implement the option itself.

Author Steve Shaw
Partaker
#56 | Posted: 25 Jul 2022 20:44 
Hi Paul,

I tried this

/* Storage addon */

if($action=='storage') $cthumbChecked='checked="checked"';

/* if you would like to enable access to storage for registered users only, uncomment the code line below */
//if($user_id>0){
Unfortunately, it doesn't work...

Steve

Author Steve Shaw
Partaker
#57 | Posted: 25 Jul 2022 20:54 
Ah!

I had to modify:

/templates/addon_storage_fileform.html and instead of {$cthumbChecked}, put this: checked="checked".
As you mentioned above...

Steve

Author Paul
Lead Developer 
#58 | Posted: 26 Jul 2022 12:12 
Yes, this or that would work by now.

Author Steve Shaw
Partaker
#59 | Posted: 1 Aug 2022 20:38 
Hi Paul — can I make the File Bank link in the Main Header only visible for Admin/Moderators?

I have searched for the info, but have not been able to find anything...

Steve

Author Paul
Lead Developer 
#60 | Posted: 1 Aug 2022 21:15 
Steve Shaw:
can I make the File Bank link in the Main Header only visible for Admin/Moderators?
It's quite possible — you have to modify bb_plugins.php — make sure you have backed it up and use the original file from the live server ;)

For the File Bank top link you have this code:

//if($user_id>0) {
if(!isset($l_menuFileBank)) $l_menuFileBank='File Bank';
if(!$is_mobile) $storageLink="<a href=\"{$main_url}/{$indexphp}action=storage\" class=\"mnblnk\">{$l_menuFileBank}</a> {$l_sepr} ";
else $storageLink="<option value=\"{$main_url}/{$indexphp}action=storage\">{$l_menuFileBank}</option>";
//}
//else $storageLink='';
Remove all double slashes in front of code strings, and change the condition, so the code becomes like this:

if($logged_admin==1) {
if(!isset($l_menuFileBank)) $l_menuFileBank='File Bank';
if(!$is_mobile) $storageLink="<a href=\"{$main_url}/{$indexphp}action=storage\" class=\"mnblnk\">{$l_menuFileBank}</a> {$l_sepr} ";
else $storageLink="<option value=\"{$main_url}/{$indexphp}action=storage\">{$l_menuFileBank}</option>";
}
else $storageLink='';

Page  Page 4 of 5:  « Previous  1  2  3  4  5  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 File Bank
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑