Loading...
 

Tikiwiki-devel (mailman list mirror)


Issue with forum reply title and preference name=comments_notitle

posts: 7740 Israel

Hello Tikiers,

In the forums we have a pref,
"Require reply to have a title" : 'forum_reply_forcetitle'.
Make sense that Admins go to the forum control panel and set check or uncheck it to set a forum preference.

But when you add a message to an existing forum discussion (created using "Discuss pages on forums") the code is checking
"Disable comment titles" : 'comments_notitle' (a kind of the same preference but in the Comments control panel.) - (lib/comments/commentslib.php line 3655)

if ($prefs'comments_notitle' != 'y' && | empty($params'comments_data') {
$errors[] = tra('Please enter a Title and Message for your forum reply.');
} elseif 'comments_data'" class="wiki wikinew text-danger tips empty">$params'comments_data' { //if comments do not require title but message is empty
$errors[] = tra('Please enter a Message for your forum reply.');
}

It look to me that we have 2 preferences that just do the same. Only one is checked when posting a reply in that case.


It is possible to;

  • Use only one preference (deleting one and making it the same for both Comments and Forums) is not ideal (Forums and Comments are 2 distinct features) and how many Tiki using forums and/or comments will stop working as they were originally set after an upgrade ?

  • Adding both at both place (each control panel will have "Require reply to have a title" and "Disable comment titles" checkboxes but that doesn't clarify the situation at all and can make things more confusing.

  • Changing the code and adding a check for the 'forum_reply_forcetitle'.



What should be done ?

Bernard


PS : I solve my issue using the following, but this doesn't look to me as the perfect solution for both Forums and Comments (they are 2 distinct features)… someone clever to show me the way ? :-)

if ($prefs'forum_reply_forcetitle' !='n') {
if ($prefs'comments_notitle' != 'y' && | empty($params'comments_data') {
$errors[] = tra('Please enter a Title and Message for your forum reply beep.');
} elseif 'comments_data'" class="wiki wikinew text-danger tips empty">$params'comments_data' { //if comments do not require title but message is empty
$errors[] = tra('Please enter a Message for your forum reply.');
}
}

PSS : I though it would be more readable in a Wish but dev is down… and it is good to have more brains (this is not just a bug)

___
TikiWiki-devel mailing list
TikiWiki-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.