<?php
if (!function_exists("img_bbcode_callback")) {
function img_bbcode_callback($matches)
{
if (substr($matches[3], -1, 1) != "/") {
$avdata = @getimagesize("$matches[1]$matches[3]$matches[4]");
if (isset($avdata["mime"])) {
return "<span style='display: block; max-width: 300px; max-height: 300px; overflow: auto;' class='forum-img-wrapper'><img src='".$matches[1].str_replace(array("?","&","&","="), "", $matches[3]).$matches[4]."' alt='".$matches[3].$matches[4]."' style='border:0px' class='forum-img' /></span>";
} else{
return "[img]$matches[1]$matches[3]$matches[4][/img] is not a valid Image.";
}
} else {
return "[img]$matches[1]$matches[3]$matches[4][/img] is not a valid Image.";
}
// End of BBCode IMG tag patch by Euforia33
}
}
$text = preg_replace_callback("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#si", "img_bbcode_callback", $text);
?>
Quote
Domi wrote:
You seem to be missing some settings tables in your MySQL tables.
I guess you have been missing some version numbers in your upgrade series.
The best and easy way to fix it is to make a mysql copy of your database.
make a new PHPFusion base installation and import the data again.
INSERT INTO fusion_settings
VALUES ('multiple_logins', '0');
INSERT INTO fusion_settings
VALUES ('comments_avatar', '1');
$avdata = @getimagesize("$matches[1]$matches[3]$matches[4]");
if (isset($avdata["mime"]))
Quote
Wanabo wrote:
Ok found a solution!
Open img_bbcode_include.php
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]// $avdata = @getimagesize("$matches[1]$matches[3]$matches[4]");
$avdata = $matches[4]; // Fix Wanabo
[/syntaxhighlighter]
Make it like the above. Now its working.
$matches[4] is the image extension and the extension should be in mimtypes_include.php.
Like the way it was this will never happen.
Category Forum
Upgrading issues - 8Labels
None yet
Statistics
8 participants
Notifications
You are not receiving notifications from this thread.
Related Questions