mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 03:23:40 +00:00
pageheader plugin now allows to use a html file for pageheader
This commit is contained in:
parent
76dd616a5c
commit
868de2dc78
3 changed files with 9 additions and 2 deletions
BIN
pageheader.tgz
BIN
pageheader.tgz
Binary file not shown.
|
@ -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.
|
||||
|
|
|
@ -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 != '')
|
||||
|
|
Loading…
Reference in a new issue