Changes

Jump to navigation Jump to search
8,928 bytes added ,  08:14, 14 September 2018
New mod
{{restricted}}
{{TNGmod
| mod_name = Comments
| mod_summary = Adds an event for commenting
| mod_validation =
| mod_last_update = 14 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_stats = [https://xerxx.se/modSupport/click/index.php?action=stats&groupid=21 Downloads]
| mod_author = Erik Hoppe
| mod_url = [[Comments]] (this page)
| 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_version = 11.1.2.0 - 12.0.1.0
| min_TNG_ver = 11.1.2
| max_TNG_ver = 12.x
| TNG_file_list = See [[COMMENTS#TNG_Modules_Impacted|TNG Modules Impacted]]
| related_mods =
| notes = Author of '''[https://xerxx.se/tcb TNG Colouring Book]'''<br/>Mods by me: [[User:XerxX|At my user page]].
}}
{| style="margin-right:0.5 em;" align="right"
| __TOC__

|}

== Purpose of the mod ==

An event '''Comments''' is added to
* getperson.php
* familygroup.php
* placesearch.php
* showmedia.php
for loggedin users to add comments to the subject.<br/>
A new page is added that lists all pages with comments - link in the '''Info menu'''.<br/>
The Info 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/>
Currently supports '''English, French''' and ''' Swedish'''.


== Visualization of this mod ==

<p>If there are comments, this is what the '''not logged in''' visitor sees.<br/>[[File:Comments0.jpg]]</p>
<p>User '''hoppehoppe''' is logged in<br/>[[File:Comments1.jpg]]</p>
<p>User '''hoppehoppe''' writes a comment. '''Note how to include a link'''<br/>[[File:Comments2.jpg]]</p>
<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>
<p>The Administrator may delete any comment.<br/>[[File:Comments4.jpg]]</p>
<p>The '''Info menu link''' shows when a new comment is added to the listpage.<br/>[[File:Comments5.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>


== Developer ==

This mod was developed by Erik Hoppe.<br/>See all my mods at my '''''[[User:XerxX|Wiki user page]]'''''.


== Requirements ==

{{TNG 11.1|and after}}
* 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 ==

# Click on the download link, shown in the summary in the upper right corner of the page.
# Un-zip the file and open the folder. You will find a .cfg file and a new folder inside.
# 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.
# Remember to click the '''Create Comments Database Tables''' button to finish the installation.


== In the event of a problem ==

* Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
* Replace all affected files with the copies you made before the installation.
* Contact me through [https://xerxx.se/modSupport/index.php?mod=23 My Mod Support]


== Modmanager Edit Options ==

* Comments '''may''' be read by the public.
* Admin does '''not''' receive mail for new comment.


== Custom Text Additions ==

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

(English custom text for reference)<br />

<pre>

$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['commentsDelete'] = "Delete";
$admtext['commentsvisits'] = "Comments read";
$admtext['commentPage'] = "Comments";
$text['commentPage'] = "Comments"; // admtext is not global
$text['commentNew'] = "New";
$text['commentNewChar'] = "<b>&nbsp;&nbsp;!</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['commentAlertadmin'] = "Please alert the Administrator. Thank You.";
$text['commentRegarding'] = "Regarding ";
$text['commentReldel'] = "Reload page to Delete";

$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)

</pre>
'''Explanation''' for the limits in the last two 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/>
The .cfg serves two character sets (UTF-8 and ANSI), therefore HTML-entities have to be used for umlauted and accented letters<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/>


== Uninstalling the mod ==

If you want to completely '''Remove''' (uninstall) this mod and all its tables, you should
# click the '''Delete''' button to delete the config file from the mods folder and then
# click the '''Remove Comments Database Tables''' buttons.


== Revision History ==

{| border="1" cellspacing="5" cellpadding="2" width="100%" class="wikitable"
|-
! Version
! Date
! Description
|-
| v11.1.2.0<br/>v12.0.1.0
| 14 Sep 2018
| Introduction
|}


== Sites using this mod ==
'''As the selection is only visible for logged in users, I can't show anything but the screenshot above.

'''If you download and install this mod, please add your TNG site to the table below:'''

{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
|-
! URL
! User
! Note
! Mod-Version
! TNG-Version
! User-language
|-
| [https://xerxx.se/getperson.php?personID=I36&amp;tree=tredNr2 Andersson, Hoppe, Sahlin, Thorell]
| [[User:XerxX|Erik Hoppe]]
| Mod author
| Private version
| 11.1.2
| SE, GB, DE
|}

== TNG Modules Impacted ==

The following TNG Modules are modified, and should be backed up prior to installing this mod:<br />
* getperson.php
* familygroup.php
* placesearch.php
* showmedia.php
* personlib.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/French/cust_text.php - if present
* languages/French-UTF8/cust_text.php - if present
* languages/Swedish/cust_text.php - if present
* languages/Swedish-UTF8/cust_text.php - if present

[[Category:Mods for TNG v11]]
[[Category:Mods for TNG v12]]

[[Category:getperson.php mods]]
[[Category:familygroup.php mods]]
[[Category:placesearch.php mods]]
[[Category:showmedia.php mods]]
[[Category:personlib.php mods]]
[[Category:genlib.php mods]]
[[Category:customconfig.php mods]]
[[Category:admin_genconfig.php mods]]
[[Category:admin_utilities.php mods]]
[[Category:admin_backup.php mods]]
[[Category:admin_optimize.php mods]]
[[Category:admin_restore.php mods]]

[[Category:cust_text.php English mods]]
[[Category:cust_text.php French mods]]
[[Category:cust_text.php Swedish mods]]
'''Experienced'''
1,572

edits

Navigation menu