$addon_name = "Ping service"; $addon_description = "List of RPC services for automatic pinging. <br/>\nExample services:<br/>\nhttp://rpc.pingomatic.com/<br/>\nhttp://rpc.blogrolling.com/pinger/<br/>\nhttp://ping.blo.gs/<br/>\n\nYou can copy paste these services, one at each line, to the form below to start pinging.\n\n <form method='post' action='index.php?view=addons'>\n <input type='hidden' name='pinglistupdate' value='1'>\n <textarea name='pinglist' value='50' style='width:300px;height:100px;'>{$pinglist}</textarea><br \\>\n <input type='submit' value='Update Pinglist'>\n </form>\n"; $addon_version = "1.0"; // The workspace. Where to activate the function inside index.php $addon_workspace = "image_uploaded"; // menu where the addon should appear in admin panel. in this case: images menu $addon_menu = ""; // What would be the title of submenu of this addon: $addon_admin_submenu = ""; // What is the function $addon_function_name = "do_pings"; // Check to see if the ban table exists, if exist add the admin function $query = "SELECT id FROM {$pixelpost_db_prefix}ping LIMIT 1"; if (mysql_query($query)) { // add the function add_admin_functions($addon_function_name, $addon_workspace, $addon_menu, $addon_admin_submenu); } // function do_pings() { global $pixelpost_db_prefix; // Get the ban list $query = "SELECT pinglist FROM {$pixelpost_db_prefix}ping LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); if ($row = mysql_fetch_row($result)) { $pinglist = $row[0]; $pinglistarray = explode("\n", $pinglist); } else { $pinglist = ''; $pinglistarray = array(); }
$akismet_warning = "<br /><br /><font color=\"red\"><strong>Defensio is not designed to work with Akismet. It is suggested to disable Akismet if you want to use Defensio.</strong></font>"; $GLOBALS['defensio_result_message'] = '<div class="jcaption confirm">Defensio is not designed to work with Akismet. It is suggested to disable Akismet if you want to use Defensio.</div>'; } else { $akismet_warning = null; } $addon_description = "<a name='defensio'></a>Pixelpost Add-On to filter spam using Defensio (<a href='http://www.defensio.com' target='_blank'>Info</a>). This is the admin side of the addon, for displaying comments and changing options." . $akismet_warning . "<br /><br /><img src=\"../addons/_defensio/images/poweredbyd.png\">"; //******************************************************************************************************************* // WORKSPACE STUFF //******************************************************************************************************************* add_admin_functions("get_defensio_pages", "comments", "comments", "Defensio"); add_admin_functions("defensio_settings", "additional_spam_measures", "", ""); add_admin_functions('get_defensio_links', 'show_commentbuttons_top'); add_admin_functions('get_defensio_links2', 'show_commentbuttons_bottom'); add_admin_functions('get_defensio_pages', 'pages_commentbuttons'); add_admin_functions('defensio_commentlist', 'single_comment_list'); add_admin_functions('get_defensio_style', 'admin_html_head'); //******************************************************************************************************************* // CHECK DATABASE AND CREATE NECESSARY TABLES/FIELDS //******************************************************************************************************************* // Update comment table if (!is_field_exists('spaminess', 'comments')) { // create field update_comments_table_for_defensio(); } // Create options table if (!is_field_exists('server', 'defensio')) { create_options_table_for_defensio(); } // Update options table if (!is_field_exists('defensio_stats', 'defensio')) { update_options_table_for_defensio1_1();
/** * What would be the title of submenu of this addon: 12cropimage * */ $addon_admin_submenu = "12cropimage"; /** * What is the function name * */ $addon_function_name = "cropimage12_admin_addon"; /** * Add the function * */ add_admin_functions($addon_function_name, $addon_workspace, $addon_menu, $addon_admin_submenu); add_admin_functions('crop_image12_make_ready', 'admin_html_head', '', ''); function crop_image12_make_ready() { global $cfgrow, $txt, $image, $spacer, $pixelpost_db_prefix, $javafile; if (isset($_GET['view']) and $_GET['view'] == "images" && isset($_GET['id'])) { if (!isset($_SESSION["pixelpost_admin"]) || $cfgrow['password'] != $_SESSION["pixelpost_admin"] || isset($_GET["_SESSION"]["pixelpost_admin"]) and $_GET["_SESSION"]["pixelpost_admin"] == $_SESSION["pixelpost_admin"] || isset($_POST["_SESSION"]["pixelpost_admin"]) and $_POST["_SESSION"]["pixelpost_admin"] == $_SESSION["pixelpost_admin"] || isset($_COOKIE["_SESSION"]["pixelpost_admin"]) and $_COOKIE["_SESSION"]["pixelpost_admin"] == $_SESSION["pixelpost_admin"]) { die("Try another day!!"); } if ($cfgrow['crop'] == '12c') { require_once "../includes/12cropimageinc.php"; require_once "../includes/12cropimageincscripts.php"; } } } function cropimage12_admin_addon() {
$addon_menu1 = "comments"; $addon_admin_submenu1 = "Akismet"; $addon_function_name1 = "get_akismet_pages"; // add the function add_admin_functions($addon_function_name1, $addon_workspace1, $addon_menu1, $addon_admin_submenu1); $addon_workspace2 = "additional_spam_measures"; $addon_menu2 = ""; $addon_admin_submenu2 = ""; $addon_function_name2 = "akismet_settings"; // add the function add_admin_functions($addon_function_name2, $addon_workspace2, $addon_menu2, $addon_admin_submenu2); add_admin_functions('get_akismet_links', 'show_commentbuttons_top'); add_admin_functions('get_akismet_links2', 'show_commentbuttons_bottom'); add_admin_functions('get_akismet_pages', 'pages_commentbuttons'); add_admin_functions('get_akismet_pages', 'single_comment_list'); add_admin_functions('get_akismet_style', 'admin_html_head'); //global declaration global $akismet_result_message; //Check whether ADMIN has submitted comment to mark as spam for Akismet if (isset($_GET['view']) && $_GET['view'] == 'comments' && isset($_GET['action']) && $_GET['action'] == 'akismetspam') { if (pp_submit_spam_comment()) { $GLOBALS['akismet_result_message'] = '<div class="jcaption confirm">Selected comments reported as spam to Akismet</div>'; } } //Check whether ADMIN has submitted comment to mark as spam for Akismet if (isset($_GET['view']) && $_GET['view'] == 'comments' && isset($_GET['action']) && $_GET['action'] == 'akismetnotspam') { if (pp_submit_nonspam_comment()) { $GLOBALS['akismet_result_message'] = '<div class="jcaption confirm">Selected comments reported as not spam to Akismet</div>'; } } function get_akismet_links()
$pp_upload = (include "../admin/pp_upload.php"); if (CREATECAT == true) { $pp_createcat_status = "true"; } else { $pp_createcat_status = "false"; } if (!$pp_upload) { $pp_pp_upload_status = "<strong>ERROR! Can not find the file 'pp_upload.php' in the admin folder!</strong><br /><br />"; } else { $pp_pp_upload_status = "<strong>Upload URL:</strong> {$cfgrow['siteurl']}admin/pp_upload.php<br />\n\t\t<strong>Post Key:</strong> " . POSTKEY . "<br />\n\t\t<strong>Auto-Create New Categories:</strong> {$pp_createcat_status}<br />"; } } $addon_name = "External App Upload"; $addon_description = "<p><strong>INFO</strong><br /><br />\n{$pp_pp_upload_status}\n</p>\n<p>\n<em>Settings can be changed by editing the file 'pp_upload.php' located in the Admin folder.</em>\n</p>\n\n\n<p>Created by Jay Williams (<a href=\"http://myd3.com/\">myd3.com</a>)</p>\n"; $addon_version = "2.1"; add_admin_functions('categories_header', 'admin_html_head', '', ''); // your function to show a new page under a submenu in admin panel function process_categories_trim(&$value) { // Trim each element of the array $value = trim($value); } function process_categories($tags) { // strip bad characters $tags = ereg_replace('[^[:space:]a-zA-Z0-9,]', '', $tags); // remove extra spaces $tags = preg_replace('/\\s\\s+/', ' ', $tags); // remove spaces on front or back $tags = trim($tags); // convert spaces to an array