i installed it but does not work on im.
- Code: Select all
############################################################## ## MOD Title]http://www.kungphu.com#[/url]# MOD Description: Enable '/me' to display IRC-style actions, red with italics. ## MOD Version: 1.0.1 ## ## Installation Level: easy ## Installation Time: 5 Minutes ## Files To Edit: viewtopic.php, posting.php, privmsg.php,## includes/topic_review.php[, portal.php]## Included Files: n/a ############################################################## ## Author Notes: ## Inspired by E.Vosseberg's 'irc /me mod.' [url=http://www.vanallesiets.com#]http://www.vanallesiets.com#[/url]# ## Only users running Smartor's portal need to edit portal.php. The hack this is## based on was very basic, and did not show the action at all in post preview mode.## ## Functionality:## - /me is replaced by *username in posts and PM's## - Formatting ends at the next 'n'## -> Allows multiple actions in a single post## ## Version 1.0.1:## - Fixed installation typo - include -> includes## - Fixed PM quoting bug## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # viewtopic.php# #-----[ FIND ]------------------------------------------ # // Replace naughty words//# #-----[ BEFORE, ADD ]------------------------------------------ # // IRC action hack if (substr_count($message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$poster." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $message = $message_temp; } // /IRC action hack# #-----[ OPEN ]------------------------------------------ # posting.php# #-----[ FIND ]------------------------------------------ # if( $attach_sig && $user_sig != '' ) { $preview_message = $preview_message . '<br><br>_________________<br>' . $user_sig; }# #-----[ BEFORE, ADD ]------------------------------------------ # // IRC action hack if (substr_count($preview_message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($preview_message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$userdata['username']." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $preview_message = $message_temp; } // /IRC action hack# #-----[ FIND ]------------------------------------------ # // Use trim to get rid of spaces placed there by MS-SQL 2000 $quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];# #-----[ AFTER, ADD ]------------------------------------------ # // IRC action hack if (substr_count($message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "[color=darkred][i]*".$quote_username." ".$s[0]."[/i][/color]"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $message = $message_temp; } // /IRC action hack# #-----[ OPEN ]------------------------------------------ # privmsg.php# #-----[ FIND ]------------------------------------------ # if ( $user_sig != '' && $privmsg['privmsgs_attach_sig'] && $user_sig_bbcode_uid != '' ) { $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) ]+]/si', ']', $user_sig); }# #-----[ BEFORE, ADD ]------------------------------------------ # // IRC action hack if (substr_count($private_message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($private_message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$username_from." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $private_message = $message_temp; } // /IRC action hack# #-----[ FIND ]------------------------------------------ # if ( $mode == 'quote' ) { $privmsg_message = $privmsg['privmsgs_text']; $privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid']; $privmsg_message = preg_replace("/:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message); $privmsg_message = str_replace('<br>', "n", $privmsg_message); $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);# #-----[ AFTER, ADD ]------------------------------------------ # // IRC action hack if (substr_count($privmsg_message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($privmsg_message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "[color=red][i]*".$to_username." ".$s[0]."[/i][/color]"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $privmsg_message = $message_temp; } // /IRC action hack# #-----[ FIND ]------------------------------------------ # if ( $attach_sig && $user_sig != '' ) { $preview_message = $preview_message . '<br><br>_________________<br>' . $user_sig; }# #-----[ BEFORE, ADD ]------------------------------------------ # // IRC action hack if (substr_count($preview_message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($preview_message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$userdata['username']." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $preview_message = $message_temp; } // /IRC action hack# #-----[ OPEN ]------------------------------------------ # includes/topic_review.php# #-----[ FIND ]------------------------------------------ # if ( count($orig_word) ) { $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); $message = preg_replace($orig_word, $replacement_word, $message); }# #-----[ AFTER, ADD ]------------------------------------------ # // IRC action hack if (substr_count($message, "/me ")) { $message_temp = ""; $sect = split("/me ", trim($message)); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$poster." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $message = $message_temp; } // /IRC action hack## If you use SMARTOR's portal]------------------------------------------ # portal.php# #-----[ FIND ]------------------------------------------ # $template->assign_block_vars('fetchpost_row', array(# #-----[ BEFORE, ADD ]------------------------------------------ # // IRC action hack if (substr_count($fetchposts[$i]['post_text'], "/me ")) { $message_temp = ""; $sect = split("/me ", trim($fetchposts[$i]['post_text'])); $message_temp .= $sect[0]; unset($sect[0]); foreach($sect as $k=>$s) { $s = split("n", $s); $message_temp .= "<font><i>*".$fetchposts[$i]['username']." ".$s[0]."</i></font>"; unset($s[0]); foreach($s as $line) { $message_temp .= "n".$line; } } $fetchposts[$i]['post_text'] = $message_temp; } // /IRC action hack# #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM