additional_plugins/serendipity_event_guestbook
2021-07-12 15:44:23 +02:00
..
img Migrate plugins 2011-12-13 12:29:05 +01:00
UTF-8 [event_guestbook] Translation fixes. 2019-08-17 22:39:35 +02:00
.htaccess testrun for tomorrow, try to actually allow .htaccess on mirror http servers 2013-05-21 08:48:11 +02:00
ChangeLog updated plugin versions 2021-07-12 15:44:23 +02:00
documentation_cs.html Migrate plugins 2011-12-13 12:29:05 +01:00
documentation_cz.html Migrate plugins 2011-12-13 12:29:05 +01:00
documentation_en.html Backport guestbook to support Serendipity 1.7 plus 2014-06-16 12:01:45 +02:00
lang_bg.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
lang_cs.inc.php guestbook update 3.50 >= 2.0 only 2014-06-15 15:28:13 +02:00
lang_cz.inc.php guestbook update 3.50 >= 2.0 only 2014-06-15 15:28:13 +02:00
lang_de.inc.php [event_guestbook] Translation fixes (again). 2019-08-17 22:52:58 +02:00
lang_en.inc.php guestbook update 3.50 >= 2.0 only 2014-06-15 15:28:13 +02:00
lang_ja.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
lang_ko.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
lang_nl.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
lang_pl.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
lang_se.inc.php plugin guestbook 3.40 2013-08-23 18:53:08 +02:00
plugin_guestbook_backend_dbc.tpl Improve accessibility of iconfont icons 2016-10-26 15:07:46 +02:00
plugin_guestbook_backend_entries.tpl Improve accessibility of iconfont icons 2016-10-26 15:07:46 +02:00
plugin_guestbook_backend_form.tpl guestbook 3.58: & 1.25 2015-12-01 11:21:45 +01:00
plugin_guestbook_backend_header.tpl Improve accessibility of iconfont icons 2016-10-26 15:07:46 +02:00
plugin_guestbook_entries.tpl guestbook 3.53 2014-12-29 13:34:41 +01:00
plugin_guestbook_form.tpl take existing constant 2015-05-10 17:49:53 +02:00
README 3.59 guestbook callback switch 2016-01-08 18:07:31 +01:00
serendipity_event_guestbook.php updated plugin versions 2021-07-12 15:44:23 +02:00
serendipity_plugin_guestbook.php updated plugin versions 2021-07-12 15:44:23 +02:00
style_guestbook_backend.css minor guestbook changes 2015-06-30 16:52:21 +02:00
style_guestbook_frontend.css guestbook php 5.5/6 compat 2015-01-07 19:58:51 +01:00

/******************************************************************************
 *    serendipty_event_guestbook.php, README, last modified 2014-06-16        *
 *    If you have a interesting hack or want to help,                         *
 *    please leave a message in http://www.s9y.org/forums/                    *
 *    Have fun! Ian                                                           *
 ******************************************************************************/

 PLEASE NOTE

This Serendipity guestbook plugin is TEMPLATE based, configurable by its own stylesheet, has a FRONTEND and a BACKEND. Please read the Config, Admin, Design and last modified entry Changelog Section of this file carefully.

S9Y :: GUESTBOOK :: CONFIG SETTINGS

    * The 'Permalink' defines a permalink for the URL. Needs the absolute HTTP path and needs 
      to end with .htm or .html! The Serendipity default value is "/blogname/pages/guestbook.html", 
      or, in case you are not using mod_rewrite, "/blogname/index.php?/pages/guestbook.html".
    * The 'Static Pagetitle & URL' defines the staticpage title of the page.
      Attention: this also defines the URL of the page (index.php?serendipity[subpage]=name). 
      Just one short name without whitespaces (default: guestbook).
    * The 'Headline' defines a headline for the frontpage view (optional).
    * The 'Intro' defines additional introductory Text (optional).
    * The 'Guestbook form order' defines the place of your guestbook form (default: top).
    * The 'Entries per page' defines how many entries to display per page (default: 10).
    * The 'Entries per page' backend defines how many entries to display per page (default: 15).
    * The 'Characters per line (Wordwrap)' defines after how many chars a guestbook text line will 
      be automatically wrapped (default: 120).
    * The 'Format as article' defines if the output is automatically formatted as an article 
      (colors, borders, etc.) (default: yes).
    * The 'Send e-mail to admin' defines email information of new entries (default: false).
    * The 'E-mail of admin' set the email adress to send to.
    * The 'Ask for User Email' defines a form field for the e-mail of the user (default: yes).
    * The 'Show Captchas' defines the use of Serendipity CAPTCHAS (requires Spamblock plugin activated) 
      to prevent comment SPAM (default: yes).
    * The 'Ask for User Homepage' defines a form field for the homepage of the user (default: false).
    * The 'Approve entries' defines the guestbook entries to be verified by admin in general,
      before they show up in frontend (default: false).
    * The 'Auto-moderate' defines the same behaviour for a single entry, if the SPAMBLOCK-plugin 
      wordfilter option is active and set to 'moderate', caused by stopword matches (default: false). 
      The guestbook content evaluation will still return captcha checking, if any spam check 
      evaluates true. This differs from normal spamblock behaviour!
    * The 'Entry checks' sets an active and individual guestbook wordfilter array (default: pre-filled). 
      Regular Expressions are allowed, separate strings by semicolons (;). You have to escape special 
      chars with "\". If you leave this field empty, no special checks are done. This check is bypassed 
      for authenticated users with USERLEVEL_ADMIN only!
    * The 'Date format' sets a strftime() code for the entry datetime (default: %a, %d.%m.%Y %H:%M).

S9Y :: GUESTBOOK :: ADMINISTRATION

    * The administration area is in backend only.
    * The backend sidebar carries a link to administer the guestbook. There are 4 main points to show up:
      -   view approved entries,
      -   view unapproved entries (if 'Approve entries' is set to true),
      -   edit or insert an entry,
      -   the database section.
    * Each of the first 2, have the ability to (confirm), erase (immediately!), or re-edit a single entry
    * The database section will allow: backup & download, or purge the SQL table instantly. (Be careful!)
    * A link to SQL insert is shown, but not active, since this isn't trivial enough by now.

S9Y :: GUESTBOOK :: DESIGN

    * All smarty tpls, images and stylesheets of this plugin are located in the plugin folder 
      and remain to stay there.
    * If you are skilled and wish to have an personal frontend design, copy these files to your template 
      ( plugin_guestbook_entries.tpl, plugin_guestbook_form.tpl, style_guestbook_frontend.css ).
    * For changing the frontend entry background colors only, copy these neutral white css directives:
      /* styles guestbook entry colors neutral */
      /* the entry headline */
      .guestbook_entrytop { background:none repeat scroll 0 0 #FFF; }
      /* the entry background color */
      .guestbook_entrybottom { background:none repeat scroll 0 0 #FFF; }
      /* admin comment line */
      span.guestbook_admin_comment { background:none repeat scroll 0 0 #FFF; }
      /* the bottom shadow line */
      #guestbook_entrybundle { -moz-border-radius: 0 0; background:none repeat scroll 0 0 #FFF; }
      to the end of your templates user.css file, if you have one (suggested approach!).
      In the other case copy the style_guestbook_frontend.css file to your template folder,
      set above directives to the end and change the #FFF to your prefered color (#FFF is neutral white).
    * If you want to purge the frontend entry borders too, add: border: 0 none; to each of them.
    * If you even wish to change all frontend entry text colors, add:
      #guestbook_entrybundle table,
      #guestbook_entrybundle table a,
      #guestbook_entrybundle .guestbook_entrytop,
      #guestbook_entrybundle .guestbook_entrybottom,
      #guestbook_entrybundle .guestbook_admin_comment p,
      #guestbook_entrybundle .guestbook_admin_comment blockquote,
      #guestbook_entrybundle .guestbook_admin_comment blockquote p,
      #guestbook_entrybundle .guestbook_admin_comment blockquote p q { color: #000; } 
      for a black text color (#000).
    * No space between frontend entry blocks? Add:
      .guestbook_splitentries { display: none; visibility: hidden; }
    * The Intro, if set in config, can be modified with: 
      #guestbook_wrapper .guestbook_intro { 
      padding: 0 none; text-align: left; border: 0 none; background:none repeat scroll 0 0 #FFF; }
    * You can find a nice list of available web colours here: http://www.wackerart.de/rgbfarben.html. 
      Happy designing!


-------------------------------------
| Version 3.59                      |
-------------------------------------

    * Switch {call feedback} function to show success or error box
    * Indent backend sidebar menu links markup
    * Cleanup returning booleans where case expects break


-------------------------------------
| Version 3.58 & 1.25 sidebar       |
-------------------------------------

    * Added mysqli and check for supporting mysql and mysqli only
      for some guestbook backend tasks.
    * Disabled sidebar plugin using the 'frontend_display' hook,
      since that could throw certain errors in the nl2br plugin.
      If really in need, use
        $_POST['properties']['disable_markups'] = array(false);
      only.
    * Fixed JS BBC button function, which changed with S9y 2.0
    * Allow email now obfuscates the email link with a simple "at
      dot" behaviour.


-------------------------------------
| Version 3.57                      |
-------------------------------------

    * fix missing $ for var


-------------------------------------
| Version 1.23: sidebar plugin      |
-------------------------------------

    * fix wrong default value note


-------------------------------------
| Version 3.56                      |
-------------------------------------

    * fix IE9 list view CSS in Backend


-------------------------------------
| Version 3.55                      |
-------------------------------------

    * correct missing label in guestbook form


-------------------------------------
| Version 3.54                      |
-------------------------------------

    * make PHP 5.5/6 compat


-------------------------------------
| Version 3.53                      |
-------------------------------------

    * Added collapsible entry preview in backend entry list
    * Fix admincomment and some double encode issues
    * fix some more minor template and css issues


-------------------------------------
| Version 3.52                      |
-------------------------------------

    * PHP 5.4+ fix to properly call entity functions by charset


-------------------------------------
| Version 3.51 [ 2014-06-15 ]       |
-------------------------------------

    * Backported to Serendipity 1.7.0 plus
    * Minor change for quotes and markup in frontend entries

-------------------------------------
| Version 3.50 [ 2014-06-15 ]       |
-------------------------------------

    * Smartified the backend even more
    * Rewritten (tpl/css) for Serendipity 2.0 in backend
    * Extends Serendipity >= 1.9.0
    * Changed some lang constants
    * Long time users may need to backup their guestbook database in S9y
      Guestbook DB Administration panel again! Since this version checks the
      TABLE COLUMN order to prevent a possible backup/upload issue.


 3.44: Propagate $smarty.env.staticpage_pagetitle (and the others) so that it can be used in entries.tpl

 3.43: Properly use the example() API method by returning, not echo'ing. Unimportant update.


 -------------------------------------
| Version 3.42 [ 2013-11-21 ]       |
-------------------------------------

    * fixed db table guestbook, ip column to IPv6 length


-------------------------------------
| Version 3.41 [ 2013-08-24 ]       |
-------------------------------------

    * Be more strict in types for automoderate messages
    * Removed trim() in strip_security()
    * Removed bbc_reverse() pattern \! part
    * Filter guestbook comment checks, if not in admin group
    * Added constant bypass guestbook comment checks


-------------------------------------
| Version 3.40 [ 2013-08-23 ]       |
-------------------------------------

    * Added some powered by guestbook note to email in body and headers
    * Added entry set auto-moderate state into email body
    * Use nativ API parseTemplate() method, extends Serendipity >= 1.3
    * Improved security overall
    * Added bottom paginator to entry pages (both front- & backend)
    * Added new option to resize backend pagination amounts
    * Fixed multiple issues, eg entries homepage not showing up, while not inserted
    * Lang files cleanup and added some new constants


-------------------------------------
| Version 3.32 [ 2013-05-23 ]       |
-------------------------------------

    * Bump version to propagate new .htaccess access by Spartacus


-------------------------------------
| Version 3.31 [ 2012-09-14 ]       |
-------------------------------------

    * The Frontend missed its stylesheets - sorry!


-------------------------------------
| Version 3.30 [ 2012-06-13 ]       |
-------------------------------------

    * PHP 5.4 combat issues


-------------------------------------
| Version 3.29 [ 2012-01-26 ]       |
-------------------------------------

    * bump version to support spartacus update for guestbooks sidebar plugin update
    * fixed sidebar showed unapproved entries


-------------------------------------
| Version 3.28 [ 2011-12-15 ]       |
-------------------------------------

    * update to latest css, now uses PIE in older IE
    * changed internal path to var
    * added some docs


-------------------------------------
| Version 3.27 [ 2011-06-27 ]       |
-------------------------------------

    * changed backend/frontend templates including changes to the backend.css 
      from table to list style and be some more up to date.
    * changed config option markup internally to also set the {$plugin_guestbook_articleformat} 
      as default(true) in frontend plugin_guestbook_entries.tpl.
    * changed sidebar plugin linebreak.
    * fixed sql alter update and remove procedure.
    * changed backend display to admin group instead admin only.


-------------------------------------
| Version 3.26 [ 2011-03-08 ]       |
-------------------------------------

    * fixed spamblock call entry timestamp to be -8 day in past, 
      while captchas_ttl checks normally set captchas true beyond 7 days.
    * fixed backend admin entry; POST vars to form got lost in some error cases.
    * changed ERROR_DATANOTAGS lang constant in <en>, <de> and <de-utf8> to support new wordfilter option.
    * added new pre-filled config option to disallow plugin only filter words in entry body, 
      which was done internally before.
    * added internal var to function to support an incomplete error message properly.
    * changed lang constant in <en>, <de> and <de-utf8> to better explain auto-moderation issues.
    * changed documentation_en.html to explain differs in captchas check in contrast to spamblocks 
      auto-moderation pass-through and new option 'entrychecks'.


-------------------------------------
| Version 3.25 [ 2011-03-05 ]       |
-------------------------------------

    * moved some internal vars to a better place.
    * changed plugin_guestbook_backend_entries.tpl to support a moderate hidden var
    * erased moderate option in sidebar plugin, which came with v.3.21, while sidebar now extends 
      event plugin option setting.
    * rebuild sidebar <serendipity_plugin_guestbook> to support event plugins 'auto-moderation' 
      and 'showapp option' changes.
    * added lang constant in <en>, <de> and <de-utf8>
    * added new config option to allow entry set auto-moderate via spamblock plugin, if its 
      wordfilter option is active and set to 'moderate'
    * corrected small typo in german lang files
    * tweaked some small issues in guestbook CSS file
    * added spamblock return 'moderate_comments' value, to support adding entries to non-approved; 
      this extends guestbooks config setting


-------------------------------------
| Version 3.24 [ 2011-02-23 ]       |
-------------------------------------

    * added tag and link checks to prevent SPAM bots reading Captchas
    * tweaked some small issues in guestbook CSS file
    * changed some PAGINATOR_* and added new ERROR_DATANOTAGS lang constant in <de>, <en> and <de-utf8>
    * removed old paginator by new one
    * changed plugin_guestbook_entries.tpl to support removed administration
    * removed adminstration features from frontend, since they are better done in backend


-------------------------------------
| Version 3.23 [ 2011-02-17 ]       |
-------------------------------------

    * latest: Smarty3 forward compatibility 


-------------------------------------
| Version 3.22 [ 2011-02-15 ]       |
-------------------------------------

    * changed smarty->fetch method call to be less strict to support smarty 2 to smarty3 parameter 
      order change - removed param 4
    * Added restriction of backend functionality and administration sidebar link to admin only


-------------------------------------
| Version 3.21 [ 2011-01-24 ]       |
-------------------------------------

    * Fixed send entry to email, which did not show entry body properly.
    * Backported fake call to spamblock and other comment plugins again, which was removed in 3.20 
      to prevent bots capturing Captchas.
    * Fixed serendipity_plugin_guestbook.php to truly show approved events only, if set in config.
    * Fixed a small typo in lang_en.* file and made the documentation helppage W3C XHTML conform.


-------------------------------------
| Version 3.20 - 2010-07-17          |
-------------------------------------

    * ATTENTION: This version needs you to verify and set/submit the guestbook config again!

    * This edition adds backend administration and now supports admin moderation to guestbook entries.
    * Therefor it adds a new database table field 'approve' and a new config variable 'showapp' to true 
      or false (default is false).
    * Changes will affect old entries to be set as approved.
    * Updated Serendipity guestbook sidebar plugin to select these entries only to v.1.12.
    * Changed and added lang constants. The lang files <en>, <de> and <de-utf8> are now up to date.
    * Some small tweaks to both of the frontend tpls and some more to the stylesheet.
    * Some small tweaks to the frontend paginator and the url building, to be more friendly to 
      mod_rewrite setting via permalink or subpage.
    * This upgrade may effect individual design settings. Please make sure to have a look to your 
      frontend tpls and the stylesheet!


-------------------------------------
| Version 2.8 to 3.11 - 2007-2009   |
-------------------------------------
    * some tweaks by Garvin see ChangeLog


-------------------------------------
| Version 2.8 - 2007-07-23          |
-------------------------------------

    * ATTENTION: This version needs you to verify and set/submit the guestbook config again!

    * Changed lang files. The lang files <en>, <de> and <de-utf8> are now up to date. 
    * If you update other lang files please change the first line to 
      $Id: serendipity_event_guestbook.php, langfile(short name) v2.8 200x/xx/xx name

    * Images new and moved and old files clean up.
    * Deleted the very old 'plugin_guestbook.tpl' file: this confuses newbies. Please do the same!
    * button_background.png and shorttime.gif belong into plugins img folder. 
    * Please delete them in plugin folder to not confuse anybody. 
    * Added blank.gif and info.gif, which is the config help picture, into plugins img folder. 

    * Changed plugin_guestbook_form.tpl. 
    * make use of the new smarty vars 
    * if set: popup and show messages
    * Now a user using the popup issue can view his entry after DB INSERT. 
    * changed action="{$plugin_guestbook_action}#entry" to 
      action="{$commentform_action}?frontpage#feedback" inside plugin_guestbook_form.tpl. 
      This seems necessary if you use a static page as your start page. 
      Be sure to have the staticpage plugin in order before the contactform and guestbook plugin.
      Well, actually the '?frontpage' will be done in serendipity_event_guestbook.php. 
    * added admin stuff
    * modified some css

    * Changed plugin_guestbook_entries.tpl. 
    * make use of the new smarty vars 
    * if set: order form on top or end and be able to even link to the form
    * moved some things around
    * added admin stuff and a missing <td></td>, which seems nessessary!
    * modified some css

    * Changed, cleaned and modified the style_guestbook_backend.css 
    * you may put a very own version of both tpl and css files inside your template folder.

>> GH: TEMPORARILY DEACTIVATED
    * One extra dynamic field added (dyn).
    * I don't think there is any need to use mgroeninger's excellent dynamic function from contactform.

    * In order to make things more configurable, these vars were changed or added (see lang files):
    * 'headline'      staticpage headline on top of page, by Garvin (v. 2.7).
    * 'intro'         is used for free additional text entry on top of guestbook page.
    * 'pageurl'       now called permalink, while pagetitle is used as the original (1.x) pageurl and for 
                      staticpage_pagetitle, see below. (Sounds messy, I know, but this is more straight!)
    * 'pagetitle'     is used in staticpages and other templates and defines the URL of the page 
                      'index.php?serendipity[subpage]=name'.
    * 'formorder'     decide to have form appear first, default is form at end of entries.
    * 'formpopup'     decide to have the form appear in a popup page, default (yes) is no popup.

    >>GH:TEMPORARILY DEACTIVATED!
    * 'showdynfield'  this is a basic dynamic field as a mysql varchar(100) field. 
                      Use with a input field in plugin_guestbook_form.tpl 
                      and as a text output in plugin_guestbook_entries.tpl.
                      I tried it with a tinyblob field, but it is not a very good idea to store 
                      binary data in databases, and so I came back to this small input text field.
                      If you want to change this field with another label name, set config dynfield 
                      to the new name and submit.
    * Fixed a small bug in paginator function.
    * General code clean up and moved things around. More documented code.
    * Now this really is a fully template version (99.9% ;-)). 
    * Moved some remaining divs and some admin stuff into the tpls.
    * Sorry, there are still some needs inside functions for remaining line breaks and the urls of 
      the paginator function.
    * Good news! The code for the staticpage plugin at the end oft this page is obsolet by now. 
    * We'll keep the compatibility to 1.x until next 3.x release.


-------------------------------------
| Version 2.5 to 2.7 - 2007-??-??   |
-------------------------------------
    * some tweaks by Garvin


-------------------------------------
| Version 2.0 to 2.4 - 2006-10-06   |
-------------------------------------

    * Some link generation changes to generate_EntriesPage() to make it work with/without mode_rewrite
    * Entries SQL query and show now execute only when user is in 'entries view' or 'entry done' mode
    * Guestbookform tpl action url is now: $serendipity['baseURL'] . $serendipity['indexFile'] . '#entry'
    * Changed sidebar serendipity_event_staticpage.php to be compat to guestbook 2.0 version too (code1). 
      In case you allready used this plugin to show a link to the guestbook plugin in your sidebar, 
      please go into admin panel, go to static pages, and say yes again to show guestbook plugin. 
      Doing this, changes to code will take effect.
    * Made sidebar serendipity_plugin_guestbook work with 2.0 version only
    * Target admin mail address should now be compat to old guestbook v.1.38, just one targetmail used
    * Markup config var makes tpl based entries output get parsed through S9y standard text formatting
      and converting standard smilies
    * Change old guestbook table now works for MySql (only?)
    * More cleanup / renaming and reconfigured wordwrap in config for 2.0 final
    * Now the guestbook should work well with/without CAPTCHAS - this needed a new config variable 
      so please check your Captchas settings in spamblock and! guestbook plugins
    * Generell clean up and messages tweaks.
    * Now serendipity_event_guestbook is nearly full template based (see plugin_guestbook_entries.tpl 
      and plugin_guestbook_form.tpl)
    * You will find images shorttime.gif, button_background.png and delete.png in $this_plugin/img dir
    * Change css (style_guestbook_backend.css) and template files to your needs
    * Please check other lang files - actualy only <en>, <de> and <de-utf8> will work!
    * Permalink ("pageurl") is a full path from http root eg. "/serendipity/pages/guestbook.html" 
      or "/serendipity/index.php?/pages/guestbook.html" (see mod_rewrite)
    * Note: This version is making use of plugin::spamblock features and captchas (disabled for admins),
    * Note: timelock and sessionlock config vars will not be used anymore - removed by table update


------------------------------------------------------
| Version 1.0 to 1.38 [ 2005-02-11 to 2006-08-21 ]   |
------------------------------------------------------

    * originally developed by Philipp Schneider aka boelkstoff