/i'); add_action('admin_menu', 'WPIRC_menu'); function WPIRC_menu() { add_menu_page('Mibbit IRC Chat Configuration', 'IRC Config', 8, __FILE__, 'IRC_Chat_Conf'); } function IRC_Chat_Conf() { ?>

IRC Configuration

value = $setting_irc_server; $formElem->description = "The IRC Server you wish to use"; $form->addFormElement($formElem); $formElem = new FormElement("IRC_Setting_channel", "The IRC Channel you wish to use (Without the #)"); $formElem->value = $setting_irc_channel; $formElem->description = "The IRC Channel you wish to use"; $form->addFormElement($formElem); echo $form->toString(); ?>

Useful Information

Comments and Feedback

If you have any comments, ideas or any other feedback on this plugin, please leave comments on the Mibbit IRC Chat Plugin on my blog.

 

 

show_errors(); // Update the version regardless update_option("IRC_Chat_Version", WPP_VERSION); } function IRC_CHAT_show_chat($oldcontent) { // Ensure we don't lose the original page $newcontent = $oldcontent; // Detect if we need to render the portfolio by looking for the // special string if (preg_match(WP_STR_SHOW_IRC_CHAT, $oldcontent, $matches)) { //echo "Here!"; // Turn DB stuff into HTML $content = IRC_Render_Chat(); // Now replace search string with formatted portfolio $newcontent = chat_replace_string($matches[0], $content, $oldcontent); } return $newcontent; } add_filter('the_content', 'IRC_CHAT_show_chat'); function chat_replace_string($searchstr, $replacestr, $haystack) { // Faster, but in PHP5. if (function_exists("str_ireplace")) { return str_ireplace($searchstr, $replacestr, $haystack); } // Slower but handles PHP4 else { return preg_replace("/$searchstr/i", $replacestr, $haystack); } } function IRC_Render_Chat() { $content .= "\n\n"; $setting_irc_server = stripslashes(get_option('IRC_Setting_server')); $setting_irc_channel = stripslashes(get_option('IRC_Setting_channel')); $content .= "
"; // Credit link on portfolio. $content .= "
Powered By Wordpress Mibbit AJAX Chat Plugin Created By Keiran Smith
"; // Add some space after the portfolio HTML $content .= "

\n\n"; return $content; } ?>