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


PHP XoopsFormRadio::setDescription方法代码示例

本文整理汇总了PHP中XoopsFormRadio::setDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsFormRadio::setDescription方法的具体用法?PHP XoopsFormRadio::setDescription怎么用?PHP XoopsFormRadio::setDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsFormRadio的用法示例。


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

示例1: getForm

 /**
  * Get a {@link XoopsForm} object for creating/editing Spotlight articles
  *
  * @return object
  */
 function getForm($action = false)
 {
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     $title = _AMS_AM_SPOTLIGHT;
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     include_once XOOPS_ROOT_PATH . "/modules/AMS/class/formimageselect.php";
     $form = new XoopsThemeForm($title, 'spotlightform', $action);
     if (!$this->isNew()) {
         $form->addElement(new XoopsFormHidden('id', $this->getVar('spotlightid')));
     }
     $mode_select = new XoopsFormRadio('', 'mode', $this->getVar('mode'));
     $mode_select->addOption(1, _AMS_AM_SPOT_LATESTARTICLE);
     $mode_select->addOption(2, _AMS_AM_SPOT_LATESTINTOPIC);
     $mode_select->addOption(3, _AMS_AM_SPOT_SPECIFICARTICLE);
     $mode_select->addOption(4, _AMS_AM_SPOT_CUSTOM);
     include_once XOOPS_ROOT_PATH . "/class/tree.php";
     include_once XOOPS_ROOT_PATH . "/modules/AMS/class/class.newstopic.php";
     include_once XOOPS_ROOT_PATH . "/modules/AMS/class/class.newsstory.php";
     $xt = new AmsTopic($GLOBALS['xoopsDB']->prefix("ams_topics"));
     $allTopics = $xt->getAllTopics();
     $topic_obj_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
     $topic_select = new XoopsFormLabel(_AMS_AM_TOPIC, $topic_obj_tree->makeSelBox('topicid', 'topic_title', '--', $this->getVar('topicid'), false));
     $topic_select->setDescription(_AMS_AM_SPOT_TOPIC_DESC);
     $article_select = new XoopsFormSelect(_AMS_AM_ARTICLE, 'storyid', $this->getVar('storyid'));
     $article_select->addOptionArray(AmsStory::getAllPublished($GLOBALS['xoopsModuleConfig']['spotlight_art_num'], 0, false, 0, 1, false));
     $article_select->setDescription(_AMS_AM_SPOT_ARTICLE_DESC);
     $mode_tray = new XoopsFormElementTray(_AMS_AM_SPOT_MODE_SELECT);
     $mode_tray->addElement($mode_select);
     $showimage_select = new XoopsFormRadio(_AMS_AM_SPOT_SHOWIMAGE, 'showimage', $this->getVar('showimage'));
     $showimage_select->addOption(0, _AMS_AM_SPOT_SPECIFYIMAGE);
     $showimage_select->addOption(1, _AMS_AM_SPOT_TOPICIMAGE);
     $showimage_select->addOption(2, _AMS_AM_SPOT_AUTHORIMAGE);
     $showimage_select->addOption(3, _AMS_AM_SPOT_NOIMAGE);
     $showimage_select->setDescription(_AMS_AM_SPOT_SHOWIMAGE_DESC);
     $image_select = new XoopsFormImageSelect(_AMS_AM_SPOT_IMAGE, 'image', $this->getVar('image', 'e'), 70, 255);
     $autoteaser_select = new XoopsFormRadioYN(_AMS_AM_SPOT_AUTOTEASER, 'autoteaser', $this->getVar('autoteaser'));
     $teaser_text = new XoopsFormDhtmlTextArea(_AMS_AM_SPOT_TEASER, 'teaser', $this->getVar('teaser', 'e'));
     $maxlength_text = new XoopsFormText(_AMS_AM_SPOT_MAXLENGTH, 'maxlength', 10, 10, $this->getVar('maxlength'));
     $display_select = new XoopsFormRadioYN(_AMS_AM_SPOT_DISPLAY, 'display', $this->getVar('display'));
     $weight_text = new XoopsFormText(_AMS_AM_SPOT_WEIGHT, 'weight', 10, 10, $this->getVar('weight'));
     $form->addElement($mode_tray);
     $form->addElement($topic_select);
     $form->addElement($article_select);
     $form->addElement($showimage_select);
     $form->addElement($image_select);
     $form->addElement($autoteaser_select);
     $form->addElement($maxlength_text);
     $form->addElement($teaser_text);
     $form->addElement($display_select);
     $form->addElement($weight_text);
     $form->addElement(new XoopsFormHidden('op', 'save'));
     $form->addElement(new XoopsFormButton('', 'spotlightsubmit', _AMS_AM_SUBMIT, 'submit'));
     return $form;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:61,代码来源:spotlight.php

示例2: XoopsFormTextArea

$form_romantic->setExtra('class="valinp"');
$form_romantic->addOption("muse", _LANG_WLA_CHECK_MUSE);
$form_romantic->addOption("crush", _LANG_WLA_CHECK_CRUSH);
$form_romantic->addOption("date", _LANG_WLA_CHECK_DATE);
$form_romantic->addOption("sweetheart", _LANG_WLA_CHECK_HEART);
$form_xfn->addElement($form_romantic);
$form->addElement($form_xfn);
$form->addElement(new XoopsFormTextArea(_LANG_WLA_SUB_NOTE, "link_notes", $link_notes, 10, 60));
$form_rating = new XoopsFormSelect(_LANG_WLA_SUB_RATE, "link_rating", $link_rating);
$form_rating->setDescription(_LANG_WLA_CHECK_ZERO);
for ($r = 0; $r < 10; $r++) {
    $form_rating->addOption($r, $r);
}
$form->addElement($form_rating);
$form_target = new XoopsFormRadio(_LANG_WLA_SUB_TARGET, "link_target", $link_target);
$form_target->setDescription(_LANG_WLA_CHECK_STRICT);
$form_target->addOption('_blank', '_blank');
$form_target->addOption('_top', '_top');
$form_target->addOption('', "none");
$form->addElement($form_target);
$form_visible = new XoopsFormRadio(_LANG_WLA_SUB_VISIBLE, "link_visible", $link_visible);
$form_visible->addOption('Y', 'Yes');
$form_visible->addOption('N', 'No');
$form->addElement($form_visible);
$form_category = new XoopsFormSelect(_LANG_WLA_SUB_CAT, "link_category", $link_category);
$form_category->addOptionArray($category_options);
$form->addElement($form_category);
if ($form_id == 'addlink') {
    $form->addElement(new XoopsFormButton("", "submit", _LANG_WLA_BUTTON_TEXTNAME, "submit"));
    $form->addElement(new XoopsFormHidden("action", 'Add'));
} else {
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:link-manager-form.php

示例3: XoopsFormWysiwygTextArea

    $sform->addElement(new XoopsFormWysiwygTextArea($editor_configs['caption'], $editor_configs['name'], $editor_configs['value'], $editor_configs['width'], $editor_configs['height'], 'hiddenHometext'));
} elseif ($wysiwyg_is_exist == 3) {
    $sform->addElement(new XoopsFormWysiwygTextArea($editor_configs, 'hiddenBodytext'));
} else {
    $sform->addElement(new XoopsFormDhtmlTextArea($editor_configs['caption'], $editor_configs['name'], $editor_configs['value'], $editor_configs['rows'], $editor_configs['cols'], 'hiddenBodytext'));
}
$sform->addElement(new XoopsFormLabel('', '* ' . _MULTIPLE_PAGE_GUIDE), false);
$sform->addElement(new XoopsFormTextArea(_AMS_NW_BANNER, 'banner', $myts->htmlSpecialChars($story->banner)));
if ($edit && !isset($_GET['approve'])) {
    $change_radio = new XoopsFormRadio(_AMS_NW_MAJOR, 'change', $story->change);
    $change_radio->addOption(0, _AMS_NW_NOVERSIONCHANGE);
    $change_radio->addOption(1, _AMS_NW_VERSION);
    $change_radio->addOption(2, _AMS_NW_REVISION);
    $change_radio->addOption(3, _AMS_NW_MINOR);
    $change_radio->addOption(4, _AMS_NW_AUTO);
    $change_radio->setDescription(_AMS_NW_VERSIONDESC);
    $change_radio->setValue(4);
    $sform->addElement($change_radio);
    $sform->addElement(new XoopsFormRadioYN(_AMS_NW_SWITCHAUTHOR . " (" . $story->uname . ")", 'newauthor', 0));
}
// Manage upload(s)
$allowupload = false;
switch ($xoopsModuleConfig['uploadgroups']) {
    case 1:
        //Submitters and Approvers
        $allowupload = true;
        break;
    case 2:
        //Approvers only
        $allowupload = $approveprivilege ? true : false;
        break;
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:storyform.inc.php


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