0

Unable to upload images to phpBB posts

Wednesday, November 7, 2007

The issue is mainly occurring due to the absence of some code. To fix this issue, do the following:

"cd" into the corresponding directory of phpBB.

Create a file "addform.html" with the following content:







Change the ownerwship of the file according to the need (ie. cpanel -> username:nobody).

Take a backup of the file "includes/template.php"

In the 265 line of ./includes/template.php you can fine the following code:
$str = implode("", @file($filename));

if (empty($str))
{

die("Template->loadfile(): File $filename for handle $handle is empty");
}

Add the following code below it:
if(basename($filename) === 'posting_body.tpl')

{

$str = str_replace('', '
Add image to post', $str);

}

This will add the image upload facility in the phpBB posts.

0 Responses to "Unable to upload images to phpBB posts"