コード例 #1
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function about_block_page_edit($options)
{
    @(include dirname(dirname(__FILE__)) . "/xoops_version.php");
    $page_handler =& xoops_getmodulehandler('page', 'about');
    $criteria = new CriteriaCompo();
    $criteria->add(new Criteria('page_status', 1), 'AND');
    $criteria->add(new Criteria('page_type', 1));
    $criteria->setSort('page_order');
    $criteria->setOrder('ASC');
    $fields = array("page_id", "page_title", "page_image");
    $pages = $page_handler->getAll($criteria, $fields, false);
    $page_title = '';
    foreach ($pages as $k => $v) {
        $page_title = '<a href="' . XOOPS_URL . '/modules/' . $modversion['dirname'] . '/index.php?page_id=' . $k . '" target="_blank">' . $v['page_title'] . '</a>';
        $options_page[$k] = empty($v['page_image']) ? $page_title : $page_title . '<img src="' . XOOPS_URL . '/modules/' . $modversion['dirname'] . '/images/picture.png' . '" />';
    }
    include_once dirname(dirname(__FILE__)) . '/include/xoopsformloader.php';
    $form = new XoopsBlockForm();
    $page_select = new XoopsFormRadio(_MI_ABOUT_BLOCKPAGE, 'options[0]', $options[0], '<br />');
    $page_select->addOptionArray($options_page);
    $form->addElement($page_select);
    $form->addElement(new XoopsFormText(_MI_ABOUT_TEXT_LENGTH, 'options[1]', 5, 5, $options[1]));
    $form->addElement(new XoopsFormText(_MI_ABOUT_VIEW_MORELINKTEXT, 'options[2]', 30, 50, $options[2]));
    $form->addElement(new XoopsFormRadioYN(_MI_ABOUT_DOTITLEIMAGE, 'options[3]', $options[3]));
    return $form->render();
}
コード例 #2
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function press_block_news_edit($options)
{
    global $GLOBALS;
    include_once XOOPS_ROOT_PATH . "/modules/press/include/xoopsformloader.php";
    $category_handler =& xoops_getmodulehandler("category", "press");
    $form = new XoopsBlockForm("", "", "");
    $form_select = new XoopsFormSelect("catgory", "options[0]", $options[0]);
    $form_select->addOption(0, _ALL);
    $form_select->addOptionArray($category_handler->getList());
    $form->addElement($form_select);
    $form->addElement(new XoopsFormText("show", "options[1]", 5, 2, $options[1]));
    $form->render();
    return $form->render();
}
コード例 #3
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function spotlight_spotlight_edit($options)
{
    if (file_exists(XOOPS_ROOT_PATH . "/class/xoopsform/blockform.php")) {
        include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
    } else {
        include_once dirname(dirname(__FILE__)) . "/class/blockform.php";
    }
    $form = new XoopsBlockForm("", "", "");
    $sp_handler =& xoops_getmodulehandler('spotlight', 'spotlight');
    $spotlights = $sp_handler->getList();
    if (empty($spotlights)) {
        $form->addElement(new XoopsFormLabel('', _MB_SPOTLIGHT_DO_NOT_ADD_GROUP_INFORMATION . '<a href="' . XOOPS_URL . '/modules/spotlight/admin/admin.spotlight.php">' . _MB_SPOTLIGHT_HERE . '</a>' . _MB_SPOTLIGHT_BE_ADDED));
    } else {
        $sp_select = new XoopsFormSelect(_MB_SPOTLIGHT_GROUP_NAME, 'options[0]', $options[0]);
        $sp_select->addOptionArray($spotlights);
        $form->addElement($sp_select);
    }
    return $form->render();
}
コード例 #4
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function links_block_edit($options)
{
    include_once XOOPS_ROOT_PATH . "/modules/links/include/xoopsformloader.php";
    $form = new XoopsBlockForm("", "", "");
    $categories = new XoopsFormSelect(_MB_LINKS_SHOWCAT, 'options[0]', $options[0]);
    $categories->addOption(0, _MB_LINKS_ALL);
    $cat_handler = xoops_getmodulehandler('category', 'links');
    $criteria = new CriteriaCompo();
    $criteria->setSort('cat_order');
    $criteria->setOrder('ASC');
    $category = $cat_handler->getList($criteria);
    foreach ($cat_handler->getList($criteria) as $k => $v) {
        $categories->addOption($k, $v);
    }
    $form->addElement($categories, true);
    $sort = new XoopsFormSelect(_MB_LINKS_SORTWAY, 'options[1]', $options[1]);
    $sort->addOption('published', _MB_LINKS_PUBLISHTIME);
    $sort->addOption('datetime', _MB_LINKS_UPDATETIME);
    $sort->addOption('link_order', _MB_LINKS_DEFAULT);
    $form->addElement($sort, true);
    $form->addElement(new XoopsFormText(_MB_LINKS_SHOWHOWLIK, "options[2]", 5, 2, $options[2]), true);
    $form->addElement(new XoopsFormText(_MB_LINKS_LIKTITLEMAX, "options[3]", 5, 2, $options[3]), true);
    $form->addElement(new XoopsFormRadioYN(_MB_LINKS_SHOWCATTITLE, 'options[4]', $options[4]), true);
    $display = new XoopsFormSelect(_MB_LINKS_BYSHOW, 'options[5]', $options[5]);
    $display->addOption('1', _MB_LINKS_LOGOHOR);
    $display->addOption('2', _MB_LINKS_LOGOVER);
    $display->addOption('3', _MB_LINKS_TITLEHOR);
    $display->addOption('4', _MB_LINKS_TITLEVER);
    $form->addElement($display, true);
    return $form->render();
}
コード例 #5
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function resources_resource_edit($options)
{
    include_once XOOPS_ROOT_PATH . "/modules/resources/include/xoopsformloader.php";
    $form = new XoopsBlockForm("", "", "");
    $categories = new XoopsFormSelect('资源分类', 'options[0]', $options[0]);
    $categories->addOption(0, '全部');
    $category_handler =& xoops_getmodulehandler('category', 'resources');
    $criteria = new CriteriaCompo();
    $criteria->setSort('cat_weight');
    $criteria->setOrder('ASC');
    $category = $category_handler->getList($criteria);
    foreach ($category as $k => $v) {
        $categories->addOption($k, $v);
    }
    $form->addElement($categories, true);
    $sort = new XoopsFormSelect('显示顺序', 'options[1]', $options[1]);
    $sort->addOption('res_weight', '按照资源排序');
    $sort->addOption('update_time', '按照更新时间');
    $form->addElement($sort, true);
    $form->addElement(new XoopsFormText('显示前几条资源', "options[2]", 5, 2, $options[2]), true);
    return $form->render();
}
コード例 #6
0
ファイル: blocks.php プロジェクト: yunsite/xoopsdc
function portfolio_block_case_edit($options)
{
    include_once XOOPS_ROOT_PATH . "/modules/portfolio/class/blockform.php";
    $form = new XoopsBlockForm("", "", "");
    $service_handler = xoops_getmodulehandler('service', 'portfolio');
    $criteria = new CriteriaCompo();
    $criteria->add(new Criteria('service_status', 1), 'AND');
    $criteria->setSort('service_weight');
    $criteria->setOrder('ASC');
    $services = $service_handler->getList($criteria);
    $service_select = new XoopsFormSelect('服务选择', "options[0]", $options[0]);
    $service_select->addOption(0, "默认全部");
    $service_select->addOptionArray($services);
    $form->addElement($service_select);
    $weight = new XoopsFormSelect('排序方式', "options[1]", $options[1]);
    $weight->addOption("case_weight", "指定排序");
    $weight->addOption("case_pushtime", "发布时间");
    $weight->addOption("case_datetime", "更新时间");
    $form->addElement($weight);
    $form->addElement(new XoopsFormText("显示条目数", "options[2]", 5, 2, $options[2]));
    $form->addElement(new XoopsFormRadioYN("显示摘要", 'options[3]', $options[3]));
    $form->addElement(new XoopsFormRadioYN("显示内容", 'options[4]', $options[4]));
    $form->addElement(new XoopsFormRadioYN("显示题头图片", 'options[5]', $options[5]));
    $form->addElement(new XoopsFormRadioYN("显示相册", 'options[6]', $options[6]));
    $form->addElement(new XoopsFormText("标题字符限制", "options[7]", 5, 2, $options[7]));
    $form->addElement(new XoopsFormText("摘要字符限制", "options[8]", 5, 2, $options[8]));
    $form->addElement(new XoopsFormText("内容字符限制", "options[9]", 5, 2, $options[9]));
    $form->addElement(new XoopsFormText("相册标题字符限制", "options[10]", 5, 2, $options[10]));
    $form->addElement(new XoopsFormText("相册描述字符限制", "options[11]", 5, 2, $options[11]));
    $form->addElement(new XoopsFormRadioYN("只搜索带标题图片的案例", 'options[12]', $options[12]));
    return $form->render();
}
コード例 #7
0
ファイル: block.php プロジェクト: yunsite/xoopsdc
                 $ret .= $ele;
             } elseif (!$ele->isHidden()) {
                 if (($caption = $ele->getCaption()) != '') {
                     $ret .= "<div class='xoops-form-element-caption" . ($ele->isRequired() ? "-required" : "") . "'>" . "<span class='caption-text'>{$caption}</span>" . "<span class='caption-marker'>*</span>" . "</div>";
                 }
                 $ret .= "<div style='margin:5px 0 8px 0; '>" . $ele->render() . "</div>\n";
             } else {
                 $hidden .= $ele->render();
             }
         }
         $ret .= "</div>";
         $ret .= $this->renderValidationJS(true);
         return $ret;
     }
 }
 $form = new XoopsBlockForm("", "", "");
 $form->addElement(new XoopsFormText(TAG_MB_ITEMS, "options[0]", 25, 25, $options[0]));
 $form->addElement(new XoopsFormText(TAG_MB_TIME_DURATION, "options[1]", 25, 25, $options[1]));
 $form->addElement(new XoopsFormText(TAG_MB_FONTSIZE_MAX, "options[2]", 25, 25, $options[2]));
 $form->addElement(new XoopsFormText(TAG_MB_FONTSIZE_MIN, "options[3]", 25, 25, $options[3]));
 $form->addElement(new XoopsFormText(TAG_MB_FLASH_WIDTH, "options[4]", 25, 25, $options[4]));
 $form->addElement(new XoopsFormText(TAG_MB_FLASH_HEIGHT, "options[5]", 25, 25, $options[5]));
 $form->addElement(new XoopsFormColorPicker(TAG_MB_FLASH_TRANSPARENCY, "options[6]", $options[6]));
 $form_cumulus_flash_transparency = new XoopsFormSelect(TAG_MB_FLASH_TRANSPARENCY, "options[7]", $options[7]);
 $form_cumulus_flash_transparency->addOption(0, _NO);
 $form_cumulus_flash_transparency->addOption("transparent", TAG_MB_FLASH_TRANSPARENT);
 $form->addElement($form_cumulus_flash_transparency);
 $form->addElement(new XoopsFormColorPicker(TAG_MB_FLASH_MINFONTCOLOR, "options[8]", $options[8]));
 $form->addElement(new XoopsFormColorPicker(TAF_MB_FLASH_MAXFONTCOLOR, "options[9]", $options[9]));
 $form->addElement(new XoopsFormColorPicker(TAF_MB_FLASH_HILIGHTFONTCOLOR, "options[10]", $options[10]));
 $form->addElement(new XoopsFormText(TAG_MB_FLASH_SPEED, "options[11]", 25, 25, $options[11]));
コード例 #8
0
ファイル: blocks2.php プロジェクト: RanLee/Xoops_demo
function catalog_category_brands_edit($options)
{
    include_once XOOPS_ROOT_PATH . "/modules/catalog/class/blockform.php";
    $form = new XoopsBlockForm("", "", "");
    $category_handler = xoops_getmodulehandler('category', 'catalog');
    $categories =& $category_handler->getTrees(0, "--");
    $cat_options = array();
    if ($categories) {
        foreach ($categories as $id => $cat) {
            $cat_options[$id] = $cat["prefix"] . $cat["cat_name"];
        }
    }
    $cat_select = new XoopsFormSelect('顯示分類', 'options[0]', $options[0]);
    $cat_select->addOption(0, '全部');
    $cat_select->addOptionArray($cat_options);
    $form->addElement($cat_select, true);
    return $form->render();
}