Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: is not a valid Image

Parašė ptaha525· 2015 Lie. 24 13:07:05
#1

Sveiki, tiek forume kuriant nauja tema tiek naujienose prideti bent kokio formato paveksliukus gaunu toki dalyka gal zinot kaip fix ? php fusion versija v7.02.07

[img ]https://webdnd.com/themes/Renewed/images/spacer.gif[/img ] is not a valid Image.

nepadejo>https://www.php-fusion.co.uk/forum/viewthread.php?thread_id=32906

Redagavo ptaha525· 2015 Lie. 24 13:07:03

Parašė Faraonas· 2018 Rugp. 18 23:08:11
#2

Atsidarote includes/bbcodes/img_bbcode_include.php ir pakeičiate viską šiuo kodu:


<?php
/*---------------------+
| dont worry, be happy |
+---------------------*/
 
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
if (!function_exists("img_bbcode_callback")) {
   function img_bbcode_callback($matches) {
      if (substr($matches[3], -1, 1) != "/") {
         return "<span style='display: block; width: 300px; max-height: 300px; overflow: auto;' class='forum-img-wrapper'><img src='".$matches[1].str_replace(array("?","&amp;","&","="), "", $matches[3]).$matches[4]."' alt='".$matches[3].$matches[4]."' style='border:0px' class='forum-img' /></span>";
      } else {
         return $matches[0];
      }
   }
}
 
$text = preg_replace_callback("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#si", "img_bbcode_callback", $text);
?>