Difference between revisions of "Comments"

From TNG_Wiki
Jump to: navigation, search
(Sites using this mod)
(New mod version)
Line 4: Line 4:
 
| mod_summary    = Adds an event for commenting
 
| mod_summary    = Adds an event for commenting
 
| mod_validation  =
 
| mod_validation  =
| mod_last_update = 14 Sep 2018
+
| mod_last_update = 22 Sep 2018
| download_link = for {{Tv120}}[https://xerxx.se/modSupport/click/click.php?id=150&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} Comments 12.0.1.0]<hr/>for {{Tv110}}[https://xerxx.se/modSupport/click/click.php?id=149&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} Comments 11.1.2.0]
+
| download_link = for {{Tv120}}[https://xerxx.se/modSupport/click/click.php?id=154&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} Comments 12.0.1.2]<hr/>for {{Tv110}}[https://xerxx.se/modSupport/click/click.php?id=153&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} Comments 11.1.2.2]
 
| download_stats = [https://xerxx.se/modSupport/click/index.php?action=stats&groupid=21 Downloads]
 
| download_stats = [https://xerxx.se/modSupport/click/index.php?action=stats&groupid=21 Downloads]
 
| mod_author      = Erik Hoppe
 
| mod_author      = Erik Hoppe
Line 11: Line 11:
 
| mod_support    = [https://xerxx.se/modSupport/index.php?mod=23 My Mod Support]
 
| mod_support    = [https://xerxx.se/modSupport/index.php?mod=23 My Mod Support]
 
| mod_contact    = [https://xerxx.se/modSupport/index.php?mod=23 My Mod Support]
 
| mod_contact    = [https://xerxx.se/modSupport/index.php?mod=23 My Mod Support]
| mod_version    = 11.1.2.0 - 12.0.1.0
+
| mod_version    = 11.1.2.2 - 12.0.1.2
 
| min_TNG_ver    = 11.1.2
 
| min_TNG_ver    = 11.1.2
 
| max_TNG_ver    = 12.x
 
| max_TNG_ver    = 12.x
Line 30: Line 30:
 
* placesearch.php
 
* placesearch.php
 
* showmedia.php (if not living or private)
 
* showmedia.php (if not living or private)
for loggedin users to add comments to the subject.<br/>
+
for visitors to read and add comments to the subject.<br/>
A new page is added that lists all pages with comments - link in the '''Info menu'''.<br/>
+
A new page is added that lists all pages with comments - link in the '''Find menu'''.<br/>
The Info menu link signals when a new comment is added to the list.<br/>
+
The Find menu link signals when a new comment is added to the list.<br/>
Database tables are handled in '''Utilities''' as usual (back-up, restore etc)<br/>
+
Database tables are handled in '''Utilities''' as usual (back-up, restore etc)
Currently supports '''English, French''' and ''' Swedish'''.
 
  
  
 
== Visualization of this mod ==
 
== Visualization of this mod ==
  
<p>If there are comments, this is what the '''not logged in''' visitor sees.<br/>[[File:Comments0.jpg]]</p><br/>
+
<p>If there are comments (one in this case), this is what the '''not logged in''' Guest sees.<br/>[[File:Comments0.jpg]]</p><br/>
<p>User '''hoppehoppe''' is logged in<br/>[[File:Comments1.jpg]]</p><br/>
+
<p>User '''hoppehoppe''' is logged in<br/>[[File:Comments1.jpg]]<br/></p><br/>
 
<p>User '''hoppehoppe''' writes a comment. '''Note how to include a link'''<br/>[[File:Comments2.jpg]]</p><br/>
 
<p>User '''hoppehoppe''' writes a comment. '''Note how to include a link'''<br/>[[File:Comments2.jpg]]</p><br/>
<p>The result. The link is active.<br/>'''The author of the last comment''' may edit it while it is the last.<br/>[[File:Comments3.jpg]]</p><br/>
+
<p>The result. The link is active.<br/>'''The author of the last comment''' may edit it while it is the last (not Guests).<br/>[[File:Comments3.jpg]]</p><br/>
 +
<p>If '''Guests''' are allowed to post, a '''Captcha''' and/or '''Admin Approval''' can be activated.<br/>
 +
The captcha is only displayed until a first post is submitted, during the visit (session-cookie).<br/>
 +
The IP is '''always''' included in the '''Admin mail for Guests'''. It is not stored anywhere else so you really shoudn't turn the "Guest-mails" off.<br/>
 +
[[File:Comments7.jpg]]</p><br/>
 
<p>The Administrator may delete any comment.<br/>[[File:Comments4.jpg]]</p><br/>
 
<p>The Administrator may delete any comment.<br/>[[File:Comments4.jpg]]</p><br/>
<p>The '''Info menu link''' shows when a new comment is added to the listpage.<br/>[[File:Comments5.jpg]]</p><br/>
+
<p>The '''Find menu link''' shows when a new comment is added to the listpage (not Guests).<br/>[[File:Comments5.jpg]]</p><br/>
 
<p>The list of pages with comments.<br/>There are '''New''' comments since the user visited this page the last time.<br/>[[File:Comments6.jpg]]</p>
 
<p>The list of pages with comments.<br/>There are '''New''' comments since the user visited this page the last time.<br/>[[File:Comments6.jpg]]</p>
  
Line 55: Line 58:
  
 
Credits go to '''manofmull, dlcole, Ken''' and '''Katryne''' for your invaluable tests, help, suggestions, advice and patience. Thanks!<br/>
 
Credits go to '''manofmull, dlcole, Ken''' and '''Katryne''' for your invaluable tests, help, suggestions, advice and patience. Thanks!<br/>
Special thanks to Katryne for the French translation.
+
Many thanks also to the <b>v.2 Testers/Translators:</b><br/>
 +
Dutch: '''Renze P'''<br/>
 +
French: '''Katryne'''<br/>
 +
German: '''JPB'''
  
  
Line 72: Line 78:
 
# Move/copy/FTP the '''.cfg''' file and the '''accompanying folder''' to the  '''mods''' folder of your TNG system.
 
# Move/copy/FTP the '''.cfg''' file and the '''accompanying folder''' to the  '''mods''' folder of your TNG system.
 
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config  Files]] to install the mod.
 
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config  Files]] to install the mod.
# Remember to click the '''Create Comments Database Tables''' button to finish the installation.
+
# Make the '''Database Update''' to finish the installation:
 +
#* '''First time install''': Click the '''''Create Comments Database Tables''''' button
 +
#* '''Update from v .0 or .1''': Click the '''''Update Comments Database Tables''''' button
  
  
Line 84: Line 92:
 
== Modmanager Edit Options ==  
 
== Modmanager Edit Options ==  
  
* Comments '''may''' be read by the public.
+
* '''Public reading''': GUESTS can read posted comments (def = false = No)
* Admin does '''not''' receive mail for new comment.
+
* '''Public posting''': GUESTS can post comments (def = false = No)
 +
* '''Captcha''': Show captcha for GUEST when adding first comment (def = true = Yes)
 +
* '''Approval''': GUESTS' posts must be approved by the Administrator (def = true = Yes)
 +
* '''Approval''': USERS' posts must be approved by the Administrator (def = false = No)
 +
* '''Event''': Always show the Comments event (def = false = No)
 +
* '''Admin Mail''': Admin receives mails for GUEST-posted comments (def = true = Yes)
 +
* '''Admin Mail''': Admin receives mails for USER-posted commenta (def = true = Yes)
 +
* '''Page-select''': Include the Comments event in getperson.php (def = true = Yes)
 +
* '''Page-select''': Include the Comments event in familygroup.php (def = true = Yes)
 +
* '''Page-select''': Include the Comments event in placesearch.php (def = true = Yes)
 +
* '''Page-select''': Include the Comments event in showmedia.php (def = true = Yes)
 +
 
 +
 
 +
== Language Support ==
 +
 
 +
Supported languages, if present, other than English:<br/>
 +
Dutch<br/>
 +
French<br/>
 +
German<br/>
 +
Swedish
  
  
Line 113: Line 140:
 
$text['commentAdded'] = "Added";
 
$text['commentAdded'] = "Added";
 
$text['commentNumb'] = "#";
 
$text['commentNumb'] = "#";
$text['commentsDelete'] = "Delete";
+
$text['commentDelete'] = "Delete";
 
$admtext['commentsvisits'] = "Comments read";
 
$admtext['commentsvisits'] = "Comments read";
 
$admtext['commentPage'] = "Comments";
 
$admtext['commentPage'] = "Comments";
Line 125: Line 152:
 
$text['commentErrorupdate'] = " error on Update Comment";
 
$text['commentErrorupdate'] = " error on Update Comment";
 
$text['commentErrordelete'] = " error on Delete Comment";
 
$text['commentErrordelete'] = " error on Delete Comment";
 +
$text['commentErrorapprove'] = " error on Approve Comment";
 
$text['commentAlertadmin'] = "Please alert the Administrator. Thank You.";
 
$text['commentAlertadmin'] = "Please alert the Administrator. Thank You.";
 
$text['commentRegarding'] = "Regarding ";
 
$text['commentRegarding'] = "Regarding ";
 
$text['commentReldel'] = "Reload page to Delete";
 
$text['commentReldel'] = "Reload page to Delete";
 +
$text['commentGuest'] = "guest";
 +
$text['commentGuestinput'] = "Your name/signature here please.";
 +
$text['commentSelect'] = "<b>Just this once:</b><br/>Please mark the bird so we know that you are not a spam-robot.";
 +
$text['commentNoSelect'] = "Please select the bird to add a comment.";
 +
$text['commentWrongSelect'] = "You selected the wrong image. Please try again.";
 +
$text['commentError2'] = "Please enter your name or signature.";
 +
$text['commentIPwarning'] = "<b>Note!</b> Your IP-address (".$_SERVER['REMOTE_ADDR'].") is sent with the form.";
 +
$text['commentApprovewait'] = "Your comment will be added when it has been approved by the administrator.";
 +
$text['commentApprove'] = "Approve";
  
 
$text['commentPagetitle'] = "List of Comments";
 
$text['commentPagetitle'] = "List of Comments";
Line 134: Line 171:
 
$text['commentDelcom'] = "Do you really want to DELETE this comment?\\n\\nWARNING! This can not be undone!";
 
$text['commentDelcom'] = "Do you really want to DELETE this comment?\\n\\nWARNING! This can not be undone!";
 
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in a JavaScript-box)
 
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in a JavaScript-box)
 +
 +
$text['commentApproveadmin'] = "AWAITS APPROVAL!";
 +
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in Admin mails)
  
 
</pre>
 
</pre>
'''Explanation''' for the limits in the last two texts:<br/>
+
'''Explanation''' for the limitations in the last three texts:<br/>
<b>If your .cfg serves only one character set and you save it in that same set, this is not a problem for you.</b><br/>
+
<b>If your (private) .cfg serves only one character set and you save it in that same set, this is not a problem for you.</b><br/>
The distributed .cfg serves two character sets (UTF-8 and ANSI), therefore HTML-entities have to be used for umlauted and accented letters<br/>
+
The distributed .cfg serves two character sets (UTF-8 and ANSI), therefore HTML-entities have to be used for umlauted and accented letters, for example<br/>
&amp;auml; = ä, &amp;eacute; = é etc, otherwise strange characters will be displayed in one of the two character sets.<br/>
+
'''&amp;auml;''' = ä, '''&amp;eacute;''' = é etc, otherwise strange characters will be displayed in one of the two character sets.<br/>
JavaScript boxes and Page Title (browser tab text) displays text as received so HTML-entities can't be used.<br/>
+
JavaScript boxes, Browser tabs (Page title) and mails are not HTML-elements and therefore HTML-entities can't be used.
  
  
Line 158: Line 198:
 
! Date
 
! Date
 
! Description
 
! Description
 +
|-
 +
| v11.1.2.2<br/>v12.0.1.2<br/>(v.1 was never public)
 +
| 14 Sep 2018
 +
| The list-page is '''MOVED''' to the '''FIND'''-menu! (A more natural place, right?)<br/>Many additions and Edit options, such as Public reading and writing, Dutch and German translations (thanks Renze and JPB!) and more.
 
|-
 
|-
 
| v11.1.2.0<br/>v12.0.1.0
 
| v11.1.2.0<br/>v12.0.1.0
Line 207: Line 251:
 
* placesearch.php
 
* placesearch.php
 
* showmedia.php
 
* showmedia.php
* personlib.php
 
 
* genlib.php
 
* genlib.php
 
* customconfig.php
 
* customconfig.php
Line 219: Line 262:
 
* languages/English/cust_text.php  
 
* languages/English/cust_text.php  
 
* languages/English-UTF8/cust_text.php  
 
* languages/English-UTF8/cust_text.php  
 +
* languages/Dutch/cust_text.php - if present
 +
* languages/Dutch-UTF8/cust_text.php - if present
 
* languages/French/cust_text.php - if present  
 
* languages/French/cust_text.php - if present  
 
* languages/French-UTF8/cust_text.php - if present  
 
* languages/French-UTF8/cust_text.php - if present  
 +
* languages/German/cust_text.php - if present
 +
* languages/German-UTF8/cust_text.php - if present
 
* languages/Swedish/cust_text.php - if present  
 
* languages/Swedish/cust_text.php - if present  
 
* languages/Swedish-UTF8/cust_text.php - if present  
 
* languages/Swedish-UTF8/cust_text.php - if present  
Line 231: Line 278:
 
[[Category:placesearch.php mods]]
 
[[Category:placesearch.php mods]]
 
[[Category:showmedia.php mods]]
 
[[Category:showmedia.php mods]]
[[Category:personlib.php mods]]
 
 
[[Category:genlib.php mods]]
 
[[Category:genlib.php mods]]
 
[[Category:customconfig.php mods]]
 
[[Category:customconfig.php mods]]
Line 241: Line 287:
  
 
[[Category:cust_text.php English mods]]
 
[[Category:cust_text.php English mods]]
 +
[[Category:cust_text.php Dutch mods]]
 
[[Category:cust_text.php French mods]]
 
[[Category:cust_text.php French mods]]
 +
[[Category:cust_text.php German mods]]
 
[[Category:cust_text.php Swedish mods]]
 
[[Category:cust_text.php Swedish mods]]

Revision as of 14:42, 22 September 2018

Restricted Downloads of Comments are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted


Comments
Summary Adds an event for commenting
Validation
Mod Updated 22 Sep 2018
Download link for
TNG 12.0
Comments 12.0.1.2
for
TNG 11.0
Comments 11.1.2.2
Download stats Downloads
Author(s) Erik Hoppe
Homepage Comments (this page)
Mod Support My Mod Support
Contact Developer My Mod Support
Latest Mod 11.1.2.2 - 12.0.1.2
Min TNG V 11.1.2
Max TNG V 12.x
Files modified
Related Mods
Notes
Author of TNG Colouring Book
Mods by me: At my user page.


Purpose of the mod

An event Comments is added to

  • getperson.php (if not living or private)
  • familygroup.php (if not living or private)
  • placesearch.php
  • showmedia.php (if not living or private)

for visitors to read and add comments to the subject.
A new page is added that lists all pages with comments - link in the Find menu.
The Find menu link signals when a new comment is added to the list.
Database tables are handled in Utilities as usual (back-up, restore etc)


Visualization of this mod

If there are comments (one in this case), this is what the not logged in Guest sees.
Comments0.jpg


User hoppehoppe is logged in
Comments1.jpg


User hoppehoppe writes a comment. Note how to include a link
Comments2.jpg


The result. The link is active.
The author of the last comment may edit it while it is the last (not Guests).
Comments3.jpg


If Guests are allowed to post, a Captcha and/or Admin Approval can be activated.
The captcha is only displayed until a first post is submitted, during the visit (session-cookie).
The IP is always included in the Admin mail for Guests. It is not stored anywhere else so you really shoudn't turn the "Guest-mails" off.
Comments7.jpg


The Administrator may delete any comment.
Comments4.jpg


The Find menu link shows when a new comment is added to the listpage (not Guests).
Comments5.jpg


The list of pages with comments.
There are New comments since the user visited this page the last time.
Comments6.jpg


Developer

This mod was developed by Erik Hoppe.
See all my mods at my Wiki user page.

Credits

Credits go to manofmull, dlcole, Ken and Katryne for your invaluable tests, help, suggestions, advice and patience. Thanks!
Many thanks also to the v.2 Testers/Translators:
Dutch: Renze P
French: Katryne
German: JPB


Requirements

TNG version: 11.1.2
  • A working TNG installation.
  • A backup of all affected files (see the list below)
  • An installed current version of the Mod Manager (is already included in TNG v10)


Installation

  1. Click on the download link, shown in the summary in the upper right corner of the page.
  2. Un-zip the file and open the folder. You will find a .cfg file and a new folder inside.
  3. Move/copy/FTP the .cfg file and the accompanying folder to the mods folder of your TNG system.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.
  5. Make the Database Update to finish the installation:
    • First time install: Click the Create Comments Database Tables button
    • Update from v .0 or .1: Click the Update Comments Database Tables button


In the event of a problem


Modmanager Edit Options

  • Public reading: GUESTS can read posted comments (def = false = No)
  • Public posting: GUESTS can post comments (def = false = No)
  • Captcha: Show captcha for GUEST when adding first comment (def = true = Yes)
  • Approval: GUESTS' posts must be approved by the Administrator (def = true = Yes)
  • Approval: USERS' posts must be approved by the Administrator (def = false = No)
  • Event: Always show the Comments event (def = false = No)
  • Admin Mail: Admin receives mails for GUEST-posted comments (def = true = Yes)
  • Admin Mail: Admin receives mails for USER-posted commenta (def = true = Yes)
  • Page-select: Include the Comments event in getperson.php (def = true = Yes)
  • Page-select: Include the Comments event in familygroup.php (def = true = Yes)
  • Page-select: Include the Comments event in placesearch.php (def = true = Yes)
  • Page-select: Include the Comments event in showmedia.php (def = true = Yes)


Language Support

Supported languages, if present, other than English:
Dutch
French
German
Swedish


Custom Text Additions

The config file includes the English language custom text.
There are French and Swedish translations if they are present in your TNG system.
For other languages you can modify the config file to add the custom text or manually add to whatever language you like.

(English custom text for reference)


$text['commentWrote'] = " wrote";
$text['commentMsg'] = "Comments";
$text['commentNotext'] = "There are no comments yet...";
$text['commentClick'] = "Write a comment!";
$text['commentUse'] = "Please don't use for changes/corrections (use the Suggest tab instead).";
$text['commentAddNew'] = "A new comment from";
$text['commentChars'] = "<b>You can NOT use the characters ";
$text['commentOr'] = " or ";
$text['commentNoreplace'] = "</b> They are deleted and not replaced.";
$text['commentPostbutt'] = "Add your comment!";
$text['commentError1'] = "No comment!";
$text['commentHeader'] = "Pages with comment(s)";
$text['commentPersID'] = "ID";
$text['commentPersPlace'] = "Name (link = new win/tab)";
$text['commentSubmitter'] = "By";
$text['commentAdded'] = "Added";
$text['commentNumb'] = "#";
$text['commentDelete'] = "Delete";
$admtext['commentsvisits'] = "Comments read";
$admtext['commentPage'] = "Comments";
$text['commentPage'] = "Comments"; // admtext is not global
$text['commentNew'] = "New";
$text['commentNewChar'] = "<b>  !</b>";
$text['commentNewMail'] = "New Comment posted";
$text['commentDatabase'] = "Database";
$text['commentMail'] = "Mail";
$text['commentErrorinsert'] = " error on Insert Comment";
$text['commentErrorupdate'] = " error on Update Comment";
$text['commentErrordelete'] = " error on Delete Comment";
$text['commentErrorapprove'] = " error on Approve Comment";
$text['commentAlertadmin'] = "Please alert the Administrator. Thank You.";
$text['commentRegarding'] = "Regarding ";
$text['commentReldel'] = "Reload page to Delete";
$text['commentGuest'] = "guest";
$text['commentGuestinput'] = "Your name/signature here please.";
$text['commentSelect'] = "<b>Just this once:</b><br/>Please mark the bird so we know that you are not a spam-robot.";
$text['commentNoSelect'] = "Please select the bird to add a comment.";
$text['commentWrongSelect'] = "You selected the wrong image. Please try again.";
$text['commentError2'] = "Please enter your name or signature.";
$text['commentIPwarning'] = "<b>Note!</b> Your IP-address (".$_SERVER['REMOTE_ADDR'].") is sent with the form.";
$text['commentApprovewait'] = "Your comment will be added when it has been approved by the administrator.";
$text['commentApprove'] = "Approve";

$text['commentPagetitle'] = "List of Comments";
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in the browser tab)

$text['commentDelcom'] = "Do you really want to DELETE this comment?\\n\\nWARNING! This can not be undone!";
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in a JavaScript-box)

$text['commentApproveadmin'] = "AWAITS APPROVAL!";
// NOTE: Use _only_ PLAIN A-Z here! No accented or umlauted letters. (Used in Admin mails)

Explanation for the limitations in the last three texts:
If your (private) .cfg serves only one character set and you save it in that same set, this is not a problem for you.
The distributed .cfg serves two character sets (UTF-8 and ANSI), therefore HTML-entities have to be used for umlauted and accented letters, for example
&auml; = ä, &eacute; = é etc, otherwise strange characters will be displayed in one of the two character sets.
JavaScript boxes, Browser tabs (Page title) and mails are not HTML-elements and therefore HTML-entities can't be used.


Uninstalling the mod

If you want to completely Remove (uninstall) this mod and all its tables, you should

  1. click the Uninstall button.
  2. click the Remove Comments Database Tables buttons.
  3. click the Delete button to delete the config file and its folder from the mods folder.


Revision History

Version Date Description
v11.1.2.2
v12.0.1.2
(v.1 was never public)
14 Sep 2018 The list-page is MOVED to the FIND-menu! (A more natural place, right?)
Many additions and Edit options, such as Public reading and writing, Dutch and German translations (thanks Renze and JPB!) and more.
v11.1.2.0
v12.0.1.0
14 Sep 2018 Introduction


Sites using this mod

If you download and install this mod, you can support it by adding your TNG site to this table:

URL User Note Mod-Version TNG-Version User-language
Andersson, Hoppe, Sahlin, Thorell Erik Hoppe Mod author Private version 11.1.2 SE, GB, DE
Cole / Tanner Family Tree David Cole Public/Private see here see here English
Familiestamboom.frl Renze Petersohn Public/Private 2.0.1.2Beta 12.0.1 NL, UK, DE

TNG Modules Impacted

The following TNG Modules are modified, and should be backed up prior to installing this mod:

  • getperson.php
  • familygroup.php
  • placesearch.php
  • showmedia.php
  • genlib.php
  • customconfig.php
  • admin_genconfig.php
  • admin_utilities.php
  • admin_backup.php
  • admin_optimize.php
  • admin_restore.php

The custom texts will be added to these files, which should also be backed up prior to installing this mod:

  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php
  • languages/Dutch/cust_text.php - if present
  • languages/Dutch-UTF8/cust_text.php - if present
  • languages/French/cust_text.php - if present
  • languages/French-UTF8/cust_text.php - if present
  • languages/German/cust_text.php - if present
  • languages/German-UTF8/cust_text.php - if present
  • languages/Swedish/cust_text.php - if present
  • languages/Swedish-UTF8/cust_text.php - if present