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


PHP form_makeWikiText函数代码示例

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


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

示例1: html_edit_form

/**
 * Display the default edit form
 *
 * Is the default action for HTML_EDIT_FORMSELECTION.
 */
function html_edit_form($param)
{
    global $TEXT;
    if ($param['target'] !== 'section') {
        msg('No editor for edit target ' . hsc($param['target']) . ' found.', -1);
    }
    $attr = array('tabindex' => '1');
    if (!$param['wr']) {
        $attr['readonly'] = 'readonly';
    }
    $param['form']->addElement(form_makeWikiText($TEXT, $attr));
}
开发者ID:nefercheprure,项目名称:dokuwiki,代码行数:17,代码来源:html.php

示例2: tpl_form

 /**
  * Prints the comment form
  *
  * FIXME
  *  allow comments only for registered users
  *  add toolbar
  */
 function tpl_form($page, $pid)
 {
     global $INFO;
     global $BLOGTNG;
     $form = new DOKU_Form('blogtng__comment_form', wl($page) . '#blogtng__comment_form');
     $form->addHidden('pid', $pid);
     $form->addHidden('id', $page);
     $form->addHidden('btng[comment][source]', 'comment');
     foreach (array('name', 'mail', 'web') as $field) {
         $attr = $BLOGTNG['comment_submit_errors'][$field] ? array('class' => 'edit error') : array();
         if ($field == 'web' && !$this->getConf('comments_allow_web')) {
             continue;
         } else {
             $form->addElement(form_makeTextField('btng[comment][' . $field . ']', $BLOGTNG['comment'][$field], $this->getLang('comment_' . $field), 'blogtng__comment_' . $field, 'edit block', $attr));
         }
     }
     $form->addElement(form_makeOpenTag('div', array('class' => 'blogtng__toolbar')));
     $form->addElement(form_makeCloseTag('div'));
     if ($BLOGTNG['comment_submit_errors']['text']) {
         $form->addElement(form_makeWikiText($BLOGTNG['comment']['text'], array('class' => 'edit error')));
     } else {
         $form->addElement(form_makeWikiText($BLOGTNG['comment']['text']));
     }
     //add captcha if available
     $helper = null;
     if (@is_dir(DOKU_PLUGIN . 'captcha')) {
         $helper = plugin_load('helper', 'captcha');
     }
     if (!is_null($helper) && $helper->isEnabled()) {
         $form->addElement($helper->getHTML());
     }
     $form->addElement(form_makeButton('submit', 'comment_preview', $this->getLang('comment_preview'), array('class' => 'button', 'id' => 'blogtng__preview_submit')));
     $form->addElement(form_makeButton('submit', 'comment_submit', $this->getLang('comment_submit'), array('class' => 'button', 'id' => 'blogtng__comment_submit')));
     if ($this->getConf('comments_subscription')) {
         $form->addElement(form_makeCheckboxField('blogtng[subscribe]', 1, $this->getLang('comment_subscribe')));
     }
     print '<div id="blogtng__comment_form_wrap">' . DOKU_LF;
     $form->printForm();
     if (isset($BLOGTNG['comment_action']) && $BLOGTNG['comment_action'] == 'preview' && empty($BLOGTNG['comment_submit_errors'])) {
         print '<div id="blogtng__comment_preview">' . DOKU_LF;
         $comment = new blogtng_comment();
         $comment->data = $BLOGTNG['comment'];
         $comment->data['cid'] = 'preview';
         $comment->output('default');
         print '</div>' . DOKU_LF;
     }
     print '</div>' . DOKU_LF;
 }
开发者ID:Narrator,项目名称:plugin-blogtng,代码行数:55,代码来源:comments.php

示例3: html_edit


//.........这里部分代码省略.........
            msg('Command disabled: source', -1);
            return;
        }
        print p_locale_xhtml('read');
    }
    if (!$DATE) {
        $DATE = $INFO['lastmod'];
    }
    ?>
  <div style="width:99%;">

   <div class="toolbar">
      <div id="draft__status"><?php 
    if (!empty($INFO['draft'])) {
        echo $lang['draftdate'] . ' ' . strftime($conf['dformat']);
    }
    ?>
</div>
      <div id="tool__bar"><?php 
    if ($wr) {
        ?>
<a href="<?php 
        echo DOKU_BASE;
        ?>
lib/exe/mediamanager.php?ns=<?php 
        echo $INFO['namespace'];
        ?>
"
      target="_blank"><?php 
        echo $lang['mediaselect'];
        ?>
</a><?php 
    }
    ?>
</div>

      <?php 
    if ($wr) {
        ?>
      <script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--
        <?php 
        /* sets changed to true when previewed */
        ?>
        textChanged = <?php 
        $mod ? print 'true' : (print 'false');
        ?>
;
      //--><!]]></script>
      <span id="spell__action"></span>
      <div id="spell__suggest"></div>
      <?php 
    }
    ?>
   </div>
   <div id="spell__result"></div>
<?php 
    $form = new Doku_Form('dw__editform');
    $form->addHidden('id', $ID);
    $form->addHidden('rev', $REV);
    $form->addHidden('date', $DATE);
    $form->addHidden('prefix', $PRE);
    $form->addHidden('suffix', $SUF);
    $form->addHidden('changecheck', $check);
    $attr = array('tabindex' => '1');
    if (!$wr) {
        $attr['readonly'] = 'readonly';
    }
    $form->addElement(form_makeWikiText($text, $attr));
    $form->addElement(form_makeOpenTag('div', array('id' => 'wiki__editbar')));
    $form->addElement(form_makeOpenTag('div', array('id' => 'size__ctl')));
    $form->addElement(form_makeCloseTag('div'));
    if ($wr) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'editButtons')));
        $form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id' => 'edbtn__save', 'accesskey' => 's', 'tabindex' => '4')));
        $form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id' => 'edbtn__preview', 'accesskey' => 'p', 'tabindex' => '5')));
        $form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex' => '6')));
        $form->addElement(form_makeCloseTag('div'));
        $form->addElement(form_makeOpenTag('div', array('class' => 'summary')));
        $form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size' => '50', 'tabindex' => '2')));
        $elem = html_minoredit();
        if ($elem) {
            $form->addElement($elem);
        }
        $form->addElement(form_makeCloseTag('div'));
    }
    $form->addElement(form_makeCloseTag('div'));
    if ($conf['license']) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'license')));
        $out = $lang['licenseok'];
        $out .= '<a href="' . $license[$conf['license']]['url'] . '" rel="license" class="urlextern"';
        if ($conf['target']['external']) {
            $out .= ' target="' . $conf['target']['external'] . '"';
        }
        $out .= '> ' . $license[$conf['license']]['name'] . '</a>';
        $form->addElement($out);
        $form->addElement(form_makeCloseTag('div'));
    }
    html_form('edit', $form);
    print '</div>' . NL;
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:101,代码来源:html.php

示例4: html_edit_form

/**
 * Display the default edit form
 *
 * Is the default action for HTML_EDIT_FORMSELECTION.
 *
 * @triggers HTML_EDITFORM_OUTPUT
 */
function html_edit_form($param)
{
    extract($param);
    global $conf;
    global $license;
    global $lang;
    global $REV;
    global $DATE;
    global $PRE;
    global $SUF;
    global $INFO;
    global $SUM;
    global $ID;
    ?>
            <?php 
    if ($wr) {
        ?>
                <script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--
                    <?php 
        /* sets changed to true when previewed */
        ?>
                    textChanged = <?php 
        $mod ? print 'true' : (print 'false');
        ?>
;
                //--><!]]></script>
            <?php 
    }
    ?>
        <div style="width:99%;">

        <div class="toolbar">
        <div id="draft__status"><?php 
    if (!empty($INFO['draft'])) {
        echo $lang['draftdate'] . ' ' . dformat();
    }
    ?>
</div>
        <div id="tool__bar"><?php 
    if ($wr) {
        ?>
<a href="<?php 
        echo DOKU_BASE;
        ?>
lib/exe/mediamanager.php?ns=<?php 
        echo $INFO['namespace'];
        ?>
"
            target="_blank"><?php 
        echo $lang['mediaselect'];
        ?>
</a><?php 
    }
    ?>
</div>

        </div>
        <?php 
    $form = new Doku_Form(array('id' => 'dw__editform'));
    $form->addHidden('id', $ID);
    $form->addHidden('rev', $REV);
    $form->addHidden('date', $DATE);
    $form->addHidden('prefix', $PRE);
    $form->addHidden('suffix', $SUF);
    $form->addHidden('changecheck', $check);
    $attr = array('tabindex' => '1');
    if (!$wr) {
        $attr['readonly'] = 'readonly';
    }
    $form->addElement(form_makeWikiText($text, $attr));
    $form->addElement(form_makeOpenTag('div', array('id' => 'wiki__editbar')));
    $form->addElement(form_makeOpenTag('div', array('id' => 'size__ctl')));
    $form->addElement(form_makeCloseTag('div'));
    if ($wr) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'editButtons')));
        $form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id' => 'edbtn__save', 'accesskey' => 's', 'tabindex' => '4')));
        $form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id' => 'edbtn__preview', 'accesskey' => 'p', 'tabindex' => '5')));
        $form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex' => '6')));
        $form->addElement(form_makeCloseTag('div'));
        $form->addElement(form_makeOpenTag('div', array('class' => 'summary')));
        $form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size' => '50', 'tabindex' => '2')));
        $elem = html_minoredit();
        if ($elem) {
            $form->addElement($elem);
        }
        $form->addElement(form_makeCloseTag('div'));
    }
    $form->addElement(form_makeCloseTag('div'));
    if ($wr && $conf['license']) {
        $form->addElement(form_makeOpenTag('div', array('class' => 'license')));
        $out = $lang['licenseok'];
        $out .= '<a href="' . $license[$conf['license']]['url'] . '" rel="license" class="urlextern"';
        if (isset($conf['target']['external'])) {
//.........这里部分代码省略.........
开发者ID:JeromeS,项目名称:dokuwiki,代码行数:101,代码来源:html.php


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