/** * Main executable * * @param object registry object * @return @e void */ public function doExecute(ipsRegistry $registry) { $registry->getClass('class_localization')->loadLanguageFile(array('admin_templates'), 'core'); //----------------------------------------- // Load functions and cache classes //----------------------------------------- $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions'); $this->userAgentFunctions = new $classToLoad($registry); //----------------------------------------- // What shall we do? //----------------------------------------- switch ($this->request['do']) { case 'saveuAgent': if (!$registry->getClass('class_permissions')->checkPermission('ua_manage', ipsRegistry::$current_application, 'tools')) { $this->returnJsonError($registry->getClass('class_localization')->words['sk_ajax_noperm']); } $this->_saveuAgent(); break; case 'removeuAgent': if (!$registry->getClass('class_permissions')->checkPermission('ua_remove', ipsRegistry::$current_application, 'tools')) { $this->returnJsonError($registry->getClass('class_localization')->words['sk_ajax_noperm']); } $this->_removeuAgent(); break; } }
/** * Main executable * * @param object registry object * @return @e void */ public function doExecute(ipsRegistry $registry) { $registry->getClass('class_localization')->loadLanguageFile(array('admin_templates'), 'core'); //----------------------------------------- // Load functions and cache classes //----------------------------------------- require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php'; /*noLibHook*/ require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php'; /*noLibHook*/ require_once IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php'; /*noLibHook*/ $this->skinFunctions = new skinDifferences($registry); /* Check... */ if (!$registry->getClass('class_permissions')->checkPermission('templates_manage', ipsRegistry::$current_application, 'templates')) { $this->returnJsonError($registry->getClass('class_localization')->words['sk_ajax_noperm']); } //----------------------------------------- // What shall we do? //----------------------------------------- switch ($this->request['do']) { default: case 'getTemplateBitList': $this->_getTemplateBitList(); break; case 'replace': $this->_replace(); break; } }
/** * Returns content for the page */ public function getDisplayContent($group = array(), $tabsUsed = 4) { #Load html template $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_syncApp_group_form', 'syncApp'); #return display stuff return array('tabs' => $this->html->acp_group_form_tabs($group, $tabsUsed + 1), 'content' => $this->html->acp_group_form_main($group, $tabsUsed + 1), 'tabsUsed' => 1); }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Load HTML //----------------------------------------- $this->html = $this->registry->output->loadTemplate('cp_skin_blocks'); //----------------------------------------- // Load Language //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang')); //----------------------------------------- // What to do? //----------------------------------------- switch ($this->request['do']) { case 'reorder': $this->_doReorder(); break; case 'reorderCats': $this->_doReorderCats(); break; case 'fetchEncoding': $this->_fetchEncoding(); break; case 'preview': default: $this->_showBlockPreview(); break; } }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return @e void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Set up stuff //----------------------------------------- $this->form_code = 'module=settings&section=settings'; $this->form_code_js = 'module=settings§ion=settings'; //------------------------------- // Grab, init and load settings //------------------------------- $classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings'); $settings = new $classToLoad($this->registry); $settings->makeRegistryShortcuts($this->registry); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_tools'), 'core'); $settings->html = $this->registry->output->loadTemplate('cp_skin_settings', 'core'); $settings->form_code = $settings->html->form_code = 'module=settings&section=settings'; $settings->form_code_js = $settings->html->form_code_js = 'module=settings§ion=settings'; $this->request['conf_title_keyword'] = 'calendar'; $settings->return_after_save = $this->settings['base_url'] . $this->form_code; $settings->_viewSettings(); //----------------------------------------- // Pass to CP output hander //----------------------------------------- $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); $this->registry->getClass('output')->sendOutput(); }
/** * Save tab preference order * * @return @e void */ protected function _saveTabs() { //----------------------------------------- // Store order //----------------------------------------- $order = array(); $append = array(); foreach ($this->tabKeys as $pos => $key) { if ($this->request['pos_' . $key]) { $order[$this->request['pos_' . $key]] = $key; } else { $append[] = $key; } } if (count($append)) { $order = array_merge($order, $append); } ksort($order); //----------------------------------------- // Save preference //----------------------------------------- ipsRegistry::getClass('adminFunctions')->staffSaveCookie('tabOrder', $order); //----------------------------------------- // Return new order //----------------------------------------- $this->returnJsonArray(array('order' => $order)); }
/** * Get Content URL * * @param array $warning Row from members_warn_logs * @return @e array array( url => URL to the content the warning came from, title => Title ) */ public function getContentUrl($warning) { ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_profile'), 'members'); if ($warning['wl_content_id1']) { $post = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_posts', 'where' => "msg_id=" . intval($warning['wl_content_id1']))); if (!empty($post['msg_topic_id'])) { $topic = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_topics', 'where' => "mt_id={$post['msg_topic_id']}")); if (!empty($topic['mt_id'])) { ipsRegistry::DB()->build(array('select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_topic_id={$post['msg_topic_id']}")); ipsRegistry::DB()->execute(); while ($row = ipsRegistry::DB()->fetch()) { if ($row['map_user_id'] == ipsRegistry::member()->getProperty('member_id')) { return array('url' => ipsRegistry::getClass('output')->buildUrl("app=members&module=messaging&section=view&do=findMessage&topicID={$topic['mt_id']}&msgID={$post['msg_id']}"), 'title' => $topic['mt_title']); } } return array('url' => ipsRegistry::getClass('output')->buildUrl("app=core&module=reports§ion=reports&do=showMessage&topicID={$topic['mt_id']}&msg={$post['msg_id']}"), 'title' => $topic['mt_title']); } } } else { $member = IPSMember::load($warning['wl_member']); if (!empty($member['member_id'])) { return array('url' => ipsRegistry::getClass('output')->buildSEOUrl("showuser={$member['member_id']}", 'public', $member['members_seo_name'], 'showuser'), 'title' => ipsRegistry::getClass('class_localization')->words['warnings_profile']); } } }
/** * Constructor * * @param ipsRegistry */ public function __construct($registry) { $this->title = $registry->getClass('class_localization')->words['enhancements_facebook']; $this->description = $registry->getClass('class_localization')->words['enhancements_facebook_desc']; $this->enabled = ipsRegistry::$settings['fbc_enable']; $this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=facebook" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_facebook_help'] . '</a>'; }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Load HTML //----------------------------------------- $this->html = $this->registry->output->loadTemplate('cp_skin_filemanager'); //----------------------------------------- // Set up stuff //----------------------------------------- $this->form_code = $this->html->form_code = 'module=pages&section=manage'; $this->form_code_js = $this->html->form_code_js = 'module=pages§ion=manage'; //----------------------------------------- // Load Language //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang')); //----------------------------------------- // Grab extra CSS //----------------------------------------- $this->registry->output->addToDocumentHead('importcss', $this->settings['skin_app_url'] . 'css/ccs.css'); //----------------------------------------- // Get existing folders //----------------------------------------- $this->DB->build(array('select' => '*', 'from' => 'ccs_folders')); $this->DB->execute(); while ($r = $this->DB->fetch()) { $this->folders[] = $r['folder_path']; } //----------------------------------------- // What to do? //----------------------------------------- switch ($this->request['do']) { case 'multi': $this->_multiAction(); break; case 'deleteFolder': $this->_deleteFolder(urldecode($this->request['dir'])); break; case 'emptyFolder': $this->_emptyFolder(urldecode($this->request['dir'])); break; case 'doCreateFolder': $this->_doCreateFolder(); break; case 'doRenameFolder': $this->_doRenameFolder(); break; case 'editFolder': $this->_directoryForm('edit'); break; case 'createFolder': default: $this->_directoryForm('add'); break; } //----------------------------------------- // Pass to CP output hander //----------------------------------------- $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); $this->registry->getClass('output')->sendOutput(); }
/** * Do some set up after ipsRegistry::init() * * @access public */ public function afterOutputInit() { if (IN_ACP) { $this->globalHtml = ipsRegistry::getClass('output')->loadTemplate('cp_skin_convert'); ipsRegistry::getClass('output')->html .= $this->globalHtml->convertCSS(); } }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Init //----------------------------------------- $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('settemplates_meta'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_seo')); $this->html = $this->registry->output->loadTemplate('cp_skin_seo'); //----------------------------------------- // What are we doing? //----------------------------------------- switch ($this->request['do']) { case 'add': case 'edit': $this->form(); break; case 'save': $this->save(); break; case 'delete': $this->delete(); break; default: $this->manage(); break; } //----------------------------------------- // Display //----------------------------------------- $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); $this->registry->output->sendOutput(); }
/** * Grab the RSS document content and return it * * @return string RSS document */ public function returnRSSDocument() { //----------------------------------------- // INIT //----------------------------------------- $member_id = intval(ipsRegistry::$request['member_id']); $secure_key = IPSText::md5Clean(ipsRegistry::$request['rss_key']); $rss_data = array(); $to_print = ''; if ($secure_key and $member_id) { if ($member_id == ipsRegistry::member()->getProperty('member_id')) { //----------------------------------------- // Get RSS export //----------------------------------------- $rss_data = ipsRegistry::DB()->buildAndFetch(array('select' => 'rss_cache', 'from' => 'rc_modpref', 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'")); //----------------------------------------- // Got one? //----------------------------------------- if ($rss_data['rss_cache']) { return $rss_data['rss_cache']; } } //----------------------------------------- // Create a dummy one //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_reports'), 'core'); $classToLoad = IPSLib::loadLibrary(IPS_KERNEL_PATH . 'classRss.php', 'classRss'); $rss = new $classToLoad(); $channel_id = $rss->createNewChannel(array('title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], 'link' => ipsRegistry::$settings['board_url'], 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], 'pubDate' => $rss->formatDate(time()))); $rss->createRssDocument(); return $rss->rss_document; } }
public function __construct() { $this->registry = ipsRegistry::instance(); $this->settings = ipsRegistry::fetchSettings(); $this->lang = $this->registry->getClass('class_localization'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp'); }
/** * Constructor * * @return @e void */ public function __construct(ipsRegistry $registry) { /* Get class forums, used for displaying forum names on results */ if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) { $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums'); ipsRegistry::setClass('class_forums', new $classToLoad(ipsRegistry::instance())); ipsRegistry::getClass('class_forums')->strip_invisible = 1; ipsRegistry::getClass('class_forums')->forumsInit(); } /* Load tagging stuff */ if (!$registry->isClassLoaded('tags')) { require_once IPS_ROOT_PATH . 'sources/classes/tags/bootstrap.php'; /*noLibHook*/ $registry->setClass('tags', classes_tags_bootstrap::run('forums', 'topics')); } /* Get live or archive */ $this->searchArchives = ipsRegistry::$request['search_app_filters']['forums']['liveOrArchive'] == 'archive' ? true : false; if ($this->searchArchives) { /* Load up archive class */ $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader.php', 'classes_archive_reader'); $this->archiveReader = new $classToLoad(); $this->archiveReader->setApp('forums'); $this->table = $this->archiveReader->getFields(); $this->table['_table_'] = 'forums_archive_posts'; $this->table['_prefix_'] = 'p.archive_'; } else { $this->table = array('_table_' => 'posts', '_prefix_' => 'p.', 'pid' => 'pid', 'author_id' => 'author_id', 'author_name' => 'author_name', 'ip_address' => 'ip_address', 'post_date' => 'post_date', 'post' => 'post', 'queued' => 'queued', 'topic_id' => 'topic_id', 'new_topic' => 'new_topic', 'post_bwoptions' => 'post_bwoptions', 'post_key' => 'post_key', 'post_htmlstate' => 'post_htmlstate', 'use_sig' => 'use_sig', 'use_emo' => 'use_emo', 'append_edit' => 'append_edit', 'edit_time' => 'edit_time', 'edit_name' => 'edit_name', 'post_edit_reason' => 'post_edit_reason'); } parent::__construct($registry); /* Set up wrapper */ $this->templates = array('group' => 'search', 'template' => 'searchResultsAsForum'); }
/** * CONSTRUCTOR * * @return @e void */ public function __construct() { $this->registry = ipsRegistry::instance(); $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $sqlPassed = FALSE; $classname = "db_driver_Mysql"; $sync_DB = new $classname(); $sync_DB->obj['sql_database'] = $this->settings['syncapp_realm_database']; $sync_DB->obj['sql_user'] = $this->settings['syncapp_mysql_user']; $sync_DB->obj['sql_pass'] = $this->settings['syncapp_mysql_password']; $sync_DB->obj['sql_host'] = $this->settings['syncapp_mysql_ip']; $sync_DB->return_die = true; if (!$sync_DB->connect()) { $fail = 1; return $fail; /* At this point we dont have a connection so ABORT! else database driver error */ } if ($this->settings['syncapp_mysql_user'] || $this->settings['syncapp_mysql_password'] || $fail != 1) { $this->sqlPassed = TRUE; $this->registry->dbFunctions()->setDB('mysql', 'auth_DB', array('sql_database' => $this->settings['syncapp_realm_database'], 'sql_user' => $this->settings['syncapp_mysql_user'], 'sql_pass' => $this->settings['syncapp_mysql_password'], 'sql_host' => $this->settings['syncapp_mysql_ip'])); } else { return; } }
/** * Parse/format the online list data for the records * * @access public * @author Brandon Farber * @param array Online list rows to check against * @return array Online list rows parsed */ public function parseOnlineEntries($rows) { if (!is_array($rows) or !count($rows)) { return $rows; } $final = array(); foreach ($rows as $row) { if ($row['current_appcomponent'] == 'core') { if ($row['current_module'] == 'global') { if ($row['current_section'] == 'login') { $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_login']; } } else { if ($row['current_module'] == 'search') { $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_search']; } else { if ($row['current_module'] == 'reports') { $rcCache = ipsRegistry::cache()->getCache('report_cache'); if (is_array($rcCache)) { if ($rcCache['group_access'][ipsRegistry::member()->getProperty('member_group_id')] == true) { $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_reports']; } } } } } } $final[$row['id']] = $row; } return $final; }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Init //----------------------------------------- $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('seo_advice'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_seo')); $this->html = $this->registry->output->loadTemplate('cp_skin_seo'); //----------------------------------------- // What are we doing? //----------------------------------------- switch ($this->request['do']) { case 'ignore': $this->ignoreWarning(); break; case 'clear_warnings': $this->clearWarnings(); break; case 'download_sitemap': $this->downloadSitemap(); break; default: $this->dashboard(); break; } //----------------------------------------- // Display //----------------------------------------- $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); $this->registry->output->sendOutput(); }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Init //----------------------------------------- $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('seo_activity'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_seo')); $this->html = $this->registry->output->loadTemplate('cp_skin_seo'); if ($this->request['engine']) { $this->engine = $this->DB->addSlashes(strtolower($this->request['engine'])); $this->engine = $this->engine == 'msnbot' ? 'bing' : $this->engine; } $app = $this->DB->buildAndFetch(array('select' => 'app_added', 'from' => 'core_applications', 'where' => "app_directory = 'ipseo'")); $days = 7; if ($app['app_added'] > time() - 86400 * 7) { $days = 2; } if ($app['app_added'] > time() - 86400 * 2) { $days = 1; } $this->days = $this->request['days'] ? intval($this->request['days']) : $days; if ($this->days == 1) { $this->mysqlGroup = '%H'; $this->phpGroup = 'H'; } else { if ($this->days == 28) { $this->mysqlGroup = '%e'; $this->phpGroup = 'j'; } else { $this->mysqlGroup = '%w'; $this->phpGroup = 'w'; } } //----------------------------------------- // What are we doing? //----------------------------------------- switch ($this->request['do']) { case 'keywords': $this->_showKeywords(); break; case 'visitors': $this->_showVisitors(); break; case 'search_chart': $this->renderSearchChart(); break; case 'spider_chart': $this->renderSpiderChart(); break; default: $this->showDashboard(); break; } //----------------------------------------- // Display //----------------------------------------- $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); $this->registry->output->sendOutput(); }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Load HTML //----------------------------------------- $this->html = $this->registry->output->loadTemplate('cp_skin_templates'); //----------------------------------------- // Set up stuff //----------------------------------------- $this->form_code = $this->html->form_code = 'module=templates&section=pages'; $this->form_code_js = $this->html->form_code_js = 'module=templates§ion=pages'; //----------------------------------------- // Load Language //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang')); //----------------------------------------- // Grab extra CSS //----------------------------------------- $this->registry->output->addToDocumentHead('importcss', $this->settings['skin_app_url'] . 'css/ccs.css'); //----------------------------------------- // What to do? //----------------------------------------- switch ($this->request['do']) { case 'add': case 'edit': $this->_form($this->request['do']); break; case 'doAdd': case 'doEdit': $this->_save(strtolower(str_replace('do', '', $this->request['do']))); break; case 'delete': $this->_delete(); break; case 'addCategory': $this->_categoryForm('add'); break; case 'editCategory': $this->_categoryForm('edit'); break; case 'doAddCategory': $this->_categorySave('add'); break; case 'doEditCategory': $this->_categorySave('edit'); break; case 'deleteCategory': $this->_deleteCategory(); break; default: $this->_list(); break; } //----------------------------------------- // Pass to CP output hander //----------------------------------------- $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); $this->registry->getClass('output')->sendOutput(); }
/** * Returns sidebar links for this tab * You may return an empty array or FALSE to not have * any links show in the sidebar for this block. * * The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL * is added automatically. * * The image must be a full URL or blank to use a default image. * * Use the format: * $array[] = array( 'img' => '', 'url' => '', 'title' => '' ); * * @author Matt Mecham * @param array Member data * @return array Array of links */ public function getSidebarLinks($member = array()) { $array = array(); if ($member['failed_login_count']) { $array[] = array('img' => '', 'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=" . ipsRegistry::member()->form_hash . "&mid_{$member['member_id']}=1&type=unlock", 'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins']); } return $array; }
/** * Main executable * * @param object registry object * @return @e void */ public function doExecute(ipsRegistry $registry) { $registry->getClass('class_localization')->loadLanguageFile(array('admin_templates'), 'core'); //----------------------------------------- // Load functions and cache classes //----------------------------------------- require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php'; /*noLibHook*/ require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php'; /*noLibHook*/ require_once IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php'; /*noLibHook*/ $this->skinFunctions = new skinDifferences($registry); /* Check... */ if (!$registry->getClass('class_permissions')->checkPermission('skindiff_reports', ipsRegistry::$current_application, 'templates')) { $this->returnJsonError($registry->getClass('class_localization')->words['sk_ajax_noperm']); exit; } //----------------------------------------- // What shall we do? //----------------------------------------- switch ($this->request['do']) { default: case 'process': $this->_process(); break; case 'merge': $this->_merge(); break; case 'viewDiff': $this->_viewDiff(); break; case 'editDiff': $this->_editDiff(); break; case 'saveEdit': $this->_saveEdit(); break; case 'viewVersion': $this->_viewVersion(); break; case 'resolveAllSingle': $this->_resolveAllSingle(); break; } }
public function __construct() { $this->settings = ipsRegistry::fetchSettings(); $this->lang = ipsRegistry::getClass('class_localization'); $this->caches =& ipsRegistry::cache()->fetchCaches(); $this->cache = ipsRegistry::cache(); $this->DB = ipsRegistry::DB(); }
/** * Formats the calendar search result for display * * @access public * @param array $search_row Array of data from search_index * @return string Formatted content, ready for display */ public function formatContent($search_row) { /* Format as a topic */ if ($search_row['misc']) { return ipsRegistry::getClass('output')->getTemplate('search')->calEventRangedSearchResult($search_row, $this->search_plugin->onlyTitles); } else { return ipsRegistry::getClass('output')->getTemplate('search')->calEventSearchResult($search_row, $this->search_plugin->onlyTitles); } }
/** * Main class entry point * * @param object ipsRegistry reference * @return @e void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Load skin //----------------------------------------- $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_hooks_export', 'core'); //----------------------------------------- // Load hooks library //----------------------------------------- $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('core') . '/sources/classes/hooksFunctions.php', 'hooksFunctions'); $this->hooksFunctions = new $classToLoad($registry); //----------------------------------------- // Load lang //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_hooks')); switch ($this->request['do']) { case 'getStrings': $this->_getAjaxStrings(); break; case 'getLangFiles': $this->_getAjaxFiles(); break; case 'getTemplates': $this->_getAjaxTemplates(); break; case 'getSkinFiles': $this->_getAjaxSkins(); break; // These are for the add file form // These are for the add file form case 'getGroupsForAdd': $this->_getGroupsForAdd(); break; case 'getTemplatesForAdd': $this->_getTemplatesForAdd(); break; case 'getHookIds': $this->_getHookIds(); break; case 'getDataLocationsForAdd': $this->_getDataLocationsForAdd(); break; case 'getApplications': $this->_getApplications(); break; case 'getAppVersions': $this->_getAppVersions(); break; case 'save': $this->save(); break; case 'show': default: $this->show(); break; } }
/** * Grab the RSS links * * @return array RSS links */ public function getRssLinks() { $return = array(); ipsRegistry::DB()->build(array('select' => 'rss_export_title, rss_export_id', 'from' => 'rss_export', 'where' => 'rss_export_enabled=1')); ipsRegistry::DB()->execute(); while ($r = ipsRegistry::DB()->fetch()) { $return[] = array('title' => $r['rss_export_title'], 'url' => ipsRegistry::getClass('output')->formatUrl(ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=forums&id=" . $r['rss_export_id'], '%%' . $r['rss_export_title'] . '%%', 'section=rss2')); } return $return; }
/** * Get Form Data * * @return array */ public function getFormData($current) { /* Get groups */ $groups = array(); foreach (ipsRegistry::cache()->getCache('group_cache') as $g) { $groups[] = array($g['g_id'], $g['g_title']); } /* Return */ return array('group' => array("Is in group", ipsRegistry::getClass('output')->formMultiDropdown('members-group[]', $groups, empty($current) ? array() : $current['group'])), 'last_visit' => array("Last Visit Was", ipsRegistry::getClass('output')->formDropdown('members-last_visit_1', array(array('l', "Less Than"), array('e', "Equal to"), array('g', "Greater Than")), empty($current) ? 'l' : $current['last_visit_1']) . ipsRegistry::getClass('output')->formSimpleInput('members-last_visit_2', empty($current) ? '' : $current['last_visit_2']) . " days ago"), 'joined' => array("Joined", ipsRegistry::getClass('output')->formDropdown('members-joined_1', array(array('l', "Less Than"), array('e', "Equal to"), array('g', "Greater Than")), empty($current) ? 'l' : $current['joined_1']) . ipsRegistry::getClass('output')->formSimpleInput('members-joined_2', empty($current) ? '' : $current['joined_2']) . " days ago")); }
/** * Main class entry point * Redirects user to configuration or conversion page * * @access public * @param object ipsRegistry * @return void */ public function doExecute(ipsRegistry $registry) { if (file_exists(DOC_IPS_ROOT_PATH . 'cache/converter_lock.php')) { ipsRegistry::getClass('output')->showError('The converters have been locked. To unlock, delete the cache/converter_lock.php file.'); } if ($this->settings['conv_current']) { $this->registry->output->silentRedirect($this->settings['base_url'] . 'app=convert&module=setup§ion=switch'); } else { $this->registry->output->silentRedirect($this->settings['base_url'] . 'app=convert&module=setup§ion=setup'); } }
/** * Initiate this module * * @return @e void */ public function init() { $this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__core']; /* Facebook? */ if (IPSLib::fbc_enabled() === TRUE and $this->memberData['fb_uid']) { $this->_isFBUser = true; } if (!$this->memberData['g_edit_profile']) { $this->defaultAreaCode = 'email'; } }
/** * Formats the forum search result for display * * @param array $search_row Array of data * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content */ public function formatContent($data) { $data['misc'] = unserialize($data['misc']); $template = IPSSearchRegistry::get('members.searchInKey') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult'; if ($data['status_last_ids']) { foreach (unserialize($data['status_last_ids']) as $_data) { $data['replies'][$_data['reply_id']] = array_merge($_data, IPSMember::buildDisplayData($_data['reply_member_id'])); } } return array(ipsRegistry::getClass('output')->getTemplate('search')->{$template}($data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false), 0); }
/** * Class entry point * * @access public * @param object Registry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_mod'), 'forums'); if (!$this->settings['warn_on']) { $this->returnJsonError($this->lang->words['ajax_no_warn']); } switch ($this->request['do']) { case 'view': $this->_viewWarnLogs(); break; } }