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.
Not a member yet? Click here to register.
Forgot Password?

No graphics are displayed in my plugin

Asked Modified Viewed 892 times
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
asked
Senior Member

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
<?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.
0 replies

4 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

Instead parse_textarea() use htmlspecialchars_decode()
0 replies
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
answered
Senior Member

I did it like that wink
html_entity_decode(stripslashes($data['podsu_nametekst']))
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

echo $data['podsu_tempmax'];
has no parse_textarea. :)



It is documented


//https://github.com/PHPFusion/PHPFusion/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.
0 replies
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
answered
Senior Member

like
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
D
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet