當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ConsoleOption::getLink方法代碼示例

本文整理匯總了PHP中ConsoleOption::getLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConsoleOption::getLink方法的具體用法?PHP ConsoleOption::getLink怎麽用?PHP ConsoleOption::getLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ConsoleOption的用法示例。


在下文中一共展示了ConsoleOption::getLink方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: saveTwitchSettings

}
if ($configInfo['twitchsocial_id'] != "") {
    $selectedSocialID = $configInfo['twitchsocial_id'];
}
// Default values
$configInfo['stream_width'] = $configInfo['stream_width'] == "" ? 640 : $configInfo['stream_width'];
$configInfo['stream_height'] = $configInfo['stream_height'] == "" ? 360 : $configInfo['stream_height'];
$configInfo['streamchat_height'] = $configInfo['streamchat_height'] == "" ? 300 : $configInfo['streamchat_height'];
$i = 0;
$arrComponents = array("pagelink" => array("type" => "custom", "sortorder" => $i++, "display_name" => "Twitch Page Link", "html" => "<div class='formInput main'><a href='" . $MAIN_ROOT . "plugins/twitch' target='_blank'>" . FULL_SITE_URL . "plugins/twitch</a></div>", "tooltip" => "Add this link as a menu item if you would like to show who streams in your clan."), "twitchsocial_id" => array("type" => "select", "sortorder" => $i++, "display_name" => "Social Media", "attributes" => array("class" => "formInput textBox", "id" => "twitchsocial_id"), "options" => $arrSocialOptions, "validate" => array("RESTRICT_TO_OPTIONS"), "value" => $selectedSocialID, "tooltip" => "This is a list of your social media icons that have been added to the site.  Please select the one that is associated with Twitch to configure correctly.", "html" => $addTwitchInfo), "stream_width" => array("type" => "text", "sortorder" => $i++, "display_name" => "Stream Width", "attributes" => array("class" => "formInput textBox smallTextBox"), "validate" => array("POSITIVE_NUMBER"), "html" => "<div class='formInput formInputSideText'>px</div>", "value" => $configInfo['stream_width']), "stream_height" => array("type" => "text", "sortorder" => $i++, "display_name" => "Stream Height", "attributes" => array("class" => "formInput textBox smallTextBox"), "validate" => array("POSITIVE_NUMBER"), "html" => "<div class='formInput formInputSideText'>px</div>", "value" => $configInfo['stream_height']), "streamchat_height" => array("type" => "text", "sortorder" => $i++, "display_name" => "Stream Chat Height", "attributes" => array("class" => "formInput textBox smallTextBox"), "validate" => array("POSITIVE_NUMBER"), "html" => "<div class='formInput formInputSideText'>px</div>", "value" => $configInfo['streamchat_height']), "autoplay" => array("type" => "select", "sortorder" => $i++, "display_name" => "Auto-Play Stream", "options" => array("1" => "Yes", "0" => "No"), "attributes" => array("class" => "formInput textBox"), "value" => $configInfo['autoplay']), "autohidechat" => array("type" => "select", "sortorder" => $i++, "display_name" => "Auto-Hide Chat", "options" => array("1" => "Yes", "0" => "No"), "attributes" => array("class" => "formInput textBox"), "value" => $configInfo['autoshowchat']), "submit" => array("type" => "submit", "sortorder" => $i++, "attributes" => array("class" => "formSubmitButton submitButton"), "value" => "Save"), "custom" => array("type" => "custom", "sortorder" => $i++, "html" => "<div id='addTwitchJSDump'></div>"));
$additionalTwitchInfo = "";
$embedJS = "";
if ($addTwitchInfo != "") {
    $addSocialMediaConsole = new ConsoleOption($mysqli);
    $addSocialMediaConsole->findConsoleIDByName("Add Social Media Icon");
    $additionalTwitchInfo = " If you haven't <a href='" . $addSocialMediaConsole->getLink() . "'>added</a> a Twitch social media icon to user profiles, you can click the \"Haven't added Twitch?\" link below.";
    $embedJS = "\n\n\t\t\$(document).ready(function() {\n\t\n\t\t\t\$('#addTwitch').click(function() {\n\t\t\t\t\$('#addTwitch').hide();\n\t\t\t\t\$('#addTwitchLoading').show();\n\t\t\t\t\$.post('" . $MAIN_ROOT . "plugins/twitch/include/addtwitch.php', { }, function(data) {\n\t\t\t\t\t\$('#addTwitchJSDump').html(data);\n\t\t\t\t});\n\t\n\t\t\t});\n\t\n\t\t});\n\t\n\t";
}
$setupFormArgs = array("name" => "pluginsettings-" . $_GET['plugin'], "components" => $arrComponents, "description" => "Fill out the form below to configure the Twitch plugin.  This plugin uses the Twitch username entered on user's profiles.  Any member who enters their Twitch name in their profile will appear on the <a href='" . $MAIN_ROOT . "plugins/twitch' target='_blank'>Twitch Page</a>." . $additionalTwitchInfo, "attributes" => array("action" => $MAIN_ROOT . "plugins/settings.php?plugin=" . $_GET['plugin'], "method" => "post"), "afterSave" => array("saveTwitchSettings"), "saveMessage" => "Twitch Settings Saved!", "saveLink" => $MAIN_ROOT . "members/console.php?cID=" . $cID, "embedJS" => $embedJS);
function saveTwitchSettings()
{
    global $pluginObj;
    $pluginObj->addConfigValue("twitchsocial_id", $_POST['twitchsocial_id']);
    $pluginObj->addConfigValue("stream_width", $_POST['stream_width']);
    $pluginObj->addConfigValue("stream_height", $_POST['stream_height']);
    $pluginObj->addConfigValue("streamchat_height", $_POST['streamchat_height']);
    $pluginObj->addConfigValue("autoplay", $_POST['autoplay']);
    $pluginObj->addConfigValue("autohidechat", $_POST['autohidechat']);
}
?>
開發者ID:nsystem1,項目名稱:clanscripts,代碼行數:30,代碼來源:settings_form.php

示例2: ConsoleOption

while ($row = $result->fetch_assoc()) {
    $boardObj->objPost->select($row['forumpost_id']);
    $boardObj->objPost->blnManageable = $blnManagePosts;
    if ($boardObj->objPost->get_info("member_id") == $memberInfo['member_id'] || $blnManagePosts) {
        $countManagablePosts++;
        $boardObj->objPost->blnManageable = true;
    }
    $boardObj->objPost->show();
}
$pageSelector->show();
echo "\n<div class='formDiv' style='background: none; border: 0px; overflow: auto'>\n\t<div style='float: right'>" . $dispManagePosts . $dispPostReply . "</div>\n</div>\n\n";
if (LOGGED_IN && $topicInfo['lockstatus'] == 0) {
    $forumConsoleObj = new ConsoleOption($mysqli);
    $postCID = $forumConsoleObj->findConsoleIDByName("Post Topic");
    $forumConsoleObj->select($postCID);
    $postReplyLink = $forumConsoleObj->getLink();
    $i = 1;
    $arrComponents = array("message" => array("type" => "richtextbox", "sortorder" => $i++, "display_name" => "Message", "attributes" => array("id" => "richTextarea", "style" => "width: 90%", "rows" => "10"), "validate" => array("NOT_BLANK")), "submit" => array("type" => "submit", "sortorder" => $i++, "attributes" => array("class" => "submitButton formSubmitButton"), "value" => "Post"));
    $arrSetupReplyForm = array("name" => "forum-quick-reply", "components" => $arrComponents, "wrapper" => array(), "attributes" => array("method" => "post", "action" => $postReplyLink . "&bID=" . $boardInfo['forumboard_id'] . "&tID=" . $topicInfo['forumtopic_id']));
    $quickReplyForm->buildForm($arrSetupReplyForm);
    echo "\n\n\t\t<div class='formDiv'>\n\t\t\t<b>Quick Reply:</b>\n\n\t\t\t";
    $quickReplyForm->show();
    echo "\n\t\t</div>\n\t\n\t";
}
if ($blnPageSelect) {
    echo "\n\t\t<script type='text/javascript'>\n\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#btnPageSelectTop, #btnPageSelectBottom').click(function() {\n\t\t\t\t\t\n\t\t\t\t\tvar jqPageSelect = \"#pageSelectBottom\";\n\t\t\t\t\tvar intNewPage = 0;\n\t\t\t\t\t\n\t\t\t\t\tif(\$(this).attr('id') == \"btnPageSelectTop\") {\n\t\t\t\t\t\tjqPageSelect = \"#pageSelectTop\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tintNewPage = \$(jqPageSelect).val();\n\t\t\t\t\t\n\t\t\t\t\twindow.location = 'viewtopic.php?tID=" . $_GET['tID'] . "&pID='+intNewPage;\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t";
}
if ($blnManagePosts) {
    echo "\n\t\t<div id='confirmDeleteTopicDiv' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\tAre you sure you want to delete this topic?<br><br>\n\t\t\t\tAll posts will be deleted within the topic as well.\n\t\t\t</p>\n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\t\tfunction deleteTopic() {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\n\t\t\t\t\t\$('#confirmDeleteTopicDiv').dialog({\n\t\t\t\t\t\ttitle: 'Delete Topic - Confirm Delete',\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&tID=" . $topicInfo['forumtopic_id'] . "&action=delete'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\n\t\t\t}\n\t\t</script>\n\t";
}
if ($countManagablePosts > 0) {
開發者ID:nsystem1,項目名稱:clanscripts,代碼行數:31,代碼來源:viewtopic.php


注:本文中的ConsoleOption::getLink方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。