miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

File Upload Add On Error Message Pop Up HTML Background Page

 
Author Jukkis
Partaker
#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
Partaker
#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
 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.


  ⇑