Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

No graphics are displayed in my plugin

I wrote my own plugin and I add new messages and pictures via form_textarea.

i.postimg.cc/fbz7tdFM/1.png

The pictures are on the server and the path is good. But instead of a picture on the site, I have only this

i.postimg.cc/yNLmFd4c/2.png

This is the code for displaying the panel
CodeDownload  
<?php
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."podsumowania_panel/infusion_db.php";
if (file_exists(INFUSIONS."podsumowania_panel/locale/".$settings['locale'].".php")) {
 include INFUSIONS."podsumowania_panel/locale/".$settings['locale'].".php";
 } else {
 include INFUSIONS."podsumowania_panel/locale/English.php";
}

$result = dbquery(
   "SELECT d.*, u.user_id, u.user_name, u.user_status, u.user_avatar
   FROM ".DB_PODSUMOWANIA." d
   LEFT JOIN ".DB_USERS." u ON u.user_id=d.user
   WHERE podsu_id='".$_GET['podsu_id']."' LIMIT 1");
if(dbrows($result)) {
   while($data = dbarray($result)) {
   echo '<ol class="breadcrumb">
          <li><a href="glowna.php">Home</a></li>
 <li><a href="podsumowania.php">Dane klimatyczne</a></li>';
          echo "<li class='active'>".$data['podsu_name']."</li>";
         echo '</ol>';   
         
echo '<div class="row">';
 echo '<div class="col-md-12">';
echo '<div class="row">';
      echo "<div class='col-md-12'>";
         echo "<h3>".parse_textarea($data['podsu_name'])."</h3>";
      echo "</div>";
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<p>".parse_textarea($data['podsu_nametekst'])."</p>";
      echo "</div>";
      echo "<div>";
      echo "<div class='col-md-6'>";
         echo "<h3>Temperatura max</h3>";
         echo $data['podsu_tempmax'];
         //echo "<p>".$data['podsu_tempmax']."</p>";
      echo "</div>";
      echo "<div class='col-md-6'>";
         echo "<h3>Temperatura min</h3>";
         echo "<p>".$data['podsu_tempmin']."</p>";
      echo "</div>";
      echo "</div>";
      
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<h3>Opady</h3>";
         echo $data['podsu_opady'];
      echo "</div>";
      
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<h3>Wiatr</h3>";
         echo "<p>".parse_textarea($data['podsu_wiatr'])."</p>";
      echo "</div>";
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<h3>Burze</h3>";
         echo "<p>".parse_textarea($data['podsu_burze'])."</p>";
      echo "</div>";
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<h3>Raporty</h3>";
         echo "<p>".parse_textarea($data['podsu_raporty'])."</p>";
      echo "</div>";
      echo "<div class='col-md-12'>";
      echo "<hr>";
         echo "<h3>Ostrze┼╝enia</h3>";
         echo "<p>".parse_textarea($data['podsu_ostrzezenia'])."</p>";
      echo "</div>";
echo '</div>';      
   }
}
 echo '</div>';
 echo '</div>';
require_once THEMES."templates/footer.php";
?>


Please, give me a mistake and how to fix it.
Instead parse_textarea() use htmlspecialchars_decode()
I did it like that wink
html_entity_decode(stripslashes($data['podsu_nametekst']))
CodeDownload  
echo $data['podsu_tempmax'];

has no parse_textarea. :)



It is documented

CodeDownload  

//https://github.com/php-fusion/PHP-Fusion/blob/Andromeda-9.0.3/includes/core_functions_include.php#L570-L593

/**
 * Interpret output to match input of textarea having both bbcode, html and tinymce buttons
 *
 * @param $text
 * @param bool|TRUE $smileys
 * @param bool|TRUE $bbcode
 * @param bool|TRUE $decode
 * @param string $default_image_folder
 * @param bool|FALSE $add_line_breaks
 *
 * @return string
 */
function parse_textarea($text, $smileys = TRUE, $bbcode = TRUE, $decode = TRUE, $default_image_folder = IMAGES, $add_line_breaks = FALSE) {
 $text = $decode == TRUE ? html_entity_decode(stripslashes($text), ENT_QUOTES, fusion_get_locale('charset')) : $text;
 $text = $decode == TRUE ? html_entity_decode($text, ENT_QUOTES, fusion_get_locale('charset')) : $text; // decode for double encoding.
 $text = !empty($default_image_folder) ? parse_imageDir($text, $default_image_folder) : $text;
 $text = $smileys == TRUE ? parsesmileys($text) : $text;
 $text = $bbcode == TRUE ? parseubb($text) : $text;
 $text = fusion_parse_user($text);
 $text = $add_line_breaks ? nl2br($text) : $text;
 $text = descript($text);
 return (string)$text;
}



It might contain a lot of algorithm, but it has everything under one function to solve it quickly.
like
Thread Information
Author
Replies
5 posts
Views
470 times
Last Post
Last updated on 2 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Chan, djdandi, RobiNN