https://www.icyphoenix.com/viewtopic.php?f=35&t=3029&p=20975#p20975 ----------------------------------- aliks0905 Thu 01 Nov, 2007 20:45 Re: [hide[ Bbcode Customization Question ----------------------------------- I looked around and only found one post that was closed because the guy was begging too much. but no other posts on how to implement the thanks button into the hide bbcode. anyways, I tweaked my bbcode a little. check it out and see if there are any errors :D [spoiler][code linenumbers=false]if($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; if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) || ($userdata['user_posts'] > 50)) { $show = true; } } // generate html $html = '
' . $lang['xs_bbc_hide_message'] . ':
'; if(!$show) { return array( 'valid' => true, 'html' => $html . '

' . $lang['xs_bbc_hide_message_explain'] . '
', 'allow_nested' => false, ); } else { return array( 'valid' => true, 'start' => $html, 'end' => '' ); } }[/code][/spoiler]