From c111704f8cd78cf0decbf3d0764bf39b815f1a39 Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Tue, 13 Feb 2018 14:46:06 +0100 Subject: [PATCH] Auto add link to contact page if contact.php exist --- .gitignore | 3 +++ plugins/myShaarli/myShaarli.php | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index e9a983d..dc05c17 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ tpl/* !tpl/default !tpl/vintage !tpl/myShaarli + +contact.php +formStyle.css diff --git a/plugins/myShaarli/myShaarli.php b/plugins/myShaarli/myShaarli.php index bc72b89..96fac2d 100644 --- a/plugins/myShaarli/myShaarli.php +++ b/plugins/myShaarli/myShaarli.php @@ -61,6 +61,17 @@ function hook_myShaarli_render_linklist($data,$conf) return $data; } +/** + * Hook render_footer. + */ +function hook_myShaarli_render_footer($data) +{ + if(file_exists('contact.php')){ + $data['text'][] = '
MyShaarli is a fork of Shaarli.Contact'; + } + return $data; +} + /** * NOT WORKING * To poor performance