本文整理汇总了PHP中IPSLib::loadActionOverloader方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::loadActionOverloader方法的具体用法?PHP IPSLib::loadActionOverloader怎么用?PHP IPSLib::loadActionOverloader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPSLib
的用法示例。
在下文中一共展示了IPSLib::loadActionOverloader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doExecute
/**
* 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();
}
示例2: _getTopics
/**
* Get topics from a forum
*
* @return @e void [Outputs to screen]
*/
protected function _getTopics()
{
//-----------------------------------------
// Reset input
//-----------------------------------------
$_GET['showforum'] = intval($_GET['f']);
ipsRegistry::$request['showforum'] = intval(ipsRegistry::$request['f']);
if ($_GET['showforum'] < 1) {
$this->returnJsonArray(array('error' => 'incorrect_f'));
}
//-----------------------------------------
// Get the forum controller
//-----------------------------------------
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('forums') . '/modules_public/forums/forums.php', 'public_forums_forums_forums');
$forums = new $classToLoad();
$forums->makeRegistryShortcuts($this->registry);
$forums->initForums();
$forums->buildPermissions();
$data = $forums->renderForum();
$html = '';
if (is_array($data['topic_data']) && count($data['topic_data'])) {
foreach ($data['topic_data'] as $idx => $tdata) {
$html .= $this->registry->output->getTemplate('forum')->topic($tdata, $data['other_data']['forum_data'], $data['other_data'], 1);
}
}
$this->returnJsonArray(array('topics' => $html, 'pages' => $data['other_data']['forum_data']['SHOW_PAGES'], 'hasMore' => $data['other_data']['hasMore']), true);
}
示例3: downloadIcalFeed
/**
* Serve the iCalendar feed (valid for both download as .ics and webcal:// protocol)
*
* @return @e void
*/
public function downloadIcalFeed()
{
//-----------------------------------------
// Get main view class
//-----------------------------------------
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('calendar') . '/modules_public/calendar/view.php', 'public_calendar_calendar_view');
$calendar = new $classToLoad($this->registry);
$calendar->makeRegistryShortcuts($this->registry);
$calendar->initCalendar();
//-----------------------------------------
// Load (all) events
//-----------------------------------------
$calendar->calendarGetEventsSQL(gmstrftime('%m'), gmstrftime('%Y'), array('timenow' => '1', 'timethen' => '2000000000', 'cal_id' => $this->calendar['cal_id'], 'honor_permissions' => true, 'no_date_convert' => true));
$events = $calendar->calendarGetAllEvents();
//-----------------------------------------
// Load iCalendar class
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('calendar') . "/sources/icalendar.php", 'app_calendar_classes_icalendarOutput', 'calendar');
$iCalendar = new $classToLoad($this->registry, $this->calendar['cal_id']);
//-----------------------------------------
// Send data to iCalendar class and get output
//-----------------------------------------
foreach ($events as $event) {
$event = $calendar->calendarMakeEventHTML($event, true);
$iCalendar->addEvent($event);
}
$feed = $iCalendar->buildICalendarFeed();
//-----------------------------------------
// Output
//-----------------------------------------
@header("Content-type: text/calendar; charset=" . IPS_DOC_CHAR_SET);
@header("Content-Disposition: inline; filename=calendarEvents.ics");
print $feed;
exit;
}
示例4: tags
/**
* Shows board index popular tags
*
*/
public function tags()
{
$classToLoad = IPSLib::loadActionOverloader(IPS_ROOT_PATH . 'sources/classes/tags/cloud.php', 'classes_tags_cloud');
$cloud = new $classToLoad();
$cloud->setSkinGroup('boards');
$cloud->setSkinTemplate('hookTagCloud');
return $cloud->render($cloud->getCloudData(array('limit' => 50)));
}
示例5: doExecute
/**
* Main class entry point
*
* @param object ipsRegistry reference
*/
public function doExecute(ipsRegistry $registry)
{
/* Require the right driver file */
$classToLoad = IPSLib::loadActionOverloader(IPS_ROOT_PATH . 'applications/core/modules_admin/sql/' . strtolower(ipsRegistry::dbFunctions()->getDriverType()) . '.php', 'admin_core_sql_toolbox_module');
/*noLibHook*/
$dbdriver = new $classToLoad();
$dbdriver->makeRegistryShortcuts($registry);
$dbdriver->doExecute($registry);
}
示例6: runTask
/**
* Run this task
*
* @return @e void
*/
public function runTask()
{
$this->registry->getClass('class_localization')->loadLanguageFile(array('public_chat'), 'ipchat');
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('ipchat') . '/modules_admin/logs/logs.php', 'admin_ipchat_logs_logs');
$_logs = new $classToLoad();
$_logs->makeRegistryShortcuts($this->registry);
$_message = $_logs->refreshLogs(true);
/* Log task action */
$this->class->appendTaskLog($this->task, $_message);
/* Unlock Task: DO NOT MODIFY! */
$this->class->unlockTask($this->task);
}
示例7: _whoPosted
/**
* Retrieve posters in a given topic
*
* @return @e void [Outputs to screen]
*/
protected function _whoPosted()
{
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_stats'), 'forums');
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('forums') . '/modules_public/extras/stats.php', 'public_forums_extras_stats');
$stats = new $classToLoad($this->registry);
$stats->makeRegistryShortcuts($this->registry);
$output = $stats->whoPosted(true);
if (!$output) {
$this->returnJsonError($this->lang->words['ajax_nohtml_return']);
} else {
$this->returnHtml($output);
}
}
示例8: runTask
/**
* Run this task
*
* @return @e void
*/
public function runTask()
{
//-----------------------------------------
// Load Bulk Mailer thing
//-----------------------------------------
define('IN_ACP', 1);
require_once IPSLib::getAppDir('members') . '/sources/classes/bulkMailFilter.php';
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('members') . '/modules_admin/bulkmail/bulkmail.php', 'admin_members_bulkmail_bulkmail');
$bulkmail = new $classToLoad();
$bulkmail->makeRegistryShortcuts($this->registry);
$bulkmail->mailSendProcess();
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlockTask($this->task);
}
示例9: doExecute
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// Init
//-----------------------------------------
require_once IPSLib::getAppDir('members') . '/sources/classes/bulkMailFilter.php';
$this->html = $this->registry->output->loadTemplate('cp_skin_bulkmail');
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_bulkmail'));
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg('bulkmail_send');
$controllerClass = IPSLib::loadActionOverloader(IPSLib::getAppDir('members') . '/modules_admin/bulkmail/bulkmail.php', 'admin_members_bulkmail_bulkmail');
$controller = new $controllerClass($registry);
$controller->makeRegistryShortcuts($registry);
//-----------------------------------------
// Load Mail
//-----------------------------------------
$id = intval($this->request['id']);
$mail = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'bulk_mail', 'where' => 'mail_id=' . $id));
if (!$mail['mail_id']) {
$this->returnHTML('');
}
if (!$mail['mail_subject'] and !$mail['mail_content']) {
$this->returnHTML('');
}
$opts = unserialize(stripslashes($mail['mail_opts']));
$mail['mail_html_on'] = $opts['mail_html_on'];
//-----------------------------------------
// Get Members
//-----------------------------------------
/* Start with a basic query */
$queryData = array('select' => 'm.member_id, m.members_display_name, m.email', 'from' => array('members' => 'm'), 'order' => 'm.members_display_name', 'limit' => array(10000 * ($this->request['page'] - 1), 10000));
/* Add in filters */
$_queryData = $controller->_buildMembersQuery($opts['filters']);
$queryData['add_join'] = $_queryData['add_join'];
$queryData['where'] = implode(' AND ', $_queryData['where']);
/* Count */
$this->DB->build($queryData);
$this->DB->execute();
while ($row = $this->DB->fetch()) {
$members[] = $row;
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->returnHTML($this->html->mss_recipients($this->request['page'], $this->request['countmembers'], $members));
}
示例10: getOutput
public function getOutput()
{
/* Make sure the calednar is installed and enabled */
if (!IPSLib::appIsInstalled('calendar')) {
return '';
}
/* Load language */
$this->registry->class_localization->loadLanguageFile(array('public_calendar'), 'calendar');
/* Load calendar library */
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('calendar') . '/modules_public/calendar/view.php', 'public_calendar_calendar_view');
$cal = new $classToLoad();
$cal->makeRegistryShortcuts($this->registry);
if (!$cal->initCalendar(true)) {
return '';
}
/* Return calendar */
return "<div id='hook_calendar' class='calendar_wrap'>" . $cal->getMiniCalendar(date('n'), date('Y')) . '</div><br />';
}
示例11: runTask
/**
* Run this task
*
* @return @e void
*/
public function runTask()
{
$this->registry->getClass('class_localization')->loadLanguageFile(array('public_global'), 'core');
//-----------------------------------------
// Deactivate expired announcements
//-----------------------------------------
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('forums') . '/modules_public/forums/announcements.php', 'public_forums_forums_announcements');
$announcements = new $classToLoad();
$announcements->makeRegistryShortcuts($this->registry);
$announcements->announceRetireExpired();
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->appendTaskLog($this->task, $this->lang->words['task_announcements']);
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlockTask($this->task);
}
示例12: returnRSSDocument
/**
* Grab the RSS document content and return it
*
* @return string RSS document
*/
public function returnRSSDocument()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$rss_export_id = intval(ipsRegistry::$request['id']);
$rss_data = array();
$to_print = '';
$this->expires = time();
//-----------------------------------------
// Get RSS export
//-----------------------------------------
$rss_data = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'rss_export', 'where' => 'rss_export_id=' . $rss_export_id));
//-----------------------------------------
// Got one?
//-----------------------------------------
if ($rss_data['rss_export_id'] and $rss_data['rss_export_enabled']) {
//-----------------------------------------
// Correct expires time
//-----------------------------------------
$this->expires += $rss_data['rss_export_cache_time'] * 60;
//-----------------------------------------
// Need to recache?
//-----------------------------------------
$time_check = time() - $rss_data['rss_export_cache_time'] * 60;
if (!$rss_data['rss_export_cache_content'] or $time_check > $rss_data['rss_export_cache_last']) {
//-----------------------------------------
// Yes
//-----------------------------------------
define('IN_ACP', 1);
ipsRegistry::getAppClass('forums');
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('forums') . '/modules_admin/rss/export.php', 'admin_forums_rss_export');
$rss_export = new $classToLoad();
$rss_export->makeRegistryShortcuts(ipsRegistry::instance());
return $rss_export->rssExportRebuildCache($rss_data['rss_export_id'], 0);
} else {
//-----------------------------------------
// No
//-----------------------------------------
return $rss_data['rss_export_cache_content'];
}
}
}
示例13: doExecute
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// Set up some shortcuts for our urls
//-----------------------------------------
$this->form_code = 'module=syncacp&section=settings';
$this->form_code_js = 'module=syncacp§ion=settings';
//-------------------------------
// Grab the settings controller, instantiate and set up shortcuts
//-------------------------------
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings');
$settings = new $classToLoad();
$settings->makeRegistryShortcuts($this->registry);
//-------------------------------
// Load language file that will be needed
//-------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_tools'), 'core');
//-------------------------------
// Load the skin file the settings file will need and pass shortcuts
//-------------------------------
$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';
//-------------------------------
// Here we specify the setting group key
//-------------------------------
$this->request['conf_title_keyword'] = 'syncapp';
//-------------------------------
// Here we specify where to send the admin after submitting the form
//-------------------------------
$settings->return_after_save = $this->settings['base_url'] . $this->form_code;
//-------------------------------
// View the settings configuration page
//-------------------------------
$settings->_viewSettings();
//-----------------------------------------
// And finally, output
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
示例14: doExecute
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute(ipsRegistry $registry)
{
/* Get ignore user quick call file */
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('members') . '/modules_public/profile/ignore.php', 'public_members_profile_ignore');
$library = new $classToLoad($registry);
$library->makeRegistryShortcuts($registry);
switch ($this->request['do']) {
default:
case 'add':
$result = $library->ignoreMember($this->request['memberID'], 'topics');
break;
case 'remove':
$result = $library->stopIgnoringMember($this->request['memberID'], 'topics');
break;
case 'addPM':
$result = $library->ignoreMember($this->request['memberID'], 'messages');
break;
case 'removePM':
$result = $library->stopIgnoringMember($this->request['memberID'], 'messages');
break;
}
$this->returnJsonArray($result);
}
示例15: doExecute
/**
* Class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// INIT
//-----------------------------------------
$topic_id = intval($this->request['tid']);
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_stats'), 'forums');
//-----------------------------------------
// Check..
//-----------------------------------------
if (!$topic_id) {
$this->returnJsonError($this->lang->words['notopic_attach']);
}
//-----------------------------------------
// get topic..
//-----------------------------------------
$topic = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'topics', 'where' => 'tid=' . $topic_id));
if (!$topic['topic_hasattach']) {
$this->returnJsonError($this->lang->words['topic_noattach']);
}
//-----------------------------------------
// Check forum..
//-----------------------------------------
if ($this->registry->getClass('class_forums')->forumsCheckAccess($topic['forum_id'], 0, 'forum', $topic, true) === false) {
$this->returnJsonError($this->lang->words['topic_noperms']);
}
$classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('forums') . '/modules_public/forums/attach.php', 'public_forums_forums_attach');
$attach = new $classToLoad($this->registry);
$attach->makeRegistryShortcuts($this->registry);
$attachHTML = $attach->getAttachments($topic);
if (!$attachHTML) {
$this->returnJsonError($this->lang->words['ajax_nohtml_return']);
} else {
$this->returnHtml($attachHTML);
}
}