pageheader plugin now allows to use a html file for pageheader

This commit is contained in:
hauke 2015-05-13 22:51:00 +02:00
parent 76dd616a5c
commit 868de2dc78
3 changed files with 9 additions and 2 deletions

Binary file not shown.

View File

@ -4,4 +4,5 @@ For server admins only.
Displays a text message for system announcements'
The message is entered in the admin account at settings, Plugin settings.
BBcode can be used to format text or add links.
If you want to use HTML in the pageheader, create a file called pageheader.html
in the document root of your friendica instance and add the html there.

View File

@ -75,10 +75,16 @@ function pageheader_addon_settings_post(&$a,&$b) {
}
function pageheader_fetch($a,&$b) {
if(file_exists('pageheader.html')){
$s = file_get_contents('pageheader.html');
} else {
$s = get_config('pageheader', 'text');
}
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
. $a->get_baseurl() . '/addon/pageheader/pageheader.css' . '" media="all" />' . "\r\n";
$s = proxy_parse_html(bbcode(get_config('pageheader', 'text'), true));
if(! $s)
$s = '';
if ($s != '')