Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Question Can I possibly hide or alternatively remove "last modified"?

More
14 years 1 month ago #1 by Alistair
When a user edits or modifies a post it shows "last modified" or "last edited" (can't say exactly which in English because I have another language file).
Can I possibly hide it or alternatively drastically remove it altogether from the front end? Thanks

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago - 14 years 1 month ago #2 by sozzled
I understand your request. You need to hack the file ../components/com_kunena/template/default_ex/message.php, find the code that displays the "last edit" and comment the code. Of course, when you do this, this will leave you open to allegations that you may have altered your messages after you've posted them ... but that's a problem you'll have to deal with when you're users suggest you may be concealing information from them. ;)

Personally, I wouldn't change this. The current mechanism provides honesty, openness and transparency in how you deal with your forum users. And, yes, I did edit this message after I originally posted it.

There is another way, if you want to conceal this information: directly edit the database (but I'm not going to explain how to do that) :lol:
Last edit: 14 years 1 month ago by sozzled.
The following user(s) said Thank You: camsarim

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #3 by Alistair
sozzled wrote:

find the code that displays the "last edit" and comment the code


That was very quick, thanks. I found that line, but what do you mean though by "comment the code"? I'm not a programmer and I only touch php and css if I'm sure of what I'm doing and I fear "comment" is some sort of programmer jargon, or is it not? ;p

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #4 by xillibit
Hello,

In the file /components/com_kunena/template/default_ex/message.php, at line 333 replace this :
Code:
echo '<span class="fb_message_editMarkUp">'. _KUNENA_EDITING_LASTEDIT .': '. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.';

by this :
Code:
echo '<span class="fb_message_editMarkUp">'. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.';

I don't provide support by PM, because this can be useful for someone else.
The following user(s) said Thank You: kamal

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago - 14 years 1 month ago #5 by sozzled
xillibit has shown you how to remove the text "Last Edit" (or whatever is translated on your website) from the area that displays the timestamp and who modified a posted message. (Thanks, xillibit. I didn't have time to locate exactly where the code is located.)

I presumed you wanted to know how to remove this whole feature and I meant to write "comment out the affected code". In other words, "turn the affected area of the program into a 'comment'". (Commented code is programmer jargon, yes. It means "allow the text in this program to appear so that humans can read it - for comments and such like - but do not run the code. In PHP you can comment code by putting /* before the comment and a */ after the comment.)

Alternatively to xillibit's solution, change from line 332 of ../components/com_kunena/template/default_ex/message.php, from
Code:
if ($fmessage->modified_by) { echo '<span class="fb_message_editMarkUp">'. _KUNENA_EDITING_LASTEDIT .': '. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.'; if ($fmessage->modified_reason) { echo _KUNENA_REASON .': '. kunena_htmlspecialchars(stripslashes($fmessage->modified_reason)); } echo '</span>';
to
Code:
/* if ($fmessage->modified_by) { echo '<span class="fb_message_editMarkUp">'. _KUNENA_EDITING_LASTEDIT .': '. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.'; if ($fmessage->modified_reason) { echo _KUNENA_REASON .': '. kunena_htmlspecialchars(stripslashes($fmessage->modified_reason)); } echo '</span>'; */
Last edit: 14 years 1 month ago by sozzled.
The following user(s) said Thank You: kamal, camsarim

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #6 by Alistair
That was a very neat explanation, I'll try that soon. Thanks

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #7 by LittleJohn
Just to help you understand it, so you can experiment more easily...

php-code that is commented out, doesnt get parsed by the server.
Html that is commented out, is visible in the page source.

But if the PHP is not printed, the html comments is of course not there either.

Example:
PHP:
Code:
$variable = "<b>This is in bold</b> <!-- html comment inside variable - is visible in page source ('view source') --> <br>"; print $variable; // will be shown echo $variable; // will be shown //print $variable; // will not be shown (only one line is commented out) /* print $variable; // will not be shown (a whole block of code is commented out) */

cheers

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #8 by kamal

xillibit wrote: Hello,

In the file /components/com_kunena/template/default_ex/message.php, at line 333 replace this :

Code:
echo '<span class="fb_message_editMarkUp">'. _KUNENA_EDITING_LASTEDIT .': '. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.';

by this :
Code:
echo '<span class="fb_message_editMarkUp">'. date(_DATETIME, $fmessage->modified_time) .' '. _KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by) .'.';


this is to hide the username, now how about to change it to show name instead of username?!!
Code:
_KUNENA_BY .' '. CKunenaTools::whoisID($fmessage->modified_by)

Please Log in or Create an account to join the conversation.

Time to create page: 0.427 seconds