Jump to content
TNG Community
XerxX

Mod: Usercomments - Testers/translators wanted!

Recommended Posts

XerxX

For TNG 11.1.2 - 12

An Event Usercomments is added to getperson.php and familygroup.php below the Notes section and to the bottom of placesearch.php when the person or family is NOT Living nor Private.

 

Not loggedin visitor's view when there is at least one comment (otherwise it's not displayed):

comment1.png

Like here (scroll to bottom): https://xerxx.se/getperson.php?personID=I4&tree=tredNr2

I've used it for a quite a while now ;)

 

Loggedin user's view when there is no comment:

comment5.png

Administrator's view (note: Delete-buttons) when there are comments:

comment2.png

Not-Administrator ready to write:

comment3.png

 

A new page - Usercomments - is added to the Info menu:

comment4.png

 

Texts for translation:

EDIT: Texts removed. New version below.

 

I admit it's simple but it's for comments...

 

Are you interested in testing in TNG 11.1.2 or 12? Add a post below stating which version, and if you want to translate (to which language) and I'll PM you.

Have you got a translation? Thanks! :)Add a post below.

 

Thanks in advance for your help!

Erik

Edited by XerxX
Removed texts

Share this post


Link to post
Share on other sites
manofmull

Erik

Looks like something I could use.

Would love to test on TNG 11.1.2

 

Michael

Share this post


Link to post
Share on other sites
dlcole

Erik,

Would like to test, using version 12.0.1.  Unable to help with translation.

Thanks,

Dave

Share this post


Link to post
Share on other sites
manofmull

Erik

After a few teething problems, it's up and running and comments have been left.

Great job, thank you very much

TNG11.1.2

 

Michael

Share this post


Link to post
Share on other sites
Katryne

Hi Erik !

Here is my translation to French.(Draft until I have tested it in vivo)

$text['commentWrote'] = " a écrit ";
$text['commentMsg'] = "Commentaires de lecteur : ";
$text['commentNotext'] = "Il n'y a pas encore de commentaire...";
$text['commentClick'] = "Écrire un commentaire.";
$text['commentUse'] = "Merci de ne pas utiliser pour des modifications ou des corrections (Utiliser plutôt l'onglet Suggestion).";
$text['commentAddNew'] = "Un nouveau commentaire de";
$text['commentChars'] = "<b>Vous ne pouvez pas utiliser les caractères ";
$text['commentOr'] = " ou ";
$text['commentNoreplace'] = "</b> Ils sont supprimés et non remplacés.";
$text['commentPostbutt'] = "Ajouter votre commentaire !";
$text['commentError1'] = "Aucun commentaire t!";
$text['commentHeader'] = "Personnes, Familles et Lieux avec commentaire(s) de lecteur";
$text['commentReturn1'] = "Retour vers ";
$text['commentReturn2'] = " (dans cette fenêtre/onglet)";
$text['commentPersID'] = "Identifiant de Personne/Famille";
$text['commentPersPlace'] = "Nom (lien = sep. fenêtre/onglet)";
$text['commentSubmitter'] = "Par";
$text['commentAdded'] = "Ajouter";
$text['commentNumb'] = "N°";
$text['commentsDelete'] = "Supprimer";
$admtext['commentsvisits'] = "Commentaires lus";
$admtext['commentPage'] = "Commentaires de lecteur";
$text['commentPage'] = "Commentaires de lecteurs"; // admtext n'est pas universel
$text['commentNew'] = "Nouveau";
$text['commentNewChar'] = "<b>&nbsp;&nbsp; !</b>";
$text['commentNewMail'] = "Nouveau commentaire publié";

I chose to translate User with "Lecteur" (=reader), because Utilisateur for user is not pretty or smart in French.

What does sep. means in :

Name (link = sep. win/tab)

Should the simple quote be escaped inside the text? ie here :

$text['commentNotext'] = "Il n'y a pas encore de commentaire...";

 

(Where is the Suggest Tab ? i cannot see it. Is it because I am logged as admin ?)

Share this post


Link to post
Share on other sites
XerxX

Merci beaucoup, Katryne!

This is very kind of you.

By "sep." I meant "separate" = the link opens the destination in a new (I could have written "new" 😙 ) window/tab. Can I simply move "sep." to the end, like this:

$text['commentPersPlace'] = "Nom (lien = fenêtre/onglet sep.)";

Or "nouveau" is better? At the end, I suppose?

EDIT: I did it like this: $text['commentPersPlace'] = "Nom (lien = fenêtre/onglet nouveau)";  and changed the above text.

 

The single quote is okay. See $text['commentUse']

And Yes; there is no "Suggest" tab when you're admin: It's replaced by the "Edit" tab. And I think you're correct; "Suggestion" in French.

 

Thank You Katryne!

PM me your TNG version if you want a beta version - the two nice people above are testing it w/o trouble right now.

 

Have a nice day!

Erik

Share this post


Link to post
Share on other sites
Katryne
Citation

Or "nouveau" is better? At the end, I suppose?

Well, let's put : $text['commentPersPlace'] = "Nom (lien = nouv. fenêtre/onglet)"; 

And my TNG release is 12.0.1, if I may try the mod, please !

Share this post


Link to post
Share on other sites
Ken Roy

Erik,

Does your User Comment mod allow for restricting some of the comments to logged in family members as well as restricting some of the comments to the TNG Administrator only?

I would be interested in testing as well

Share this post


Link to post
Share on other sites
XerxX

Katryne and Ken: You have mail.

@Ken: No, there are no such restrictions. It's quite simple, actually.

It's what I made for my site looong ago, now made into a public mod. With some additions along the way ;)

Best regards,

Erik

Share this post


Link to post
Share on other sites
XerxX

The mod is closing in to "production status" thanks to testing and suggestions by manofmull, dlcole, Katryne and Ken.

Great job, thanks!

The mod will probably be public later the coming week.

 

I think, though, that it would be nice with a few more languages; right now there are English, French and Swedish translations.

So if you by any chance feel up to it, please translate these texts (hints of use in the above images - or PM me if in doubt):

$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'] = "Person-/FamilyID";
$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>  !</b>";
$text['commentNewMail'] = "New Comment posted";
$text['commentDatabase'] = "Database";
$text['commentMail'] = "Mail";
$text['commentErrorinsert'] = " error on Insert 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)

The two last ones may be really tricky and your fantasy and language skills may be tested to the limit.

There's a long explanation for the limitation but a short one is: The .cfg file serves two character sets. Therefore HTML-entities (&auml; = ä, &eacute; = é...) must be used for umlauted and accented letters. Otherwise strange characters will be displayed - at least for the ANSI letters as the .cfg is written in UTF-8.

The problem is that tose two cases (page title and JavaScript alerts) display the text as received, i.e. as "&auml;"...
 

Please add a post telling us to which language you translate, so no one else does the same.

And when you're done; please PM the translation to me.

 

Thanks A Lot in advance!

Erik

Edited by XerxX
Added text

Share this post


Link to post
Share on other sites
Katryne

Merci Erik.

I installed it on my village site and it is working perfectly.

I would have liked to enable public writing too. I remember you warned me against it, and I understand the extent of the spaming risk, but if I want village people to take part in it, membership will be too complicated to produce enough interesting comments.

Thanks again for all your wonderful mods and your help.

Share this post


Link to post
Share on other sites
Ken Roy

Hi Erik,

Just a thought on how you might allow public comment in the future.  If visitor is not logged in - use the TNG_captcha.php interface which would support any of the captcha mods as well as the distributed reCaptcha v2.  Potentially require that the TNG Admin approve the comment.

Of course that might require too much work.. 🤣

Share this post


Link to post
Share on other sites
XerxX

Katryne and Ken,

Yes, maybe a captcha would be enough to stop spamming. A good idea; I will have that in mind for an update.

I have never used the function so I'll have to learn.

 

Thank You to both of you - and manofmull and dlcole - for your kind assistance with this mod.

Erik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×