The regular one, and the customized "hide2 bbcode".
The second one should be viewable if you are logged in, so every registered user can see the message. Al guests still get a message they should register!
Someone knows how to do this?
I tried to add "hide2" by copying all hide-functions, but this did not seem to work...
The default code in includes/bbcode.php:
- // HIDE
- if($tag === 'hide')
- {
- if($this->is_sig && !$board_config['allow_all_bbcode'])
- {
- return $error;
- }
- if($item['iteration'] > 1)
- {
- return $error;
- }
- global $db, $topic_id, $mode;
- $show = false;
- if(defined('IS_ICYPHOENIX') && $userdata['session_logged_in'])
- {
- $sql = "SELECT p.poster_id, p.topic_id
- FROM " . POSTS_TABLE . " p
- WHERE p.topic_id = $topic_id
- AND p.poster_id = " . $userdata['user_id'];
- $resultat = $db->sql_query($sql);
- $show = $db->sql_numrows($resultat) ? true : false;
- $db->sql_freeresult($result);
- $sql = "SELECT *
- FROM " . THANKS_TABLE . "
- WHERE topic_id = $topic_id
- AND user_id = " . $userdata['user_id'];
- $resultat = $db->sql_query($sql);
- $show = ($db->sql_numrows($resultat) || ($show == true))? true : false;
- $db->sql_freeresult($result);
- if (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
- {
- $show = true;
- }
- }
- // generate html
- $html = '<div>';
- if(!$show)
- {
- return array(
- 'valid' => true,
- 'html' => $html . $lang['xs_bbc_hide_message_explain'] . '</div>',
- 'allow_nested' => false,
- );
- }
- else
- {
- return array(
- 'valid' => true,
- 'start' => $html,
- 'end' => '</div>'
- );
- }
- }
I think this code should be changed...
if (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
Thanks in advance!