diff --git a/serendipity_event_disqus/ChangeLog b/serendipity_event_disqus/ChangeLog new file mode 100644 index 00000000..1a60c3d6 --- /dev/null +++ b/serendipity_event_disqus/ChangeLog @@ -0,0 +1,3 @@ +Version 0.2 +* Made it work with articles not having an extended part. +* Made trackbacks visible again (for templates supporting it), css class to be hidden configurable now. \ No newline at end of file diff --git a/serendipity_event_disqus/lang_en.inc.php b/serendipity_event_disqus/lang_en.inc.php index b61730f7..3947cdd4 100644 --- a/serendipity_event_disqus/lang_en.inc.php +++ b/serendipity_event_disqus/lang_en.inc.php @@ -1,21 +1,17 @@ add('name', PLUGIN_DISQUS_TITLE); $propbag->add('description', PLUGIN_DISQUS_DESC); $propbag->add('stackable', false); - $propbag->add('author', 'Garvin Hicking'); + $propbag->add('author', 'Garvin Hicking, Grischa Brockhaus'); $propbag->add('requirements', array( 'serendipity' => '0.7', 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '0.1'); + $propbag->add('version', '0.2'); $propbag->add('groups', array('FRONTEND_VIEWS')); $propbag->add('event_hooks', array( 'frontend_display:html:per_entry' => true, - 'entries_footer' => true + 'entries_footer' => true, + 'entry_display' => true )); - $propbag->add('configuration', array('shortname', 'enable_since')); + $propbag->add('configuration', array('shortname', 'enable_since','template_hide_css','footer_comment_link')); } function introspect_config_item($name, &$propbag) { global $serendipity; switch($name) { - /* - plugin_display_dat - $TRACKBACKS - $COMMENTS - $COMMENTFORM - */ case 'enable_since': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_DISQUS_ENABLE_SINCE); @@ -60,7 +55,19 @@ class serendipity_event_disqus extends serendipity_event { $propbag->add('description', PLUGIN_DISQUS_SHORTNAME_DESC); $propbag->add('default', ''); break; - + case 'template_hide_css': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_DISQUS_HIDE_COMMENTCSS); + $propbag->add('description', PLUGIN_DISQUS_HIDE_COMMENTCSS_DESC); + $propbag->add('default', 'serendipity_section_comments,serendipity_section_commentform'); + break; + case 'footer_comment_link': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_DISQUS_FOOTERCOMMENTLINK); + $propbag->add('description', PLUGIN_DISQUS_FOOTERCOMMENTLINK_DESC); + $propbag->add('default', 'false'); + break; + } return true; @@ -74,7 +81,7 @@ class serendipity_event_disqus extends serendipity_event { echo nl2br(PLUGIN_DISQUS_DESC2); } - function event_hook($event, &$bag, &$eventData, &$addData) { + function event_hook($event, &$bag, &$eventData, &$addData = null) { global $serendipity; $hooks = &$bag->get('event_hooks'); @@ -83,6 +90,10 @@ class serendipity_event_disqus extends serendipity_event { switch($event) { case 'entries_footer': + $putFooterLink = $this->get_config('footer_comment_link', false); + // If we don't have a DISQUSfied footer, the JS is of no sense. + if (!$putFooterLink) return true; + ?>