当前位置: 首页>>代码示例>>PHP>>正文


PHP build_mycode_inserter函数代码示例

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


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

示例1: redirect

        $plugins->run_hooks("private_do_send_end");
        if (isset($pminfo['draftsaved'])) {
            redirect("private.php", $lang->redirect_pmsaved);
        } else {
            redirect("private.php", $lang->redirect_pmsent);
        }
    }
}
if ($mybb->input['action'] == "send") {
    if ($mybb->usergroup['cansendpms'] == 0) {
        error_no_permission();
    }
    $plugins->run_hooks("private_send_start");
    $smilieinserter = $codebuttons = '';
    if ($mybb->settings['bbcodeinserter'] != 0 && $mybb->settings['pmsallowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) {
        $codebuttons = build_mycode_inserter("message", $mybb->settings['pmsallowsmilies']);
        if ($mybb->settings['pmsallowsmilies'] != 0) {
            $smilieinserter = build_clickable_smilies();
        }
    }
    $lang->post_icon = $lang->message_icon;
    $posticons = get_post_icons();
    $message = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('message')));
    $subject = htmlspecialchars_uni($parser->parse_badwords($mybb->get_input('subject')));
    $optionschecked = array('signature' => '', 'disablesmilies' => '', 'savecopy' => '', 'readreceipt' => '');
    $to = $bcc = '';
    if (!empty($mybb->input['preview']) || $send_errors) {
        $options = $mybb->get_input('options', MyBB::INPUT_ARRAY);
        if (isset($options['signature']) && $options['signature'] == 1) {
            $optionschecked['signature'] = 'checked="checked"';
        }
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:private.php

示例2: array

 $other_options = array($form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])), "<label for=\"style\">{$lang->theme}:</label><br />" . build_theme_select("style", $mybb->input['style'], 0, "", true), "<label for=\"language\">{$lang->board_language}:</label><br />" . $form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language')));
 $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">" . implode("</div><div class=\"user_settings_bit\">", $other_options) . "</div>");
 $form_container->end();
 echo "</div>\n";
 //
 // SIGNATURE EDITOR
 //
 $signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));
 $sig_smilies = $lang->off;
 if ($mybb->settings['sigsmilies'] == 1) {
     $sig_smilies = $lang->on;
 }
 $sig_mycode = $lang->off;
 if ($mybb->settings['sigmycode'] == 1) {
     $sig_mycode = $lang->on;
     $signature_editor .= build_mycode_inserter("signature");
 }
 $sig_html = $lang->off;
 if ($mybb->settings['sightml'] == 1) {
     $sig_html = $lang->on;
 }
 $sig_imgcode = $lang->off;
 if ($mybb->settings['sigimgcode'] == 1) {
     $sig_imgcode = $lang->on;
 }
 echo "<div id=\"tab_signature\">\n";
 $form_container = new FormContainer("{$lang->signature}: {$user['username']}");
 $form_container->output_row($lang->signature, $lang->sprintf($lang->signature_desc, $sig_mycode, $sig_smilies, $sig_imgcode, $sig_html), $signature_editor, 'signature');
 $periods = array("hours" => $lang->expire_hours, "days" => $lang->expire_days, "weeks" => $lang->expire_weeks, "months" => $lang->expire_months, "never" => $lang->expire_permanent);
 // Are we already suspending the signature?
 if ($mybb->input['suspendsignature']) {
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:users.php

示例3: eval

        }
        $level_diff = $new_warning_level - $current_level;
        if ($new_level['friendly_action']) {
            $result = "<div class=\"smalltext\" style=\"clear: left; padding-top: 4px;\">{$lang->result}<br />" . $new_level['friendly_action'] . "</div>";
        }
        eval("\$types .= \"" . $templates->get("warnings_warn_type") . "\";");
        unset($new_level);
        unset($result);
    }
    if ($mybb->settings['allowcustomwarnings'] != 0) {
        eval("\$custom_warning = \"" . $templates->get("warnings_warn_custom") . "\";");
    }
    if ($group_permissions['canusepms'] != 0 && $mybb->user['receivepms'] != 0 && $mybb->settings['enablepms'] != 0) {
        $smilieinserter = $codebuttons = "";
        if ($mybb->settings['bbcodeinserter'] != 0 && $mybb->settings['pmsallowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) {
            $codebuttons = build_mycode_inserter();
            if ($mybb->settings['pmsallowsmilies'] != 0) {
                $smilieinserter = build_clickable_smilies();
            }
        }
        eval("\$pm_notify = \"" . $templates->get("warnings_warn_pm") . "\";");
    }
    $plugins->run_hooks("warnings_warn_end");
    eval("\$warn = \"" . $templates->get("warnings_warn") . "\";");
    output_page($warn);
    exit;
}
// Revoke a warning
if ($mybb->input['action'] == "do_revoke" && $mybb->request_method == "post") {
    // Verify incoming POST request
    verify_post_check($mybb->input['my_post_key']);
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:warnings.php

示例4: eval

             eval("\$code = \"" . $templates->get("usercp_profile_profilefields_text") . "\";");
         }
         if ($profilefield['required'] == 1) {
             eval("\$requiredfields .= \"" . $templates->get("usercp_profile_customfield") . "\";");
         } else {
             eval("\$customfields .= \"" . $templates->get("usercp_profile_customfield") . "\";");
         }
         $altbg = alt_trow();
     }
 }
 if ($customfields) {
     eval("\$customfields = \"" . $templates->get("usercp_profile_profilefields") . "\";");
 }
 $lang->edit_profile = $lang->sprintf($lang->edit_profile, $user['username']);
 $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
 $codebuttons = build_mycode_inserter("signature");
 // Do we mark the suspend signature box?
 if ($user['suspendsignature'] || $mybb->get_input('suspendsignature', MyBB::INPUT_INT) && !empty($errors)) {
     $checked = 1;
     $checked_item = "checked=\"checked\"";
 } else {
     $checked = 0;
     $checked_item = '';
 }
 // Do we mark the moderate posts box?
 if ($user['moderateposts'] || $mybb->get_input('moderateposting', MyBB::INPUT_INT) && !empty($errors)) {
     $modpost_check = 1;
     $modpost_checked = "checked=\"checked\"";
 } else {
     $modpost_check = 0;
     $modpost_checked = '';
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:modcp.php

示例5: check_forum_password

    if ($mybb->user['subscriptionmethod'] == 1) {
        $mybb->input['postoptions']['subscriptionmethod'] = "none";
    } else {
        if ($mybb->user['subscriptionmethod'] == 2) {
            $mybb->input['postoptions']['subscriptionmethod'] = "email";
        } else {
            if ($mybb->user['subscriptionmethod'] == 3) {
                $mybb->input['postoptions']['subscriptionmethod'] = "pm";
            }
        }
    }
}
// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);
if ($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) {
    $codebuttons = build_mycode_inserter("message", $forum['allowsmilies']);
    if ($forum['allowsmilies'] != 0) {
        $smilieinserter = build_clickable_smilies();
    }
}
// Display a login box or change user box?
if ($mybb->user['uid'] != 0) {
    eval("\$loginbox = \"" . $templates->get("changeuserbox") . "\";");
} else {
    if (empty($mybb->input['previewpost']) && $mybb->input['action'] != "do_newreply") {
        $username = '';
    } else {
        $username = htmlspecialchars_uni($mybb->get_input('username'));
    }
    eval("\$loginbox = \"" . $templates->get("loginbox") . "\";");
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:newreply.php

示例6: get_calendar_permissions

     $calendar_permissions = get_calendar_permissions($calendar['cid']);
     if ($calendar_permissions['canviewcalendar'] != 1 || $calendar_permissions['canaddevents'] != 1) {
         error_no_permission();
     }
     if (($event['uid'] != $mybb->user['uid'] || $mybb->user['uid'] == 0) && $calendar_permissions['canmoderateevents'] != 1) {
         error_no_permission();
     }
 }
 $event['name'] = htmlspecialchars_uni($event['name']);
 add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
 add_breadcrumb($event['name'], get_event_link($event['eid']));
 add_breadcrumb($lang->nav_editevent);
 $plugins->run_hooks("calendar_editevent_start");
 // If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
 if ($mybb->settings['bbcodeinserter'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0) && $calendar['allowmycode'] == 1) {
     $codebuttons = build_mycode_inserter("message", $calendar['allowsmilies']);
     if ($calendar['allowsmilies'] == 1) {
         $smilieinserter = build_clickable_smilies();
     }
 }
 $single_month = $start_month = $end_month = $repeats_sel = $repeats_3_days = $repeats_4_occurance = $repeats_4_weekday = $repeats_5_month = $repeats_5_occurance = $repeats_5_weekday = $repeats_5_month2 = array();
 foreach (range(1, 12) as $number) {
     $single_month[$number] = $start_month[$number] = $end_month[$number] = $repeats_5_month[$number] = $repeats_5_month2[$number] = '';
 }
 foreach (range(1, 5) as $number) {
     $repeats_sel[$number] = '';
 }
 foreach (range(0, 6) as $number) {
     $repeats_3_days[$number] = $repeats_4_weekday[$number] = $repeats_5_weekday[$number] = '';
 }
 foreach (range(1, 4) as $number) {
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:calendar.php

示例7: yuieditor_replace

function yuieditor_replace($page)
{
    $page = str_replace(build_mycode_inserter('signature'), '', $page);
    $page = str_replace(build_mycode_inserter('message'), '', $page);
    return $page;
}
开发者ID:Klozz,项目名称:Yui-Editor,代码行数:6,代码来源:yuieditor.php

示例8: member_profile_end

 public function member_profile_end()
 {
     global $templates, $theme, $memprofile, $settings, $db, $mybb, $lang, $myprofile_comments, $theme, $myprofile_comments_stats;
     if ($settings["mpcommentsenabled"] != "1") {
         return;
     }
     MyProfileUtils::lang_load_myprofile();
     $page = isset($mybb->input["page"]) && is_numeric($mybb->input["page"]) && $mybb->input["page"] >= 1 ? (int) $mybb->input["page"] : 1;
     $comments_memberuid = $memprofile["uid"];
     $comments_ajax = $settings["mpcommentsajaxenabled"] == "1" ? 1 : 0;
     $comments_minlength = $settings["mpcommentsminlength"];
     $comments_maxlength = $settings["mpcommentsmaxlength"];
     $comments_page = $page;
     $comments_sceditor = 0;
     if ($this->can_send_comments($mybb->user, $memprofile, $ignored_error_message, true)) {
         $show_smilies = $settings["mpcommentsallowsmilies"] == "1";
         if ($settings["mpcommentsshowwysiwyg"] == "1") {
             $codebuttons = build_mycode_inserter("message", $show_smilies);
             /* small hack to shrink the sceditor */
             $codebuttons = str_replace(array('|left,center,right,justify', '|bulletlist,orderedlist'), '', $codebuttons);
             $comments_sceditor = 1;
         } else {
             $comments_sceditor = 0;
         }
         if ($this->can_manage_comments()) {
             eval("\$modoptions .= \"" . $templates->get('myprofile_comments_form_modoptions') . "\";");
         }
         if ($settings["mpcommentsstatusenabled"] == "1") {
             $comment_public_selected = 'selected="selected"';
             $status_select_class = "select-comments-add";
             eval("\$status .= \"" . $templates->get('myprofile_comments_form_status') . "\";");
         }
         eval("\$comments_form .= \"" . $templates->get('myprofile_comments_form') . "\";");
     }
     if ($settings["mpcommentsajaxenabled"] == "0") {
         /* ajax disabled, do the dirty work */
         $comments_content = "";
         $comments = $this->comments_retrieve_from_db($page, $memprofile);
         if (is_array($comments) && count($comments) > 0) {
             foreach ($comments as $comment) {
                 $comments_content .= $comment;
             }
         } else {
             eval("\$comments_content = \"" . $templates->get('myprofile_comments_no_comment') . "\";");
         }
         $comments_total = $this->comments_count($memprofile);
         $comments_pagination = multipage($comments_total, $settings['mpcommentsperpage'], $page, get_profile_link($memprofile["uid"]) . "&page={page}");
         if ($comments_pagination == null) {
             $comments_pagination_style = 'style="display: none;"';
         }
     }
     eval("\$comment_form_script .= \"" . $templates->get('myprofile_comments_form_script') . "\";");
     /* darn that <br /> bug! */
     if (!empty($GLOBALS['modoptions']) || !empty($comments_form)) {
         $comments_separator = "<br />";
     }
     eval("\$comments_table .= \"" . $templates->get('myprofile_comments_table') . "\";");
     eval("\$myprofile_comments .= \"" . $templates->get('myprofile_comments_content') . "\";");
     if ($settings["mpcommentsshowstats"] == "1") {
         $result = $this->user_statistics($memprofile["uid"]);
         $stats_sent = $result["sent"];
         $stats_received = $result["received"];
         $stats_total = $result["total"];
         eval("\$myprofile_comments_stats .= \"" . $templates->get('myprofile_comments_stats') . "\";");
     }
 }
开发者ID:medbenji,项目名称:MyProfile,代码行数:66,代码来源:myprofilecomments.class.php

示例9: build_prefixes

}
// Add prefix to breadcrumb
$breadcrumbprefix = '';
if ($thread['prefix']) {
    $threadprefixes = build_prefixes();
    if (!empty($threadprefixes[$thread['prefix']])) {
        $breadcrumbprefix = $threadprefixes[$thread['prefix']]['displaystyle'] . '&nbsp;';
    }
}
// Make navigation
build_forum_breadcrumb($fid);
add_breadcrumb($breadcrumbprefix . $thread['subject'], get_thread_link($thread['tid']));
add_breadcrumb($lang->nav_editpost);
$forumpermissions = forum_permissions($fid);
if ($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) {
    $codebuttons = build_mycode_inserter("message", $mybb->settings['smilieinserter']);
}
if ($mybb->settings['smilieinserter'] != 0) {
    $smilieinserter = build_clickable_smilies();
}
$mybb->input['action'] = $mybb->get_input('action');
if (!$mybb->input['action'] || isset($mybb->input['previewpost'])) {
    $mybb->input['action'] = "editpost";
}
if ($mybb->input['action'] == "deletepost" && $mybb->request_method == "post") {
    if (!is_moderator($fid, "candeleteposts") && !is_moderator($fid, "cansoftdeleteposts") && $pid != $thread['firstpost'] || !is_moderator($fid, "candeletethreads") && !is_moderator($fid, "cansoftdeletethreads") && $pid == $thread['firstpost']) {
        if ($thread['closed'] == 1) {
            error($lang->redirect_threadclosed);
        }
        if ($forumpermissions['candeleteposts'] == 0 && $pid != $thread['firstpost'] || $forumpermissions['candeletethreads'] == 0 && $pid == $thread['firstpost']) {
            error_no_permission();
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:editpost.php


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