• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_forum_type函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_forum_type函数的典型用法代码示例。如果您正苦于以下问题:PHP get_forum_type函数的具体用法?PHP get_forum_type怎么用?PHP get_forum_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_forum_type函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	Results
  */
 function run()
 {
     if (get_forum_type() != 'ocf') {
         return new ocp_tempcode();
     } else {
         ocf_require_all_forum_stuff();
     }
     if (function_exists('set_time_limit')) {
         @set_time_limit(0);
     }
     require_code('ocf_posts_action');
     require_code('ocf_posts_action2');
     // Members
     $start = 0;
     do {
         $members = $GLOBALS['FORUM_DB']->query_select('f_members', array('id'), NULL, '', 500, $start);
         foreach ($members as $member) {
             ocf_force_update_member_post_count($member['id']);
             $num_warnings = $GLOBALS['FORUM_DB']->query_value('f_warnings', 'COUNT(*)', array('w_member_id' => $member['id'], 'w_is_warning' => 1));
             $GLOBALS['FORUM_DB']->query_update('f_members', array('m_cache_warnings' => $num_warnings), array('id' => $member['id']), '', 1);
         }
         $start += 500;
     } while (array_key_exists(0, $members));
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:ocf_members.php


示例2: run_start

 /**
  * Standard aed_module run_start.
  *
  * @param  ID_TEXT		The type of module execution
  * @return tempcode		The output of the run
  */
 function run_start($type)
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/forums';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_forums';
     $this->add_one_label = do_lang_tempcode('ADD_FORUM');
     $this->edit_this_label = do_lang_tempcode('EDIT_THIS_FORUM');
     $this->edit_one_label = do_lang_tempcode('EDIT_FORUM');
     global $C_TITLE;
     $C_TITLE = NULL;
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_forums_action');
     require_code('ocf_forums_action2');
     require_code('ocf_forums2');
     require_css('ocf');
     load_up_all_module_category_permissions($GLOBALS['FORUM_DRIVER']->get_guest_id(), 'forums');
     if ($type == 'misc') {
         return $this->misc();
     }
     if ($type == 'reorder') {
         return $this->reorder();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:33,代码来源:admin_ocf_forums.php


示例3: run

 /**
  * Standard modular run function for do_next_menu hooks. They find links to put on standard navigation menus of the system.
  *
  * @return array			Array of links and where to show
  */
 function run()
 {
     if (get_forum_type() != 'ocf') {
         return array();
     }
     return array(array('setup', 'notifications', array('admin_notifications', array('type' => 'misc'), get_module_zone('admin_notifications')), do_lang_tempcode('NOTIFICATIONS_LOCKDOWN'), 'DOC_NOTIFICATIONS'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:12,代码来源:notifications.php


示例4: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_forumview');
     if (is_guest()) {
         access_denied('NOT_AS_GUEST');
     }
     require_css('ocf');
     $type = get_param('type', 'misc');
     if ($type == 'misc') {
         list($title, $content) = $this->new_posts();
     } elseif ($type == 'unread') {
         list($title, $content) = $this->unread_topics();
     } elseif ($type == 'recently_read') {
         list($title, $content) = $this->recently_read();
     } else {
         $title = new ocp_tempcode();
         $content = new ocp_tempcode();
     }
     $ret = ocf_wrapper($title, do_template('OCF_VFORUM', array('_GUID' => '8dca548982d65500ab1800ceec2ddc61', 'CONTENT' => $content)));
     return $ret;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:31,代码来源:vforums.php


示例5: run

 /**
  * Standard modular run function for do_next_menu hooks. They find links to put on standard navigation menus of the system.
  *
  * @return array			Array of links and where to show
  */
 function run()
 {
     if (!addon_installed('ldap')) {
         return array();
     }
     return array(get_forum_type() != 'ocf' ? NULL : array('security', 'ldap', array('admin_ocf_ldap', array('type' => 'misc'), get_module_zone('admin_ocf_ldap')), do_lang_tempcode('LDAP'), 'DOC_LDAP'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:12,代码来源:ldap.php


示例6: get_default

 /**
  * Gets the default value for the config option.
  *
  * @return ?string		The default value (NULL: option is disabled)
  */
 function get_default()
 {
     if (get_forum_type() != 'ocf') {
         return NULL;
     }
     return '1';
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:12,代码来源:is_on_highlight_name_buy.php


示例7: run_start

 /**
  * Standard aed_module run_start.
  *
  * @param  ID_TEXT		The type of module execution
  * @return tempcode		The output of the run
  */
 function run_start($type)
 {
     $GLOBALS['NO_DB_SCOPE_CHECK'] = true;
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/customprofilefields';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_adv_members';
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_members_action');
     require_code('ocf_members_action2');
     require_lang('fields');
     require_lang('ocf');
     $this->add_one_label = do_lang_tempcode('ADD_CUSTOM_PROFILE_FIELD');
     $this->edit_this_label = do_lang_tempcode('EDIT_THIS_CUSTOM_PROFILE_FIELD');
     $this->edit_one_label = do_lang_tempcode('EDIT_CUSTOM_PROFILE_FIELD');
     if ($type == 'misc') {
         return $this->misc();
     }
     if ($type == 'stats') {
         return $this->stats();
     }
     if ($type == '_stats') {
         return $this->_stats();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:34,代码来源:admin_ocf_customprofilefields.php


示例8: run

 /**
  * Standard modular run function for OcCLE hooks.
  *
  * @param  array	The options with which the command was called
  * @param  array	The parameters with which the command was called
  * @param  array	A reference to the OcCLE filesystem object
  * @return ~array  Array of stdcommand, stdhtml, stdout, and stderr responses (false: error)
  */
 function run($options, $parameters, &$occle_fs)
 {
     if (array_key_exists('h', $options) || array_key_exists('help', $options)) {
         return array('', do_command_help('ban_member', array('h', 'u'), array(true, true)), '', '');
     } else {
         if (get_forum_type() != 'ocf') {
             return array('', '', '', do_lang('NO_OCF'));
         }
         if (!array_key_exists(0, $parameters)) {
             return array('', '', '', do_lang('MISSING_PARAM', '1', 'ban_member'));
         }
         require_code('ocf_members_action');
         require_code('ocf_members_action2');
         require_lang('ocf');
         if (is_numeric($parameters[0])) {
             $member_id = $parameters[0];
         } else {
             $member_id = $GLOBALS['FORUM_DRIVER']->get_member_from_username($parameters[0]);
         }
         if (is_null($member_id)) {
             return array('', '', '', do_lang('USER_NO_EXIST'));
         }
         if (array_key_exists('u', $options) || array_key_exists('unban', $options)) {
             ocf_unban_member($member_id);
         } else {
             ocf_ban_member($member_id);
         }
         return array('', '', do_lang('SUCCESS'), '');
     }
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:ban_member.php


示例9: info

 /**
  * Standard modular info function for award hooks. Provides information to allow task reporting, randomisation, and add-screen linking, to function.
  *
  * @return ?array	Map of award content-type info (NULL: disabled).
  */
 function info()
 {
     if (get_forum_type() != 'ocf') {
         return NULL;
     }
     $info = array();
     $info['connection'] = $GLOBALS['FORUM_DB'];
     $info['table'] = 'f_topics';
     $info['date_field'] = 't_cache_first_time';
     $info['id_field'] = 'id';
     $info['add_url'] = '';
     $info['category_field'] = 't_forum_id';
     $info['category_type'] = 'forums';
     $info['parent_spec__table_name'] = 'f_forums';
     $info['parent_spec__parent_name'] = 'f_parent_forum';
     $info['parent_spec__field_name'] = 'id';
     $info['parent_field_name'] = 't_forum_id';
     $info['submitter_field'] = 't_cache_first_member_id';
     $info['id_is_string'] = false;
     require_lang('ocf');
     $info['title'] = do_lang_tempcode('SPECIFIC_FORUM_TOPICS');
     $info['validated_field'] = 't_validated';
     $info['category_is_string'] = false;
     $info['archive_url'] = build_url(array('page' => 'forumview'), get_module_zone('forumview'));
     $info['cms_page'] = 'topics';
     $info['views_field'] = 't_num_views';
     $info['supports_custom_fields'] = true;
     return $info;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:34,代码来源:topic.php


示例10: run

 /**
  * Standard modular run function for search results.
  *
  * @param  string			Search string
  * @param  boolean		Whether to only do a META (tags) search
  * @param  ID_TEXT		Order direction
  * @param  integer		Start position in total results
  * @param  integer		Maximum results to return in total
  * @param  boolean		Whether only to search titles (as opposed to both titles and content)
  * @param  string			Where clause that selects the content according to the main search string (SQL query fragment) (blank: full-text search)
  * @param  SHORT_TEXT	Username/Author to match for
  * @param  ?MEMBER		Member-ID to match for (NULL: unknown)
  * @param  TIME			Cutoff date
  * @param  string			The sort type (gets remapped to a field in this function)
  * @set    title add_date
  * @param  integer		Limit to this number of results
  * @param  string			What kind of boolean search to do
  * @set    or and
  * @param  string			Where constraints known by the main search code (SQL query fragment)
  * @param  string			Comma-separated list of categories to search under
  * @param  boolean		Whether it is a boolean search
  * @return array			List of maps (template, orderer)
  */
 function run($content, $only_search_meta, $direction, $max, $start, $only_titles, $content_where, $author, $author_id, $cutoff, $sort, $limit_to, $boolean_operator, $where_clause, $search_under, $boolean_search)
 {
     unset($limit_to);
     if (get_forum_type() != 'ocf') {
         return array();
     }
     $remapped_orderer = '';
     switch ($sort) {
         case 'title':
             $remapped_orderer = 'g_name';
             break;
     }
     require_lang('ocf');
     // Calculate our where clause (search)
     $sq = build_search_submitter_clauses('g_group_leader', $author_id, $author);
     if (is_null($sq)) {
         return array();
     } else {
         $where_clause .= $sq;
     }
     $where_clause .= ' AND ';
     $where_clause .= 'g_hidden=0 AND g_is_private_club=1';
     // Calculate and perform query
     $rows = get_search_rows(NULL, NULL, $content, $boolean_search, $boolean_operator, $only_search_meta, $direction, $max, $start, $only_titles, 'f_groups r', array('!', 'r.g_name', 'r.g_title'), $where_clause, $content_where, $remapped_orderer, 'r.*');
     $out = array();
     foreach ($rows as $i => $row) {
         $out[$i]['data'] = $row;
         unset($rows[$i]);
         if ($remapped_orderer != '' && array_key_exists($remapped_orderer, $row)) {
             $out[$i]['orderer'] = $row[$remapped_orderer];
         }
     }
     return $out;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:57,代码来源:ocf_clubs.php


示例11: get_attachments

/**
 * Get what we need to get attachments in a form-field interface.
 *
 * @param  ID_TEXT		The name of the field attachments are for
 * @return array			A pair: the attachments UI (tempcode), the hidden attachment field
 */
function get_attachments($posting_field_name)
{
    $image_types = str_replace(',', ', ', get_option('valid_images'));
    require_lang('javascript');
    require_javascript('javascript_swfupload');
    require_css('swfupload');
    require_code('files2');
    $max_attach_size = get_max_file_size(get_member(), $GLOBALS['SITE_DB']);
    $attach_size_field = form_input_hidden('MAX_FILE_SIZE', strval($max_attach_size));
    $num_attachments = post_param_integer('num_attachments', has_js() ? 1 : 3);
    $attachments = new ocp_tempcode();
    for ($i = 1; $i <= $num_attachments; $i++) {
        $attachments->attach(do_template('ATTACHMENT', array('_GUID' => 'c3b38ca70cbd1c5f9cf91bcae9ed1134', 'POSTING_FIELD_NAME' => $posting_field_name, 'I' => strval($i))));
    }
    if (get_forum_type() == 'ocf') {
        require_code('ocf_groups');
        require_lang('ocf');
        $max_attachments = ocf_get_member_best_group_property(get_member(), 'max_attachments_per_post');
    } else {
        $max_attachments = 100;
    }
    $attachment_template = do_template('ATTACHMENT', array('_GUID' => 'c3b38ca70cbd1c5f9cf91bcae9ed11dsds', 'POSTING_FIELD_NAME' => $posting_field_name, 'I' => '__num_attachments__'));
    $attachments = do_template('ATTACHMENTS', array('_GUID' => '054921e7c09412be479676759accf222', 'POSTING_FIELD_NAME' => $posting_field_name, 'ATTACHMENT_TEMPLATE' => $attachment_template, 'IMAGE_TYPES' => $image_types, 'ATTACHMENTS' => $attachments, 'MAX_ATTACHMENTS' => strval($max_attachments), 'NUM_ATTACHMENTS' => strval($num_attachments)));
    return array($attachments, $attach_size_field);
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:31,代码来源:form_templates.php


示例12: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     unset($map);
     $forum = get_forum_type();
     $out = new ocp_tempcode();
     if ($forum != 'none') {
         // Standard welcome back vs into greeting
         $member = get_member();
         if (is_guest($member)) {
             $redirect = get_self_url(true, true);
             $login_url = build_url(array('page' => 'login', 'type' => 'misc', 'redirect' => $redirect), get_module_zone('login'));
             $join_url = $GLOBALS['FORUM_DRIVER']->join_url();
             $join_bits = do_template('JOIN_OR_LOGIN', array('LOGIN_URL' => $login_url, 'JOIN_URL' => $join_url));
             $p = do_lang_tempcode('WELCOME', $join_bits);
             $out->attach(paragraph($p, 'hhrt4dsgdsgd'));
         } else {
             $out->attach(paragraph(do_lang_tempcode('WELCOME_BACK', escape_html($GLOBALS['FORUM_DRIVER']->get_username($member))), 'gfgdf9gjd'));
         }
     }
     $message = get_option('welcome_message');
     if (has_actual_page_access(get_member(), 'admin_config')) {
         if ($message != '') {
             $message .= ' [[page="_SEARCH:admin_config:category:SITE#group_GENERAL"]' . do_lang('EDIT') . '[/page]]';
         }
     }
     $out->attach(comcode_to_tempcode($message, NULL, true));
     return $out;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:34,代码来源:main_greeting.php


示例13: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     unset($map);
     require_lang('custom_comcode');
     $tags = array();
     $wmap = array('tag_enabled' => 1);
     if (!has_specific_permission(get_member(), 'comcode_dangerous')) {
         $wmap['tag_dangerous_tag'] = 0;
     }
     $tags = array_merge($tags, $GLOBALS['SITE_DB']->query_select('custom_comcode', array('tag_title', 'tag_description', 'tag_example', 'tag_parameters', 'tag_replace', 'tag_tag', 'tag_dangerous_tag', 'tag_block_tag', 'tag_textual_tag'), $wmap));
     if (isset($GLOBALS['FORUM_DB']) && $GLOBALS['FORUM_DB']->connection_write != $GLOBALS['SITE_DB']->connection_write && get_forum_type() == 'ocf') {
         $tags = array_merge($tags, $GLOBALS['FORUM_DB']->query_select('custom_comcode', array('tag_title', 'tag_description', 'tag_example', 'tag_parameters', 'tag_replace', 'tag_tag', 'tag_dangerous_tag', 'tag_block_tag', 'tag_textual_tag'), $wmap));
     }
     // From Comcode hooks
     $hooks = find_all_hooks('systems', 'comcode');
     foreach (array_keys($hooks) as $hook) {
         require_code('hooks/systems/comcode/' . filter_naughty_harsh($hook));
         $object = object_factory('Hook_comcode_' . filter_naughty_harsh($hook), true);
         $tags[] = $object->get_tag();
     }
     if (!array_key_exists(0, $tags)) {
         return paragraph(do_lang_tempcode('NONE_EM'), '', 'nothing_here');
     }
     $content = new ocp_tempcode();
     foreach ($tags as $tag) {
         $content->attach(do_template('CUSTOM_COMCODE_TAG_ROW', array('_GUID' => '28c257f5d0c596aa828fd9556b0df4a9', 'TITLE' => is_string($tag['tag_title']) ? $tag['tag_title'] : get_translated_text($tag['tag_title']), 'DESCRIPTION' => is_string($tag['tag_description']) ? $tag['tag_description'] : get_translated_text($tag['tag_description']), 'EXAMPLE' => $tag['tag_example'])));
     }
     return do_template('BLOCK_MAIN_CUSTOM_COMCODE_TAGS', array('_GUID' => 'b8d3436e6e5fe679ae9b0a368e607610', 'TAGS' => $content));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:35,代码来源:main_custom_comcode_tags.php


示例14: restrictify

/**
 * Add ocPortal's strictness, after finishing with third-party code. To be run optionally at some point after destrictify().
 */
function restrictify()
{
    global $_CREATED_FILES, $_MODIFIED_FILES;
    // Reset functions
    if (isset($_CREATED_FILES)) {
        $_CREATED_FILES = array();
    }
    if (isset($_MODIFIED_FILES)) {
        $_MODIFIED_FILES = array();
    }
    // Put back strictness
    error_reporting(E_ALL);
    if (function_exists('set_time_limit')) {
        @set_time_limit(25);
    }
    if (get_forum_type() == 'ocf') {
        $GLOBALS['SITE_DB']->query('SET sql_mode=STRICT_ALL_TABLES', NULL, NULL, true);
    }
    if ($GLOBALS['DEBUG_MODE']) {
        @ini_set('ocproducts.type_strictness', '1');
        global $PREVIOUS_XSS_STATE;
        //safe_ini_set('ocproducts.xss_detect',array_pop($PREVIOUS_XSS_STATE));		We don't maintain this in v8, since we increased checking strength but are not fixing all the new false-positives. Real issues are found in v9 and back-ported.
    }
    @ini_set('include_path', '');
    @ini_set('allow_url_fopen', '0');
    @ini_set('suhosin.executor.disable_emodifier', '1');
    @ini_set('suhosin.executor.multiheader', '1');
    $GLOBALS['NO_DB_SCOPE_CHECK'] = false;
    //$GLOBALS['NO_QUERY_LIMIT']=false;	Leave off, may have been set elsewhere than destrictify();
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:33,代码来源:developer_tools.php


示例15: run

 /**
  * Standard modular run function.
  *
  * @return array		An array of tuples: The task row to show, the number of seconds until it is due (or NULL if not on a timer), the number of things to sort out (or NULL if not on a queue), The name of the config option that controls the schedule (or NULL if no option).
  */
 function run()
 {
     if (!addon_installed('ocf_forum')) {
         return array();
     }
     if (get_forum_type() != 'ocf') {
         return array();
     }
     require_lang('ocf_config');
     $forum_id = $GLOBALS['FORUM_DRIVER']->forum_id_from_name(get_option('reported_posts_forum'));
     if (is_null($forum_id)) {
         return array();
     }
     $where = 't_forum_id=' . strval($forum_id) . ' AND t_is_open=1';
     $query = 'SELECT COUNT(*) FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_topics WHERE ' . $where;
     $outstanding = $GLOBALS['FORUM_DB']->query_value_null_ok_full($query);
     if ($outstanding > 0) {
         $status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_0', array('_GUID' => 'e578142633c6f3d37776e82a869deb91'));
     } else {
         $status = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM_STATUS_1', array('_GUID' => 'f578142633c6f3d37776e82a869deb91'));
     }
     $url = $GLOBALS['FORUM_DRIVER']->forum_url($forum_id);
     $tpl = do_template('BLOCK_MAIN_STAFF_CHECKLIST_ITEM', array('URL' => $url, 'STATUS' => $status, 'TASK' => do_lang_tempcode('REPORTED_POSTS_FORUM'), 'INFO' => do_lang_tempcode('NUM_QUEUE', escape_html(integer_format($outstanding)))));
     return array(array($tpl, NULL, $outstanding, NULL));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:reported_posts.php


示例16: run_start

 /**
  * Standard aed_module run_start.
  *
  * @param  ID_TEXT		The type of module execution
  * @return tempcode		The output of the run
  */
 function run_start($type)
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/emoticons';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_emoticons';
     $this->add_one_label = do_lang_tempcode('ADD_EMOTICON');
     $this->edit_this_label = do_lang_tempcode('EDIT_THIS_EMOTICON');
     $this->edit_one_label = do_lang_tempcode('EDIT_EMOTICON');
     require_lang('dearchive');
     require_code('images');
     if (get_forum_type() != 'ocf') {
         warn_exit(do_lang_tempcode('NO_OCF'));
     } else {
         ocf_require_all_forum_stuff();
     }
     require_code('ocf_general_action');
     require_code('ocf_general_action2');
     if ($type == 'ad') {
         require_javascript('javascript_ajax');
         $script = find_script('snippet');
         $this->javascript = "\n\t\t\t\tvar form=document.getElementById('main_form');\n\t\t\t\tform.old_submit=form.onsubmit;\n\t\t\t\tform.onsubmit=function()\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById('submit_button').disabled=true;\n\t\t\t\t\t\tvar url='" . addslashes($script) . "?snippet=exists_emoticon&name='+window.encodeURIComponent(form.elements['code'].value);\n\t\t\t\t\t\tif (!do_ajax_field_test(url))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdocument.getElementById('submit_button').disabled=false;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocument.getElementById('submit_button').disabled=false;\n\t\t\t\t\t\tif (typeof form.old_submit!='undefined' && form.old_submit) return form.old_submit();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t};\n\t\t\t";
     }
     if ($type == 'misc') {
         return $this->misc();
     }
     if ($type == 'import') {
         return $this->import();
     }
     if ($type == '_import') {
         return $this->_import();
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:38,代码来源:admin_ocf_emoticons.php


示例17: run

 /**
  * Standard modular run function for CRON hooks. Searches for tasks to perform.
  */
 function run()
 {
     if (get_forum_type() != 'ocf') {
         return;
     }
     $time = time();
     $last_time = intval(get_value('last_confirm_reminder_time'));
     if ($last_time > time() - 24 * 60 * 60 * 2) {
         return;
     }
     set_value('last_confirm_reminder_time', strval($time));
     require_code('mail');
     require_lang('ocf');
     $GLOBALS['NO_DB_SCOPE_CHECK'] = true;
     $rows = $GLOBALS['SITE_DB']->query('SELECT * FROM ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'f_members WHERE ' . db_string_not_equal_to('m_validated_email_confirm_code', '') . ' AND m_join_time>' . strval($last_time));
     $GLOBALS['NO_DB_SCOPE_CHECK'] = false;
     foreach ($rows as $row) {
         $coppa = get_option('is_on_coppa') == '1' && utctime_to_usertime(time() - mktime(0, 0, 0, $row['m_dob_month'], $row['m_dob_day'], $row['m_dob_year'])) / 31536000.0 < 13.0;
         if (!$coppa) {
             $zone = get_module_zone('join');
             if ($zone != '') {
                 $zone .= '/';
             }
             $url = get_base_url() . '/' . $zone . 'index.php?page=join&type=step4&email=' . rawurlencode($row['m_email_address']) . '&code=' . $row['m_validated_email_confirm_code'];
             $url_simple = get_base_url() . '/' . $zone . 'index.php?page=join&type=step4';
             $message = do_lang('OCF_SIGNUP_TEXT', comcode_escape(get_site_name()), comcode_escape($url), array($url_simple, $row['m_email_address'], strval($row['m_validated_email_confirm_code'])), $row['m_language']);
             mail_wrap(do_lang('CONFIRM_EMAIL_SUBJECT', get_site_name(), NULL, NULL, $row['m_language']), $message, array($row['m_email_address']), $row['m_username']);
         }
     }
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:33,代码来源:ocf_confirm_reminder.php


示例18: action_done

 /**
  * Standard actualisation stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action_done()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0' || get_forum_type() != 'ocf') {
         return new ocp_tempcode();
     }
     if ($GLOBALS['FORUM_DRIVER']->get_member_row_field(get_member(), 'm_highlighted_name') == 1) {
         warn_exit(do_lang_tempcode('_ALREADY_HAVE'));
     }
     $title = get_page_title('NAME_HIGHLIGHTING');
     post_param_integer('confirm');
     // To make sure we're not being passed by a GET
     // Check points
     $cost = intval(get_option($class));
     $points_left = available_points(get_member());
     if ($points_left < $cost && !has_specific_permission(get_member(), 'give_points_self')) {
         return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
     }
     // Actuate
     $GLOBALS['FORUM_DB']->query_update('f_members', array('m_highlighted_name' => 1), array('id' => get_member()), '', 1);
     require_code('points2');
     charge_member(get_member(), $cost, do_lang('NAME_HIGHLIGHTING'));
     $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'NAME_HIGHLIGHTING', 'details' => '', 'details2' => ''));
     // Show message
     $url = build_url(array('page' => '_SELF', 'type' => 'misc'), '_SELF');
     return redirect_screen($title, $url, do_lang_tempcode('ORDER_GENERAL_DONE'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:highlight_name.php


示例19: run

 /**
  * Standard modular run function.
  *
  * @param  array		A map of parameters.
  * @return tempcode	The result of execution.
  */
 function run($map)
 {
     unset($map);
     if (get_forum_type() != 'ocf') {
         return new ocp_tempcode();
     }
     if (is_guest()) {
         return new ocp_tempcode();
     }
     require_css('side_blocks');
     ocf_require_all_forum_stuff();
     require_code('ocf_notifications');
     // Only show what's new in week. Some forums may want to tweak this, but forums themselves only mark unread topics for a week.
     $rows = ocf_get_pp_rows();
     //		if (count($rows)==0) return new ocp_tempcode();
     require_lang('ocf');
     $out = new ocp_tempcode();
     foreach ($rows as $topic) {
         $topic_url = build_url(array('page' => 'topicview', 'id' => $topic['id'], 'type' => 'findpost'), get_module_zone('topicview'));
         $topic_url->attach('#post_' . strval($topic['id']));
         $title = $topic['t_cache_first_title'];
         $date = get_timezoned_date($topic['t_cache_last_time'], true);
         $username = $topic['t_cache_last_username'];
         $member_link = $GLOBALS['OCF_DRIVER']->member_profile_url($topic['t_cache_last_member_id'], false, true);
         $num_posts = $topic['t_cache_num_posts'];
         $out->attach(do_template('TOPIC_LIST', array('_GUID' => '55ae21a9f8d67ba6237c118a18b9657b', 'USER_LINK' => $member_link, 'TOPIC_LINK' => $topic_url, 'TITLE' => $title, 'DATE' => $date, 'DATE_RAW' => strval($topic['t_cache_last_time']), 'USERNAME' => $username, 'NUM_POSTS' => integer_format($num_posts))));
     }
     $send_url = build_url(array('page' => 'topics', 'type' => 'new_pt', 'redirect' => SELF_REDIRECT), get_module_zone('topics'));
     if (!ocf_may_make_personal_topic()) {
         $send_url = new ocp_tempcode();
     }
     $view_url = build_url(array('page' => 'members', 'type' => 'view', 'id' => get_member()), get_module_zone('members'), NULL, true, false, false, 'tab__pts');
     return do_template('BLOCK_SIDE_OCF_PERSONAL_TOPICS', array('_GUID' => '9376cd47884a78f3d1914c176b67ee28', 'SEND_URL' => $send_url, 'VIEW_URL' => $view_url, 'CONTENT' => $out, 'FORUM_NAME' => do_lang_tempcode('PERSONAL_TOPICS')));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:40,代码来源:side_ocf_personal_topics.php


示例20: action

 /**
  * Standard interface stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0') {
         return new ocp_tempcode();
     }
     $title = get_page_title('TOPIC_PINNING');
     $cost = intval(get_option($class));
     $next_url = build_url(array('page' => '_SELF', 'type' => 'action_done', 'id' => $class), '_SELF');
     $points_left = available_points(get_member());
     // Check points
     if ($points_left < $cost && !has_specific_permission(get_member(), 'give_points_self')) {
         return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
     }
     require_code('form_templates');
     $fields = new ocp_tempcode();
     if (get_forum_type() == 'ocf') {
         $fields->attach(form_input_tree_list(do_lang_tempcode('FORUM_TOPIC'), '', 'select_topic_id', NULL, 'choose_forum_topic', array(), false));
         $fields->attach(form_input_integer(do_lang_tempcode('ALT_FIELD', do_lang_tempcode('FORUM_TOPIC')), do_lang_tempcode('DESCRIPTION_FORUM_TOPIC_ID'), 'manual_topic_id', NULL, false));
     } else {
         $fields->attach(form_input_integer(do_lang_tempcode('FORUM_TOPIC'), do_lang_tempcode('ENTER_TOPIC_ID_MANUALLY'), 'manual_topic_id', NULL, false));
     }
     $text = do_lang_tempcode('PIN_TOPIC_A', integer_format($cost), integer_format($points_left - $cost));
     return do_template('FORM_SCREEN', array('_GUID' => '8cabf882d5cbe4d354cc6efbcf92ebf9', 'TITLE' => $title, 'TEXT' => $text, 'URL' => $next_url, 'FIELDS' => $fields, 'HIDDEN' => '', 'SUBMIT_NAME' => do_lang_tempcode('PURCHASE'), 'JAVASCRIPT' => 'standardAlternateFields(\'select_topic_id\',\'manual_topic_id\');'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:topic_pin.php



注:本文中的get_forum_type函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_forumcategory_information函数代码示例发布时间:2022-05-15
下一篇:
PHP get_forum_parents函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap