miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

File Upload Add On Error Message Pop Up HTML Background Page

Author Jukkis
Registered
#1 | Posted: 30 Dec 2014 14:35 
I have installed File Upload add on to the miniBB and it works fine. When I try to attach file types and sizes that not allowed, the system correctly raises error message saying "Files were not upload...etc", but unfortunately the background content for this message is the "raw header file".

I am including the miniBB forum using the following code. The reason most likely is that Javascript pops up the message before the whole page loads on the background, but what is the fix? Any ideas to create the error message after loading the forum? Have tried include the header on the buffer before the "forum_root.php" without any luck.

<?php
ob_start();
// include ('header.php');
include ('forum_root.php');
$flushed=ob_get_contents();
ob_end_clean();

/* Output your header here */
include 'header.php';

echo $flushed;

/* Output your footer here */
include $_SERVER['DOCUMENT_ROOT'].'/common/footer.php';
?>

Author Paul
Lead Developer
#2 | Posted: 1 Jan 2015 21:35 
First of all, it's not very clear why should you use the ob_start and the other approaches of code you are using. I'm mostly sure miniBB could be embedded using its own default methods (for example, for the footer part I clearly see it could be done using $includeFooter definition of miniBB settings).

Second, whatever I could say at the moment, is that miniBB pops up the JS alert after uploading the "wrong" file, and this happens in the code of bb_plugins2.php part. You may study it and disable or modify this code.

Author Jukkis
Registered
#3 | Posted: 2 Jan 2015 17:37 
Thank you - will try to debug.

I used ob-start because it was recommended in the manual. The below is an extract of the example from the Manual

<?php

ob_start();

include ('./index.php');

$flushed=ob_get_contents();
ob_end_clean();

/* Output your header here */
echo 'header';

echo $flushed;

/* Output your footer here */
echo 'footer';

?>

Author Paul
Lead Developer
#4 | Posted: 4 Jan 2015 13:34 
In the Manual, there is provided an example for basic miniBB version only, and it's a very rough and simple example.

Honestly speaking, I didn't test it with File Uploads add-on and regarding its errors coming up, so depending on the code you may have in your own header/footer file, they may have a different behavior regarding this code. Right now I couldn't debug it with the code provided, but I could try in a few days and then come up with more detailed report.

Specific miniBB Support Forums / Specific / File Upload Add On Error Message Pop Up HTML Background Page Top

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

 Short link for this topic:

 ?
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.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB