/** * iaa_pwentropy() * * - Admin Hook, integrate_admin_areas, called from Admin.php * - Used to add/modify admin menu areas * * @param mixed[] $admin_areas */ function iaa_pwentropy(&$admin_areas) { global $txt, $scripturl; loadlanguage('pwentropy'); // Load the admin menu, set the URL to force the execution path through action_index $admin_areas['members']['areas']['regcenter']['subsections']['pwentropy'] = array($txt['pwentropy_name'], 'admin_forum', 'url' => $scripturl . '?action=admin;area=regcenter;sa=pwentropy'); }
function TagsMain() { // Load the main Tags template loadtemplate('Tags2'); // Load the language files if (loadlanguage('Tags') == false) { loadLanguage('Tags', 'english'); } // Tags actions $subActions = array('suggest' => 'SuggestTag', 'suggest2' => 'SuggestTag2', 'addtag' => 'AddTag', 'addtag2' => 'AddTag2', 'deletetag' => 'DeleteTag', 'admin' => 'TagsSettings', 'admin2' => 'TagsSettings2', 'cleanup' => 'TagCleanUp'); // Follow the sa or just go to main links index. if (!empty($subActions[@$_GET['sa']])) { $subActions[$_GET['sa']](); } else { ViewTags(); } }
function Staff() { //Load the main staff template loadtemplate('Staff'); //Load the language files if (loadlanguage('Staff') == false) { loadLanguage('Staff', 'english'); } //Staff page actions $subActions = array('admin' => 'StaffSettings', 'admin2' => 'StaffSettings2', 'add' => 'AddGroup', 'delete' => 'DeleteGroup', 'catup' => 'CatUp', 'catdown' => 'CatDown'); // Follow the sa or just go to main staff page. if (!empty($subActions[@$_GET['sa']])) { $subActions[$_GET['sa']](); } else { ViewStaffPage(); } }
function tradermain() { loadtemplate('Trader'); // Load the language files if (loadlanguage('Trader') == false) { loadLanguage('Trader', 'english'); } // Trader actions $subActions = array('main' => 'main', 'report' => 'Report', 'report2' => 'Report2', 'submit' => 'Submit', 'detail' => 'ViewDetail', 'delete' => 'Delete', 'delete2' => 'Delete2', 'submit2' => 'Submit2', 'admin' => 'AdminSettings', 'admin2' => 'AdminSettings2', 'approve' => 'ApproveRating', 'bulkactions' => 'BulkActions'); @($sa = $_GET['sa']); // Follow the sa or just go to administration. if (!empty($subActions[$sa])) { $subActions[$sa](); } else { $subActions['main'](); } }
function LinksMain() { // Load the main links template loadtemplate('Links'); // Load the language files if (loadlanguage('Links') == false) { loadLanguage('Links', 'english'); } // Link actions $subActions = array('addlink' => 'AddLink', 'addlink2' => 'AddLink2', 'editlink' => 'EditLink', 'editlink2' => 'EditLink2', 'visit' => 'VisitLink', 'deletelink' => 'DeleteLink', 'deletelink2' => 'DeleteLink2', 'catup' => 'CatUp', 'catdown' => 'CatDown', 'addcat' => 'AddCat', 'addcat2' => 'AddCat2', 'editcat' => 'EditCat', 'editcat2' => 'EditCat2', 'deletecat' => 'DeleteCat', 'deletecat2' => 'DeleteCat2', 'rate' => 'RateLink', 'approve' => 'Approve', 'noapprove' => 'NoApprove', 'alist' => 'ApproveList', 'admin' => 'LinksAdmin', 'admin2' => 'LinksAdmin2', 'admincat' => 'LinksAdminCats', 'adminperm' => 'LinksAdminPerm', 'catperm' => 'CatPerm', 'catperm2' => 'CatPerm2', 'catpermdelete' => 'CatPermDelete'); // Follow the sa or just go to main links index. if (!empty($_GET['sa']) && array_key_exists($_GET['sa'], $subActions)) { call_user_func($subActions[$_GET['sa']]); } else { view(); } }
function CommentsMain() { loadtemplate('ProfileComments'); loadlanguage('Post'); // Load the language files if (loadlanguage('ProfileComments') == false) { loadLanguage('ProfileComments', 'english'); } // Profile Comments actions $subActions = array('view' => 'ProfileCommentsview', 'admin' => 'CommentsAdmin', 'add' => 'ProfileCommentsAdd', 'add2' => 'ProfileCommentsAdd2', 'edit' => 'ProfileCommentsEdit', 'edit2' => 'ProfileCommentsEdit2', 'delete' => 'ProfileCommentsDelete', 'approve' => 'ProfileCommentsApproveComment'); $sa = $_REQUEST['sa']; // Follow the sa or just go to administration. if (!empty($subActions[$sa])) { $subActions[$sa](); } else { ProfileCommentsview(); } }
function FeedsMain() { // Only Admins should see these options isAllowedTo('admin_forum'); // Load the main feeds template loadtemplate('FeedPoster'); // Load the language files if (loadlanguage('FeedPoster') == false) { loadLanguage('FeedPoster', 'english'); } // FeedPoster actions $subActions = array('addfeed' => 'AddFeed', 'addfeed2' => 'AddFeed2', 'editfeed' => 'EditFeed', 'editfeed2' => 'EditFeed2', 'delfeed' => 'DeleteFeed', 'admin' => 'FeedsAdmin', 'saveset' => 'SaveSettings', 'bulkactions' => 'BulkActions'); // Follow the sa or just go to feeds admin if (!empty($subActions[@$_REQUEST['sa']])) { $subActions[$_REQUEST['sa']](); } else { FeedsAdmin(); } }
function PostSchedulerMain() { // Only Admins should see these options isAllowedTo('admin_forum'); // Load the maintemplate loadtemplate('PostScheduler2'); // Load the language files if (loadlanguage('PostScheduler') == false) { loadLanguage('PostScheduler', 'english'); } // Post Scheduler actions $subActions = array('addpost' => 'AddPost', 'addpost2' => 'AddPost2', 'editpost' => 'EditPost', 'editpost2' => 'EditPost2', 'delpost' => 'DeletePost', 'admin' => 'PostSchedulerAdmin', 'saveset' => 'SaveSettings', 'bulkactions' => 'BulkActions'); // Follow the sa or just go to admin if (!empty($subActions[@$_REQUEST['sa']])) { $subActions[$_REQUEST['sa']](); } else { PostSchedulerAdmin(); } }
function WelcomeTopic() { global $txt; // Check if they are allowed to admin the forum isAllowedTo('admin_forum'); // Load the WelcomeTopic template loadtemplate('WelcomeTopic2'); // Load the language files if (loadlanguage('WelcomeTopic') == false) { loadLanguage('WelcomeTopic', 'english'); } $txt['welcome_topicnote'] = str_replace("{", "[", $txt['welcome_topicnote']); $txt['welcome_topicnote'] = str_replace("}", "]", $txt['welcome_topicnote']); // Welcome Topic actions $subActions = array('admin' => 'WelcomeTopicSettings', 'admin2' => 'WelcomeTopicSettings2', 'add' => 'AddTopic', 'add2' => 'AddTopic2', 'edit' => 'EditTopic', 'edit2' => 'EditTopic2', 'delete' => 'DeleteTopic'); // Follow the sa or main Welcome Topic Settings page. if (!empty($subActions[@$_GET['sa']])) { $subActions[$_GET['sa']](); } else { WelcomeTopicSettings(); } }
function TagsMain() { // Load the main Tags template loadtemplate('Tags'); // Load the language files if (loadlanguage('Tags') == false) { loadLanguage('Tags', 'english'); } // Tags actions $subActions = array('edittopic' => 'EditTopic', 'edittopic2' => 'EditTopic2', 'suggesttopic' => 'SuggestTopic', 'suggesttopic2' => 'SuggestTopic2', 'approvetopic' => 'ApproveTopic', 'deletetopic' => 'DeleteTopic', 'rename' => 'RenameTag', 'viewall' => 'ViewAllTags', 'merge' => 'MergeTag', 'move' => 'MoveTag', 'admin' => 'TagsSettings', 'admin2' => 'TagsSettings2', 'cleanup' => 'TagCleanUp'); // Follow the sa or just go to main links index. if (!empty($subActions[@$_GET['sa']])) { $subActions[$_GET['sa']](); } else { if (allowedTo('smftags_manage')) { if (isset($_REQUEST['todo']) || isset($_REQUEST['create'])) { ManageTags2(); } ManageTags(); } ViewTags(); } }
function tpshout_admin() { global $context, $scripturl, $txt, $smcFunc, $sourcedir; // check permissions isAllowedTo('tp_can_admin_shout'); if (!isset($context['tp_panels'])) { $context['tp_panels'] = array(); } if (isset($_GET['p']) && is_numeric($_GET['p'])) { $tpstart = $_GET['p']; } else { $tpstart = 0; } require_once $sourcedir . '/Subs-Post.php'; loadtemplate('TPShout'); $context['template_layers'][] = 'tpadm'; $context['template_layers'][] = 'subtab'; loadlanguage('TPortalAdmin'); TPadminIndex('shout', true); $context['current_action'] = 'admin'; if (isset($_REQUEST['send']) || isset($_REQUEST[$txt['tp-send']]) || isset($_REQUEST['tp_preview']) || isset($_REQUEST['TPadmin_blocks'])) { $go = 0; $changeArray = array(); foreach ($_POST as $what => $value) { if (substr($what, 0, 18) == 'tp_shoutbox_remove') { $val = substr($what, 18); $smcFunc['db_query']('', ' DELETE FROM {db_prefix}tp_shoutbox WHERE id = {int:shout}', array('shout' => $val)); $go = 2; } elseif (substr($what, 0, 18) == 'tp_shoutbox_hidden') { $val = substr($what, 18); if (!empty($_POST['tp_shoutbox_sticky' . $val])) { $value = '1'; } else { $value = ''; } if (!empty($_POST['tp_shoutbox_sticky_layout' . $val]) && is_numeric($_POST['tp_shoutbox_sticky_layout' . $val])) { $svalue = $_POST['tp_shoutbox_sticky_layout' . $val]; } else { $svalue = '0'; } $smcFunc['db_query']('', ' UPDATE {db_prefix}tp_shoutbox SET value6 = "' . $value . '",value8 = "' . $svalue . '" WHERE id = {int:shout}', array('shout' => $val)); $go = 2; } elseif ($what == 'tp_shoutsdelall' && $value == 'ON') { $smcFunc['db_query']('', ' DELETE FROM {db_prefix}tp_shoutbox WHERE type = {string:type}', array('type' => 'shoutbox')); $go = 2; } elseif ($what == 'tp_shoutsunstickall' && $value == 'ON') { $smcFunc['db_query']('', ' UPDATE {db_prefix}tp_shoutbox SET value6 = "0", value8 = "0" WHERE 1'); $go = 2; } elseif (substr($what, 0, 16) == 'tp_shoutbox_item') { $val = substr($what, 16); $bshout = $smcFunc['htmlspecialchars'](substr($value, 0, 300)); preparsecode($bshout); $smcFunc['db_query']('', ' UPDATE {db_prefix}tp_shoutbox SET value1 = {string:val1} WHERE id = {int:val}', array('val1' => $bshout, 'val' => $val)); $go = 2; } else { $what = substr($what, 3); if ($what == 'shoutbox_smile') { $changeArray['show_shoutbox_smile'] = $value; } if ($what == 'shoutbox_icons') { $changeArray['show_shoutbox_icons'] = $value; } if ($what == 'shoutbox_height') { $changeArray['shoutbox_height'] = $value; } if ($what == 'shoutbox_usescroll') { $changeArray['shoutbox_usescroll'] = $value; } if ($what == 'shoutbox_scrollduration') { if ($value > 5) { $value = 5; } elseif ($value < 1) { $value = 1; } $changeArray['shoutbox_scrollduration'] = $value; } if ($what == 'shoutbox_limit') { if (!is_numeric($value)) { $value = 10; } $changeArray['shoutbox_limit'] = $value; } if ($what == 'shoutbox_refresh') { if (empty($value)) { $value = '0'; } $changeArray['shoutbox_refresh'] = $value; } if ($what == 'show_profile_shouts') { $changeArray['profile_shouts_hide'] = $value; } if ($what == 'shout_allow_links') { $changeArray['shout_allow_links'] = $value; } if ($what == 'shoutbox_layout') { $changeArray['shoutbox_layout'] = $value; } if ($what == 'shout_submit_returnkey') { $changeArray['shout_submit_returnkey'] = $value; } if ($what == 'shoutbox_stitle') { $changeArray['shoutbox_stitle'] = $value; } } } updateTPSettings($changeArray, true); if (empty($go)) { redirectexit('action=tpmod;shout=admin;settings'); } else { redirectexit('action=tpmod;shout=admin'); } } // get latest shouts for admin section // check that a member has been filtered if (isset($_GET['u'])) { $memID = $_GET['u']; } // check that a IP has been filtered if (isset($_GET['ip'])) { $ip = $_GET['ip']; } if (isset($_GET['s'])) { $single = $_GET['s']; } $context['TPortal']['admin_shoutbox_items'] = array(); if (isset($memID)) { $shouts = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value5 = {int:val5} AND value7 = {int:val7}', array('type' => 'shoutbox', 'val5' => $memID, 'val7' => 0)); $weh = $smcFunc['db_fetch_row']($shouts); $smcFunc['db_free_result']($shouts); $allshouts = $weh[0]; $context['TPortal']['admin_shoutbox_items_number'] = $allshouts; $context['TPortal']['shoutbox_pageindex'] = 'Member ' . $memID . ' filtered (<a href="' . $scripturl . '?action=tpmod;shout=admin">' . $txt['remove'] . '</a>) <br />' . TPageIndex($scripturl . '?action=tpmod;shout=admin;u=' . $memID, $tpstart, $allshouts, 10, true); $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value5 = {int:val5} AND value7 = {int:val7} ORDER BY value2 DESC LIMIT {int:start},10', array('type' => 'shoutbox', 'val5' => $memID, 'val7' => 0, 'start' => $tpstart)); } elseif (isset($ip)) { $shouts = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value4 = {string:val4} AND value7 = {int:val7}', array('type' => 'shoutbox', 'val4' => $ip, 'val7' => 0)); $weh = $smcFunc['db_fetch_row']($shouts); $smcFunc['db_free_result']($shouts); $allshouts = $weh[0]; $context['TPortal']['admin_shoutbox_items_number'] = $allshouts; $context['TPortal']['shoutbox_pageindex'] = 'IP ' . $ip . ' filtered (<a href="' . $scripturl . '?action=tpmod;shout=admin">' . $txt['remove'] . '</a>) <br />' . TPageIndex($scripturl . '?action=tpmod;shout=admin;ip=' . urlencode($ip), $tpstart, $allshouts, 10, true); $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value4 = {string:val4} AND value7 = {int:val7} ORDER BY value2 DESC LIMIT {int:start}, 10', array('type' => 'shoutbox', 'val4' => $ip, 'val7' => 0, 'start' => $tpstart)); } elseif (isset($single)) { // check session checkSession('get'); $context['TPortal']['shoutbox_pageindex'] = ''; $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value7 = {int:val7} AND id = {int:shout}', array('type' => 'shoutbox', 'val7' => 0, 'shout' => $single)); } else { $shouts = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value7 = {int:val7}', array('type' => 'shoutbox', 'val7' => 0)); $weh = $smcFunc['db_fetch_row']($shouts); $smcFunc['db_free_result']($shouts); $allshouts = $weh[0]; $context['TPortal']['admin_shoutbox_items_number'] = $allshouts; $context['TPortal']['shoutbox_pageindex'] = TPageIndex($scripturl . '?action=tpmod;shout=admin', $tpstart, $allshouts, 10, true); $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_shoutbox WHERE type = {string:type} AND value7 = {int:val7} ORDER BY value2 DESC LIMIT {int:start}, 10', array('type' => 'shoutbox', 'val7' => 0, 'start' => $tpstart)); } if ($smcFunc['db_num_rows']($request) > 0) { while ($row = $smcFunc['db_fetch_assoc']($request)) { $context['TPortal']['admin_shoutbox_items'][] = array('id' => $row['id'], 'body' => html_entity_decode($row['value1'], ENT_QUOTES), 'poster' => $row['value3'], 'timestamp' => $row['value2'], 'time' => timeformat($row['value2']), 'ip' => $row['value4'], 'ID_MEMBER' => $row['value5'], 'sort_member' => '<a href="' . $scripturl . '?action=tpmod;shout=admin;u=' . $row['value5'] . '">' . $txt['tp-allshoutsbymember'] . '</a>', 'sticky' => $row['value6'], 'sticky_layout' => $row['value8'], 'sort_ip' => '<a href="' . $scripturl . '?action=tpmod;shout=admin;ip=' . $row['value4'] . '">' . $txt['tp-allshoutsbyip'] . '</a>', 'single' => isset($single) ? '<hr><a href="' . $scripturl . '?action=tpmod;shout=admin"><b>' . $txt['tp-allshouts'] . '</b></a>' : ''); } $smcFunc['db_free_result']($request); } $context['TPortal']['subtabs'] = ''; // setup menu items if (allowedTo('tp_can_admin_shout')) { $context['TPortal']['subtabs'] = array('shoutbox_settings' => array('text' => 'tp-settings', 'url' => $scripturl . '?action=tpmod;shout=admin;settings', 'active' => isset($_GET['action']) && ($_GET['action'] == 'tpmod' || $_GET['action'] == 'tpadmin') && isset($_GET['shout']) && $_GET['shout'] == 'admin' && isset($_GET['settings']) ? true : false), 'shoutbox' => array('text' => 'tp-tabs10', 'url' => $scripturl . '?action=tpmod;shout=admin', 'active' => isset($_GET['action']) && ($_GET['action'] == 'tpmod' || $_GET['action'] == 'tpadmin') && isset($_GET['shout']) && $_GET['shout'] == 'admin' && !isset($_GET['settings']) ? true : false)); $context['admin_header']['tp_shout'] = $txt['tp_shout']; } // on settings screen? if (isset($_GET['settings'])) { $context['sub_template'] = 'tpshout_admin_settings'; } else { $context['sub_template'] = 'tpshout_admin'; } $context['page_title'] = 'Shoutbox admin'; tp_hidebars(); }
/** * ModifyGoogleMapSettings() */ function ModifyGoogleMapSettings() { global $txt, $scripturl, $context, $settings, $sc; loadlanguage('GoogleMap'); $context[$context['admin_menu_name']]['tab_data']['tabs']['googlemap']['description'] = $txt['googleMap_desc']; $config_vars = array(array('check', 'googleMap_Enable', 'postinput' => $txt['googleMap_license']), array('title', 'googleMap_MapSettings'), array('select', 'googleMap_ButtonLocation', array('home' => $txt['home'], 'help' => $txt['help'], 'search' => $txt['search'], 'login' => $txt['login'], 'register' => $txt['register'], 'calendar' => $txt['calendar'], 'profile' => $txt['profile'], 'pm' => $txt['pm_short'])), array('float', 'googleMap_DefaultLat', 10, 'postinput' => $txt['googleMap_DefaultLat_info']), array('float', 'googleMap_DefaultLong', 10, 'postinput' => $txt['googleMap_DefaultLong_info']), array('int', 'googleMap_DefaultZoom', 'subtext' => $txt['googleMap_DefaultZoom_Info']), array('select', 'googleMap_Type', array('ROADMAP' => $txt['googleMap_roadmap'], 'SATELLITE' => $txt['googleMap_satellite'], 'HYBRID' => $txt['googleMap_hybrid'])), array('select', 'googleMap_NavType', array('LARGE' => $txt['googleMap_largemapcontrol3d'], 'SMALL' => $txt['googleMap_smallzoomcontrol3d'], 'DEFAULT' => $txt['googleMap_defaultzoomcontrol'])), array('check', 'googleMap_EnableLegend'), array('check', 'googleMap_KMLoutput_enable', 'subtext' => $txt['googleMap_KMLoutput_enable_info']), array('int', 'googleMap_PinNumber', 'subtext' => $txt['googleMap_PinNumber_info']), array('select', 'googleMap_Sidebar', array('none' => $txt['googleMap_nosidebar'], 'right' => $txt['googleMap_rightsidebar'], 'left' => $txt['googleMap_leftsidebar'])), array('check', 'googleMap_BoldMember'), array('title', 'googleMap_MemeberpinSettings'), array('check', 'googleMap_PinGender'), array('text', 'googleMap_PinBackground', 6), array('text', 'googleMap_PinForeground', 6), array('select', 'googleMap_PinStyle', array('googleMap_plainpin' => $txt['googleMap_plainpin'], 'googleMap_textpin' => $txt['googleMap_textpin'], 'googleMap_iconpin' => $txt['googleMap_iconpin'])), array('check', 'googleMap_PinShadow'), array('int', 'googleMap_PinSize', 2), array('text', 'googleMap_PinText', 10, 'postinput' => $txt['googleMap_PinText_info']), array('select', 'googleMap_PinIcon', array('academy' => $txt['academy'], 'activities' => $txt['activities'], 'airport' => $txt['airport'], 'amusement' => $txt['amusement'], 'aquarium' => $txt['aquarium'], 'art-gallery' => $txt['art-gallery'], 'atm' => $txt['atm'], 'baby' => $txt['baby'], 'bank-dollar' => $txt['bank-dollar'], 'bank-euro' => $txt['bank-euro'], 'bank-intl' => $txt['bank-intl'], 'bank-pound' => $txt['bank-pound'], 'bank-yen' => $txt['bank-yen'], 'bar' => $txt['bar'], 'barber' => $txt['barber'], 'beach' => $txt['beach'], 'beer' => $txt['beer'], 'bicycle' => $txt['bicycle'], 'books' => $txt['books'], 'bowling' => $txt['bowling'], 'bus' => $txt['bus'], 'cafe' => $txt['cafe'], 'camping' => $txt['camping'], 'car-dealer' => $txt['car-dealer'], 'car-rental' => $txt['car-rental'], 'car-repair' => $txt['car-repair'], 'casino' => $txt['casino'], 'caution' => $txt['caution'], 'cemetery-grave' => $txt['cemetery-grave'], 'cemetery-tomb' => $txt['cemetery-tomb'], 'cinema' => $txt['cinema'], 'civic-building' => $txt['civic-building'], 'computer' => $txt['computer'], 'corporate' => $txt['corporate'], 'fire' => $txt['fire'], 'flag' => $txt['flag'], 'floral' => $txt['floral'], 'helicopter' => $txt['helicopter'], 'home' => $txt['home1'], 'info' => $txt['info'], 'landslide' => $txt['landslide'], 'legal' => $txt['legal'], 'location' => $txt['location1'], 'locomotive' => $txt['locomotive'], 'medical' => $txt['medical'], 'mobile' => $txt['mobile'], 'motorcycle' => $txt['motorcycle'], 'music' => $txt['music'], 'parking' => $txt['parking'], 'pet' => $txt['pet'], 'petrol' => $txt['petrol'], 'phone' => $txt['phone'], 'picnic' => $txt['picnic'], 'postal' => $txt['postal'], 'repair' => $txt['repair'], 'restaurant' => $txt['restaurant'], 'sail' => $txt['sail'], 'school' => $txt['school'], 'scissors' => $txt['scissors'], 'ship' => $txt['ship'], 'shoppingbag' => $txt['shoppingbag'], 'shoppingcart' => $txt['shoppingcart'], 'ski' => $txt['ski'], 'snack' => $txt['snack'], 'snow' => $txt['snow'], 'sport' => $txt['sport'], 'star' => $txt['star'], 'swim' => $txt['swim'], 'taxi' => $txt['taxi'], 'train' => $txt['train'], 'truck' => $txt['truck'], 'wc-female' => $txt['wc-female'], 'wc-male' => $txt['wc-male'], 'wc' => $txt['wc'], 'wheelchair' => $txt['wheelchair']), 'postinput' => $txt['googleMap_PinIcon_info']), array('title', 'googleMap_ClusterpinSettings'), array('check', 'googleMap_EnableClusterer', 'subtext' => $txt['googleMap_EnableClusterer_info']), array('int', 'googleMap_MinMarkerPerCluster'), array('int', 'googleMap_MinMarkertoCluster'), array('int', 'googleMap_GridSize'), array('check', 'googleMap_ScalableCluster', 'subtext' => $txt['googleMap_ScalableCluster_info']), array('title', 'googleMap_ClusterpinStyle'), array('text', 'googleMap_ClusterBackground', 6), array('text', 'googleMap_ClusterForeground', 6), array('select', 'googleMap_ClusterStyle', array('googleMap_plainpin' => $txt['googleMap_plainpin'], 'googleMap_textpin' => $txt['googleMap_textpin'], 'googleMap_iconpin' => $txt['googleMap_iconpin'], 'googleMap_zonepin' => $txt['googleMap_zonepin'], 'googleMap_peepspin' => $txt['googleMap_peepspin'], 'googleMap_talkpin' => $txt['googleMap_talkpin'])), array('check', 'googleMap_ClusterShadow'), array('int', 'googleMap_ClusterSize', '2'), array('text', 'googleMap_ClusterText', 'postinput' => $txt['googleMap_PinText_info']), array('select', 'googleMap_ClusterIcon', array('academy' => $txt['academy'], 'activities' => $txt['activities'], 'airport' => $txt['airport'], 'amusement' => $txt['amusement'], 'aquarium' => $txt['aquarium'], 'art-gallery' => $txt['art-gallery'], 'atm' => $txt['atm'], 'baby' => $txt['baby'], 'bank-dollar' => $txt['bank-dollar'], 'bank-euro' => $txt['bank-euro'], 'bank-intl' => $txt['bank-intl'], 'bank-pound' => $txt['bank-pound'], 'bank-yen' => $txt['bank-yen'], 'bar' => $txt['bar'], 'barber' => $txt['barber'], 'beach' => $txt['beach'], 'beer' => $txt['beer'], 'bicycle' => $txt['bicycle'], 'books' => $txt['books'], 'bowling' => $txt['bowling'], 'bus' => $txt['bus'], 'cafe' => $txt['cafe'], 'camping' => $txt['camping'], 'car-dealer' => $txt['car-dealer'], 'car-rental' => $txt['car-rental'], 'car-repair' => $txt['car-repair'], 'casino' => $txt['casino'], 'caution' => $txt['caution'], 'cemetery-grave' => $txt['cemetery-grave'], 'cemetery-tomb' => $txt['cemetery-tomb'], 'cinema' => $txt['cinema'], 'civic-building' => $txt['civic-building'], 'computer' => $txt['computer'], 'corporate' => $txt['corporate'], 'fire' => $txt['fire'], 'flag' => $txt['flag'], 'floral' => $txt['floral'], 'helicopter' => $txt['helicopter'], 'home' => $txt['home1'], 'info' => $txt['info'], 'landslide' => $txt['landslide'], 'legal' => $txt['legal'], 'location' => $txt['location1'], 'locomotive' => $txt['locomotive'], 'medical' => $txt['medical'], 'mobile' => $txt['mobile'], 'motorcycle' => $txt['motorcycle'], 'music' => $txt['music'], 'parking' => $txt['parking'], 'pet' => $txt['pet'], 'petrol' => $txt['petrol'], 'phone' => $txt['phone'], 'picnic' => $txt['picnic'], 'postal' => $txt['postal'], 'repair' => $txt['repair'], 'restaurant' => $txt['restaurant'], 'sail' => $txt['sail'], 'school' => $txt['school'], 'scissors' => $txt['scissors'], 'ship' => $txt['ship'], 'shoppingbag' => $txt['shoppingbag'], 'shoppingcart' => $txt['shoppingcart'], 'ski' => $txt['ski'], 'snack' => $txt['snack'], 'snow' => $txt['snow'], 'sport' => $txt['sport'], 'star' => $txt['star'], 'swim' => $txt['swim'], 'taxi' => $txt['taxi'], 'train' => $txt['train'], 'truck' => $txt['truck'], 'wc-female' => $txt['wc-female'], 'wc-male' => $txt['wc-male'], 'wc' => $txt['wc'], 'wheelchair' => $txt['wheelchair']), 'postinput' => $txt['googleMap_PinIcon_info'])); // Saving? if (isset($_GET['save'])) { checkSession(); saveDBSettings($config_vars); redirectexit('action=admin;area=modsettings;sa=googlemap'); } $context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=googlemap'; $context['settings_title'] = $txt['googleMap']; $context['settings_insert_below'] = ' <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/jscolor/jscolor.js"></script> <script type="text/javascript"> var myPicker1 = new jscolor.color(document.getElementById(\'googleMap_PinBackground\'), {}); myPicker1.fromString(document.getElementById(\'googleMap_PinBackground\').value); var myPicker2 = new jscolor.color(document.getElementById(\'googleMap_PinForeground\'), {}); myPicker2.fromString(document.getElementById(\'googleMap_PinForeground\').value); var myPicker3 = new jscolor.color(document.getElementById(\'googleMap_ClusterBackground\'), {}); myPicker3.fromString(document.getElementById(\'googleMap_ClusterBackground\').value); var myPicker4 = new jscolor.color(document.getElementById(\'googleMap_ClusterForeground\'), {}); myPicker4.fromString(document.getElementById(\'googleMap_ClusterForeground\').value); </script>'; prepareDBSettingContext($config_vars); }
function UpdateJSONFeedBots() { global $smcFunc, $txt, $context, $sourcedir, $tag_attrs, $feedcount, $smcFunc, $maxitemcount, $insideitem, $tag, $modSettings; // Load the language files if (loadlanguage('FeedPoster') == false) { loadLanguage('FeedPoster', 'english'); } // First get all the enabled bots $context['feeds'] = array(); $request = $smcFunc['db_query']('', "\n\t\t\tSELECT\n\t\t\t\tID_FEED, ID_BOARD, feedurl, title, postername, updatetime, enabled, html,\n\t\t\t\tID_MEMBER, locked, articlelink, topicprefix, numbertoimport, importevery,\n\t\t\t\tmsgicon, footer, id_topic \n\t\t\tFROM {db_prefix}feedbot\n\t\t\tWHERE enabled = 1 AND json = 1"); while ($row = $smcFunc['db_fetch_assoc']($request)) { $request2 = $smcFunc['db_query']('', "\n\t\t\tSELECT\n\t\t\t\tcount_posts\n\t\t\tFROM {db_prefix}boards \n\t\t\tWHERE ID_BOARD = " . $row['ID_BOARD']); $row2 = $smcFunc['db_fetch_assoc']($request2); $row['count_posts'] = $row2['count_posts']; $context['feeds'][] = $row; } $smcFunc['db_free_result']($request); // For the createPost function require_once $sourcedir . '/Subs-Post.php'; require_once $sourcedir . '/Subs-Editor.php'; // Check if a field expired foreach ($context['feeds'] as $key => $feed) { $current_time = time(); // If the feedbot time to next import has expired if ($current_time > $feed['updatetime']) { $feeddata = disguise_curl($feed['feedurl']); $json_feed_object = json_decode($feeddata); $feedcount = 0; $context['feeditems'] = array(); if (!empty($json_feed_object->entries)) { foreach ($json_feed_object->entries as $entry) { // echo "<h2>{$entry->title}</h2>"; // $published = date("g:i A F j, Y", strtotime($entry->published)); // echo "<small>{$published}</small>"; //echo "<p>{$entry->content}</p>"; $context['feeditems'][$feedcount]['title'] = (string) $entry->title; $context['feeditems'][$feedcount]['description'] = (string) $entry->content; $context['feeditems'][$feedcount]['description'] = html_to_bbc($context['feeditems'][$feedcount]['description']); $context['feeditems'][$feedcount]['link'] = (string) $entry->alternate; $feedcount++; } } if (!empty($feeddata)) { // Process the XML $maxitemcount = $feed['numbertoimport']; $context['feeditems'] = array_reverse($context['feeditems']); // Loop though all the items $myfeedcount = 0; for ($i = 0; $i < $feedcount; $i++) { if ($myfeedcount >= $maxitemcount) { continue; } // Check feed Log // Generate the hash for the log if (!isset($context['feeditems'][$i]['title']) || !isset($context['feeditems'][$i]['description'])) { continue; } if (empty($context['feeditems'][$i]['title']) && empty($context['feeditems'][$i]['description'])) { continue; } $itemhash = md5($context['feeditems'][$i]['title'] . $context['feeditems'][$i]['description']); $request = $smcFunc['db_query']('', "\n\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\tfeedtime\n\t\t\t\t\t\t\tFROM {db_prefix}feedbot_log\n\t\t\t\t\t\t\tWHERE feedhash = '{$itemhash}'"); $smcFunc['db_free_result']($request); // If no has has found that means no duplicate entry if ($smcFunc['db_affected_rows']() == 0) { // Create the Post $msg_title = $smcFunc['htmlspecialchars']($feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title']), ENT_QUOTES); $msg_title = trim($msg_title); $msg_body = ''; if ($feed['html']) { $msg_body = $smcFunc['htmlspecialchars']($context['feeditems'][$i]['description'], ENT_QUOTES); $msg_body = trim($msg_body); preparsecode($msg_body); $msg_body = '[html]' . $msg_body . '[/html]'; $msg_body .= $smcFunc['htmlspecialchars']("\n\n" . $txt['feedposter_source'] . "[url=" . $context['feeditems'][$i]['link'] . "]" . $msg_title . "[/url]", ENT_QUOTES); if (!empty($feed['footer'])) { $msg_body .= $smcFunc['htmlspecialchars']("\n\n" . $feed['footer'], ENT_QUOTES); } } else { $msg_body = $smcFunc['htmlspecialchars'](strip_tags($context['feeditems'][$i]['description']), ENT_QUOTES); $msg_body = trim($msg_body); $msg_body .= $smcFunc['htmlspecialchars']("\n\n" . $txt['feedposter_source'] . "[url=" . $context['feeditems'][$i]['link'] . "]" . $msg_title . "[/url]", ENT_QUOTES); if (!empty($feed['footer'])) { $msg_body .= $smcFunc['htmlspecialchars']("\n\n" . $feed['footer'], ENT_QUOTES); } } $msg_title = htmlspecialchars_decode($msg_title); $msg_body = htmlspecialchars_decode($msg_body); $updatePostCount = $feed['ID_MEMBER'] == 0 ? 0 : 1; if ($feed['count_posts'] == 0) { $updatePostCount = 0; } $msgOptions = array('id' => 0, 'subject' => $feed['topicprefix'] . $msg_title, 'body' => '[b]' . $msg_title . "[/b]\n\n" . $msg_body, 'icon' => $feed['msgicon'], 'smileys_enabled' => 1, 'attachments' => array()); $topicOptions = array('id' => $row['id_topic'], 'board' => $feed['ID_BOARD'], 'poll' => null, 'lock_mode' => $feed['locked'], 'sticky_mode' => null, 'mark_as_read' => false); $posterOptions = array('id' => $feed['ID_MEMBER'], 'name' => $feed['postername'], 'email' => '', 'ip' => '127.0.0.1', 'update_post_count' => $updatePostCount); createPost($msgOptions, $topicOptions, $posterOptions); $topicID = 0; if (isset($topicOptions['id'])) { $topicID = $topicOptions['id']; } $msgID = 0; if (isset($msgOptions['id'])) { $msgID = $msgOptions['id']; } // Add Feed Log $fid = $feed['ID_FEED']; $ftime = time(); $smcFunc['db_query']('', "\n\t\t\t\t\t\t\t\tINSERT INTO {db_prefix}feedbot_log\n\t\t\t\t\t\t\t\t\t(ID_FEED, feedhash, feedtime, ID_TOPIC,ID_MSG)\n\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t\t({$fid},'{$itemhash}',{$ftime},{$topicID},{$msgID})"); $smcFunc['db_query']('', "\n\t\t\t\t\t\t\t\tUPDATE {db_prefix}feedbot\n\t\t\t\t\t\t\t\tSET total_posts = total_posts + 1 \n\t\t\t\t\t\t\t\tWHERE ID_FEED = {$fid}\n\t\t\t\t\t\t\t\t"); $myfeedcount++; } } } // End get feed data // Set the RSS Feed Update time $updatetime = time() + 60 * $feed['importevery']; $smcFunc['db_query']('', "\n\t\t\tUPDATE {db_prefix}feedbot \n\t\t\tSET \n\t\t\t\tupdatetime = '{$updatetime}'\n\t\t\n\t\t\tWHERE ID_FEED = " . $feed['ID_FEED']); } // End expire check } // End for each feed }
<?php /*--------------------------------------------------------------------------------- * Ultimate Portal * Version 0.4 * Project manager: vicram10 * Copyright 2011 * Powered by SMFSimple.com **********************************************************************************/ if (!defined('SMF')) { die('Hacking attempt...'); } global $context, $scripturl, $txt, $ultimateportalSettings, $user_info; // Load Language if (loadlanguage('UPNews') == false) { loadLanguage('UPNews', 'english'); } //Load the News if (!empty($ultimateportalSettings['up_reduce_site_overload'])) { if (cache_get_data('bk_news', 1800) === NULL) { LoadBlockNews(); //Ultimate Portal use SMF Cache data... UP it's the best, only "UP", can create this feature cache_put_data('bk_news', $context['news'], 1800); cache_put_data('page_index_news', $context['page_index'], 1800); } else { $context['news'] = cache_get_data('bk_news', 1800); $context['page_index'] = cache_get_data('page_index_news', 1800); } } else { LoadBlockNews(); }
// // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstrns = loadlanguage('nowshowing'); if ($debug) { dbg("language strings - nowshowing", $lngstrns); } $lngstrpd = loadlanguage('programdetails'); if ($debug) { dbg("language strings - program details", $lngstrpd); } ?> <html> <head> <title>Now showing</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="js/mythweb/init.js"></script> <script type="text/javascript" src="js/mythweb/browser.js"></script> <script type="text/javascript" src="js/mythweb/utils.js"></script> <script type="text/javascript" src="js/mythweb/mouseovers.js"></script> <script type="text/javascript" src="js/mythweb/visibility.js"></script> <script type="text/javascript" src="js/mythweb/ajax.js"></script> <link href="css/nonametv.css" rel=stylesheet>
$debug = false; if ($debug) { dbg("NonameTV", $dconf); } // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstr = loadlanguage('viewepg'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>List EPG servers</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/nonametv.css" rel=stylesheet> <link href="css/viewepg.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php
$debug = false; if ($debug) { dbg("NonameTV", $dconf); } // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstr = loadlanguage('listepgservers'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>List EPG servers</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/nonametv.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php print "<h1>" . $lngstr['title'] . "</h1>\n";
// connect to main database // switch ($dconf[maindbtype]) { case 'mysql': $myc = sql_spojise(); if (!myc) { exit; } break; } // // load language // loadlanguage('global'); if ($debug) { loadlanguage('debug'); dbg("language", $lngstr); } ?> <html> <head> <title>NonameTV: Edit MyAdmin Details</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php print $lngstr[codepage]; ?> "> <script language="JavaScript1.2" src="../javascript/common.js"></script> <link href="../css/nonametv.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000">
function LoadBlockNews() { global $context, $scripturl, $txt, $settings, $ultimateportalSettings, $memberContext, $smcFunc; // Load Language if (loadlanguage('UPNews') == false) { loadLanguage('UPNews', 'english'); } //Prepare the constructPageIndex() function $start = !empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'news' ? (int) $_REQUEST['start'] : 0; $db_count = $smcFunc['db_query']('', "\n\t\t\t\t\tSELECT count(id)\n\t\t\t\t\tFROM {db_prefix}up_news\n\t\t\t\t\tORDER BY id DESC"); $numNews = array(); list($numNews) = $smcFunc['db_fetch_row']($db_count); $smcFunc['db_free_result']($db_count); $context['page_index'] = constructPageIndex($scripturl . '?sa=news', $start, $numNews, $ultimateportalSettings['up_news_limit']); // Calculate the fastest way to get the messages! $limit = $ultimateportalSettings['up_news_limit']; //End Prepare constructPageIndex() function //Load the NEWS $query = $smcFunc['db_query']('', "\n\t\t\t\t\tSELECT n.id, n.id_category, n.id_member, n.title, n.username, n.body, n.date, n.id_member_updated,\n\t\t\t\t\tn.username_updated, n.date_updated, s.id AS id_cat, s.title AS title_cat, s.icon\n\t\t\t\t\tFROM {db_prefix}up_news AS n\n\t\t\t\t\tLEFT JOIN {db_prefix}up_news_sections AS s ON(s.id = n.id_category)\n\t\t\t\t\tORDER BY id DESC " . ($limit < 0 ? "" : "LIMIT {$start}, {$limit} ")); while ($row2 = $smcFunc['db_fetch_assoc']($query)) { $news =& $context['news'][]; $news['id'] = $row2['id']; $news['title'] = '<a href="' . $scripturl . '?action=news;sa=view-new;id=' . $row2['id'] . '">' . stripslashes($row2['title']) . '</a>'; $news['id_member'] = $row2['id_member']; $news['username'] = $row2['username']; $news['author'] = '<a href="' . $scripturl . '?action=profile;u=' . $row2['id_member'] . '">' . stripslashes($row2['username']) . '</a>'; $news['date'] = timeformat($row2['date']); $news['added-news'] = $txt['up_module_news_added_portal_for']; $news['added-news'] = str_replace('[MEMBER]', $news['author'], $news['added-news']); $news['added-news'] = str_replace('[DATE]', $news['date'], $news['added-news']); $news['body'] = stripslashes($row2['body']); $news['id_member_updated'] = !empty($row2['id_member_updated']) ? $row2['id_member_updated'] : ''; $news['username_updated'] = !empty($row2['username_updated']) ? $row2['username_updated'] : ''; $news['author_updated'] = '<a href="' . $scripturl . '?action=profile;u=' . $row2['id_member_updated'] . '">' . stripslashes($row2['username_updated']) . '</a>'; $news['date_updated'] = !empty($row2['date_updated']) ? timeformat($row2['date_updated']) : ''; $news['updated-news'] = !empty($news['id_member_updated']) ? $txt['up_module_news_updated_for'] : ''; $news['updated-news'] = str_replace('[UPDATED_MEMBER]', $news['author_updated'], $news['updated-news']); $news['updated-news'] = str_replace('[UPDATED_DATE]', $news['date_updated'], $news['updated-news']); $news['view'] = '<img style="vertical-align: middle;" border="0" alt="' . $txt['ultport_button_view'] . '" src="' . $settings['default_images_url'] . '/ultimate-portal/view.png" /> <a href="' . $scripturl . '?action=news;sa=view-new;id=' . $row2['id'] . '">' . $txt['ultport_button_view'] . '</a>'; $news['edit'] = '<img style="vertical-align: middle;" alt="' . $txt['ultport_button_edit'] . '" border="0" src="' . $settings['default_images_url'] . '/ultimate-portal/edit.png" /> <a href="' . $scripturl . '?action=news;sa=edit-new;id=' . $row2['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['ultport_button_edit'] . '</a>'; $news['delete'] = '<img style="vertical-align: middle;" border="0" alt="' . $txt['ultport_button_delete'] . '" src="' . $settings['default_images_url'] . '/ultimate-portal/delete.png" /> <a onclick="return makesurelink()" href="' . $scripturl . '?action=news;sa=delete-new;id=' . $row2['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['ultport_button_delete'] . '</a>'; $news['id_cat'] = $row2['id_cat']; $news['title_cat'] = $row2['title_cat']; $news['icon'] = $row2['icon']; } $smcFunc['db_free_result']($query); }
$debug = false; if ($debug) { dbg("NonameTV", $dconf); } // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstr = loadlanguage('listtses'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>List EPG servers</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/nonametv.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php function picksrvidform()
$debug = false; if ($debug) { dbg("NonameTV", $dconf); } // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstr = loadlanguage('listnetworks'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>List EPG servers</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/nonametv.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php function picksrvidform()
} // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } // // load language // $lngstr = loadlanguage('admins'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>NonameTV: Edit Admin</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="JavaScript1.2" src="../javascript/common.js"></script> <link href="../css/nonametv.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php function adminform($a)
$debug = false; if ($debug) { dbg("NonameTV", $dconf); } // // connect to main database // switch ($dconf['dbtype']) { case 'mysql': $myc = sql_doconnect(); if (!$myc) { exit; } break; } $lngstr = loadlanguage('listchannels'); if ($debug) { dbg("language strings", $lngstr); } ?> <html> <head> <title>List channels</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/nonametv.css" rel=stylesheet> <link href="css/listchannels.css" rel=stylesheet> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php
function EditTopic() { global $txt, $context, $db_prefix, $mbname, $user_info, $modSettings, $settings; adminIndex('welcome_settings'); // Load the edit topic template $context['sub_template'] = 'edittopic'; // Set the page title $context['page_title'] = $mbname . ' - ' . $txt['welcome_edittopic']; // Get the Topic ID $id = (int) $_REQUEST['id']; $request = db_query("\n\tSELECT \n\t\tID, welcomesubject, welcomebody\n\tFROM {$db_prefix}welcome\n\tWHERE ID = {$id} LIMIT 1", __FILE__, __LINE__); $row = mysql_fetch_assoc($request); $context['welcome_topic'] = array('ID' => $row['ID'], 'SUBJECT' => $row['welcomesubject'], 'BODY' => $row['welcomebody']); mysql_free_result($request); loadlanguage('Post'); // Check if spellchecking is both enabled and actually working. $context['show_spellchecking'] = !empty($modSettings['enableSpellChecking']) && function_exists('pspell_new'); // Initialize smiley array... $context['smileys'] = array('postform' => array(), 'popup' => array()); if (function_exists('parse_bbc')) { $esmile = 'embarrassed.gif'; } else { $esmile = 'embarassed.gif'; } // Load smileys - don't bother to run a query if we're not using the database's ones anyhow. if (empty($modSettings['smiley_enable']) && $user_info['smiley_set'] != 'none') { $context['smileys']['postform'][] = array('smileys' => array(array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]), array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]), array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]), array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]), array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]), array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]), array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]), array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]), array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]), array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]), array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]), array('code' => ':-[', 'filename' => $esmile, 'description' => $txt[526]), array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]), array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]), array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]), array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530])), 'last' => true); } elseif ($user_info['smiley_set'] != 'none') { $request = db_query("\n\t\t\t\tSELECT code, filename, description, smileyRow, hidden\n\t\t\t\tFROM {$db_prefix}smileys\n\t\t\t\tWHERE hidden IN (0, 2)\n\t\t\t\tORDER BY smileyRow, smileyOrder", __FILE__, __LINE__); while ($row = mysql_fetch_assoc($request)) { $context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row; } mysql_free_result($request); } // Clean house... add slashes to the code for javascript. foreach (array_keys($context['smileys']) as $location) { foreach ($context['smileys'][$location] as $j => $row) { $n = count($context['smileys'][$location][$j]['smileys']); for ($i = 0; $i < $n; $i++) { $context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']); $context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']); } $context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true; } if (!empty($context['smileys'][$location])) { $context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true; } } $settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set']; // Allow for things to be overridden. if (!isset($context['post_box_columns'])) { $context['post_box_columns'] = 60; } if (!isset($context['post_box_rows'])) { $context['post_box_rows'] = 12; } if (!isset($context['post_box_name'])) { $context['post_box_name'] = 'topicbody'; } if (!isset($context['post_form'])) { $context['post_form'] = 'cprofile'; } // Set a flag so the sub template knows what to do... $context['show_bbc'] = !empty($modSettings['enableBBC']) && !empty($settings['show_bbc']); // Generate a list of buttons that shouldn't be shown - this should be the fastest way to do this. if (!empty($modSettings['disabledBBC'])) { $disabled_tags = explode(',', $modSettings['disabledBBC']); foreach ($disabled_tags as $tag) { $context['disabled_tags'][trim($tag)] = true; } } }