Sidebar links & images
Hi,
Yes edit the about plugin in backend, you can change the title and content
Yes edit the about plugin in backend, you can change the title and content
╰☆╮Bludit╰☆╮ is a open source and community contributions are essential to project success!
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
If you use the plugin "About" the characters for < and > have to be converted when they are used for an html tag.
You can modify the file plugin.php as follows:
You can modify the file plugin.php as follows:
Code: Select all
public function siteSidebar()
{
$about = $this->getDbField('text');
$about = htmlspecialchars_decode($about);
echo $about;
$html = '<div class="plugin plugin-about">';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$html .= nl2br($about);
$html .= '</div>';
$html .= '</div>';
return $html;
}
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
- abdulhalim
- Master Bludit
- Posts: 128
- Joined: Thu Mar 10, 2016 6:25 pm
- Location: Bandar Abbas
- Been thanked: 4 times
- Contact:
Thank you Edi ,
This was my question too , today i was struggling with my question but this solution has a problem , at least for me , it duplicates the content , image or text will show twice
This was my question too , today i was struggling with my question but this solution has a problem , at least for me , it duplicates the content , image or text will show twice
- abdulhalim
- Master Bludit
- Posts: 128
- Joined: Thu Mar 10, 2016 6:25 pm
- Location: Bandar Abbas
- Been thanked: 4 times
- Contact:
I remove echo $about ; , now it's working perfectly ... Thank you Edi
Code: Select all
<?php
class pluginAbout extends Plugin {
public function init()
{
$this->dbFields = array(
'label'=>'About',
'text'=>''
);
}
public function form()
{
global $Language;
$html = '<div>';
$html .= '<label>'.$Language->get('Plugin label').'</label>';
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$Language->get('About').'</label>';
$html .= '<textarea name="text" id="jstext">'.$this->getDbField('text').'</textarea>';
$html .= '</div>';
return $html;
}
public function siteSidebar()
{
$about = $this->getDbField('text');
$about = htmlspecialchars_decode($about);
$html = '<div class="plugin plugin-about">';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$html .= nl2br($about);
$html .= '</div>';
$html .= '</div>';
return $html;
}
}
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
Oops, sorry, I added the echo for test purposes and forgot to delete it!
P. S. No comment about the test image.
P. S. No comment about the test image.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
- abdulhalim
- Master Bludit
- Posts: 128
- Joined: Thu Mar 10, 2016 6:25 pm
- Location: Bandar Abbas
- Been thanked: 4 times
- Contact: