Hi,
For want of finding anything cleaner, I finally used user rank_id and coded in viewtopic.php:
After:Added:After:Added:Results:
Message body:
Just I have to remember to redo the modification on forum update
For want of finding anything cleaner, I finally used user rank_id and coded in viewtopic.php:
After:
Code:
// Start session management$user->session_begin();$auth->acl($user->data);
Code:
$userrank = $user->data['user_rank']; // Modif Couin
Code:
// Parse the message and subject$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;$message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
Code:
if ( $userrank != 1 ) { // Modif Couinwhile ( strpos($message, '[HideMe]') !== false ) {$posstart = strpos($message, '[HideMe]');$posend = strpos($message, '[/HideMe]') + strlen('[/HideMe]');$hidelen = $posend - $posstart;$message = substr_replace($message, '', $posstart, $hidelen);}} else {$message = str_replace('[HideMe]', '', $message);$message = str_replace('[/HideMe]', '', $message);}
Message body:
Admin view:[HideMe]pic@pouet.fr
[/HideMe]grouik grouik grouik
Users/guests view:pic@pouet.fr
grouik grouik grouik
grouik grouik grouik
Just I have to remember to redo the modification on forum update
Statistics: Posted by Couin — Fri Oct 18, 2024 3:23 pm