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


PHP HTML::tt方法代码示例

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


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

示例1: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     extract($this->getArgs($argstr, $request));
     if ($numberlinks > 10 || $numberlinks < 0) {
         $numberlinks = $this->def_numberlinks;
     }
     // Get name of the current page we are on
     $thispage = $request->getArg('pagename');
     $Pages = $request->session->get("PageTrail");
     if (!is_array($Pages)) {
         $Pages = array();
     }
     if ($duplicates || $thispage != $Pages[0]) {
         array_unshift($Pages, $thispage);
         $request->session->set("PageTrail", $Pages);
     }
     $numberlinks = min(count($Pages), $numberlinks);
     if (!$invisible and $numberlinks) {
         $html = HTML::tt(WikiLink($Pages[$numberlinks - 1], 'auto'));
         for ($i = $numberlinks - 2; $i >= 0; $i--) {
             if (!empty($Pages[$i])) {
                 $html->pushContent(PAGETRAIL_ARROW, WikiLink($Pages[$i], 'auto'));
             }
         }
         return $html;
     } else {
         return HTML();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:29,代码来源:PageTrail.php

示例2: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     extract($this->getArgs($argstr, $request));
     // Any text that is returned will not be further transformed,
     // so use html where necessary.
     $html = HTML::tt(fmt('%s: %s', $salutation, WikiLink($name, 'auto')), THE_END);
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:HelloWorld.php

示例3: showForm

 function showForm(&$dbi, &$request, $args)
 {
     $action = $request->getPostURL();
     $hiddenfield = HiddenInputs($request->getArgs(), '', array('action', 'page', 's', 'direction'));
     $pagefilter = HTML::input(array('name' => 'page', 'value' => $args['page'], 'title' => _("Search only in these pages. With autocompletion."), 'class' => 'dropdown', 'acdropdown' => 'true', 'autocomplete_complete' => 'true', 'autocomplete_matchsubstring' => 'false', 'autocomplete_list' => 'xmlrpc:wiki.titleSearch ^[S] 4'), '');
     $query = HTML::input(array('name' => 's', 'value' => $args['s'], 'title' => _("Filter by this link. These are pagenames. With autocompletion."), 'class' => 'dropdown', 'acdropdown' => 'true', 'autocomplete_complete' => 'true', 'autocomplete_matchsubstring' => 'true', 'autocomplete_list' => 'xmlrpc:wiki.titleSearch ^[S] 4'), '');
     $dirsign_switch = JavaScript("\nfunction dirsign_switch() {\n  var d = document.getElementById('dirsign')\n  d.innerHTML = (d.innerHTML == ' =&gt; ') ? ' &lt;= ' : ' =&gt; '\n}\n");
     $dirsign = " => ";
     $in = $out = array('name' => 'direction', 'type' => 'radio', 'onChange' => 'dirsign_switch()');
     $out['value'] = 'out';
     $out['id'] = 'dir_out';
     if ($args['direction'] == 'out') {
         $out['checked'] = 'checked';
     }
     $in['value'] = 'in';
     $in['id'] = 'dir_in';
     if ($args['direction'] == 'in') {
         $in['checked'] = 'checked';
         $dirsign = " <= ";
     }
     $direction = HTML(HTML::input($out), HTML::label(array('for' => 'dir_out'), _("outgoing")), HTML::input($in), HTML::label(array('for' => 'dir_in'), _("incoming")));
     /*
     $direction = HTML::select(array('name'=>'direction',
                                     'onChange' => 'dirsign_switch()'));
     $out = array('value' => 'out');
     if ($args['direction']=='out') $out['selected'] = 'selected';
     $in = array('value' => 'in');
     if ($args['direction']=='in') {
         $in['selected'] = 'selected';
         $dirsign = " <= ";
     }
     $direction->pushContent(HTML::option($out, _("outgoing")));
     $direction->pushContent(HTML::option($in, _("incoming")));
     */
     $submit = Button('submit:search', _("LinkSearch"), false);
     $instructions = _("Search in pages for links with the matching name.");
     $form = HTML::form(array('action' => $action, 'method' => 'GET', 'accept-charset' => $GLOBALS['charset']), $dirsign_switch, $hiddenfield, $instructions, HTML::br(), $pagefilter, HTML::strong(HTML::tt(array('id' => 'dirsign'), $dirsign)), $query, HTML::raw('&nbsp;'), $direction, HTML::raw('&nbsp;'), $submit);
     return $form;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:39,代码来源:LinkSearch.php

示例4: _start_block

 function _start_block($header)
 {
     $this->_block = HTML::table(array('width' => '100%', 'class' => 'block', 'cellspacing' => 0, 'cellpadding' => 1, 'border' => 0), HTML::tr(HTML::td(array('colspan' => 2), HTML::tt($header))));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:Diff.php

示例5: _debug

 function _debug($tab, $msg)
 {
     //return ;
     $where = $this->where();
     $tab = str_repeat('____', $this->getDepth()) . $tab;
     printXML(HTML::div("{$tab} {$msg}: at: '", HTML::tt($where), "'"));
     flush();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:BlockParser.php

示例6: _formatMap

 function _formatMap($pagetext)
 {
     $map = $this->_getMap($pagetext);
     if (!$map) {
         return HTML::p("<No interwiki map found>");
     }
     // Shouldn't happen.
     $mon_attr = array('class' => 'interwiki-moniker');
     $url_attr = array('class' => 'interwiki-url');
     $thead = HTML::thead(HTML::tr(HTML::th($mon_attr, _("Moniker")), HTML::th($url_attr, _("InterWiki Address"))));
     foreach ($map as $moniker => $interurl) {
         $rows[] = HTML::tr(HTML::td($mon_attr, new Cached_WikiLinkIfKnown($moniker)), HTML::td($url_attr, HTML::tt($interurl)));
     }
     return HTML::table(array('class' => 'interwiki-map'), $thead, HTML::tbody(false, $rows));
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:15,代码来源:PageType.php

示例7: setaclForm

 function setaclForm(&$header, $post_args, $pagehash)
 {
     $acl = $post_args['acl'];
     //FIXME: find intersection of all pages perms, not just from the last pagename
     $pages = array();
     foreach ($pagehash as $name => $checked) {
         if ($checked) {
             $pages[] = $name;
         }
     }
     $perm_tree = pagePermissions($name);
     $table = pagePermissionsAclFormat($perm_tree, !empty($pages));
     $header->pushContent(HTML::strong(_("Selected Pages: ")), HTML::tt(join(', ', $pages)), HTML::br());
     $first_page = $GLOBALS['request']->_dbi->getPage($name);
     $owner = $first_page->getOwner();
     list($type, $perm) = pagePermissionsAcl($perm_tree[0], $perm_tree);
     //if (DEBUG) $header->pushContent(HTML::pre("Permission tree for $name:\n",print_r($perm_tree,true)));
     if ($type == 'inherited') {
         $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]);
     } elseif ($type == 'page') {
         $type = _("individual page permission");
     } elseif ($type == 'default') {
         $type = _("default page permission");
     }
     $header->pushContent(HTML::strong(_("Type") . ': '), HTML::tt($type), HTML::br());
     $header->pushContent(HTML::strong(_("ACL") . ': '), HTML::tt($perm->asAclLines()), HTML::br());
     $header->pushContent(HTML::p(HTML::strong(_("Description") . ': '), _("Selected Grant checkboxes allow access, unselected checkboxes deny access."), _("To ignore delete the line."), _("To add check 'Add' near the dropdown list.")));
     $header->pushContent($table);
     //
     // display array of checkboxes for existing perms
     // and a dropdown for user/group to add perms.
     // disabled if inherited,
     // checkbox to disable inheritance,
     // another checkbox to progate new permissions to all childs (if there exist some)
     //Todo:
     // warn if more pages are selected and they have different perms
     //$header->pushContent(HTML::input(array('name' => 'admin_setacl[acl]',
     //                                       'value' => $post_args['acl'])));
     $header->pushContent(HTML::br());
     if (!empty($pages) and defined('EXPERIMENTAL') and EXPERIMENTAL) {
         $checkbox = HTML::input(array('type' => 'checkbox', 'name' => 'admin_setacl[updatechildren]', 'value' => 1));
         if (!empty($post_args['updatechildren'])) {
             $checkbox->setAttr('checked', 'checked');
         }
         $header->pushContent($checkbox, _("Propagate new permissions to all subpages?"), HTML::raw("&nbsp;&nbsp;"), HTML::em(_("(disable individual page permissions, enable inheritance)?")), HTML::br(), HTML::em(_("(Currently not working)")));
     }
     $header->pushContent(HTML::hr());
     return $header;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:49,代码来源:WikiAdminSetAcl.php

示例8: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     global $WikiTheme;
     $this->_supported_operators = array(':=', '<', '<=', '>', '>=', '!=', '==', '=~');
     $this->_text_operators = array(':=', '==', '=~', '!=');
     $args = $this->getArgs($argstr, $request);
     if (empty($args['page'])) {
         $args['page'] = "*";
     }
     if (!isset($args['s'])) {
         // it might be (integer) 0
         $args['s'] = "*";
     }
     $posted = $request->getArg("semsearch");
     $form = $this->showForm($dbi, $request, $args);
     if (isset($this->_norelations_warning)) {
         $form->pushContent(HTML::div(array('class' => 'warning'), _("Warning:"), HTML::br(), _("No relations nor attributes in the whole wikidb defined!"), "\n", fmt("See %s", WikiLink(_("Help:SemanticRelations")))));
     }
     extract($args);
     // for convenience and harmony we allow GET requests also.
     if (!$request->isPost()) {
         if ($relation or $attribute) {
             // check for good GET request
         } else {
             return $form;
         }
         // nobody called us, so just display our supadupa form
     }
     $pagequery = $this->regex_query($page, $args['case_exact'], $args['regex']);
     // we might want to check for semsearch['relations'] and semsearch['attributes'] also
     if (empty($relation) and empty($attribute)) {
         // so we just clicked without selecting any relation.
         // hmm. check which button we clicked, before we do the massive alltogether search.
         if (isset($posted['relations']) and $posted['relations']) {
             $relation = '*';
         } elseif (isset($posted['attributes']) and $posted['attributes']) {
             $attribute = '*';
             // here we have to check for invalid text operators. ignore it then
             if (!in_array($attr_op, $this->_text_operators)) {
                 $attribute = '';
             }
         }
     }
     $searchtype = "Text";
     if (!empty($relation)) {
         $querydesc = $relation . "::" . $s;
         $linkquery = $this->regex_query($s, $args['case_exact'], $args['regex']);
         $relquery = $this->regex_query($relation, $args['case_exact'], $args['regex']);
         $links = $dbi->linkSearch($pagequery, $linkquery, 'relation', $relquery);
         $pagelist = new PageList($info, $exclude, $args);
         $pagelist->_links = array();
         while ($link = $links->next()) {
             $pagelist->addPage($link['pagename']);
             $pagelist->_links[] = $link;
         }
         // default (=empty info) wants all three. but we want to be able to override this.
         // $pagelist->_columns_seen is the exploded info
         if (!$info or $info and isset($pagelist->_columns_seen['relation'])) {
             $pagelist->addColumnObject(new _PageList_Column_SemanticSearch_relation('relation', _("Relation"), $pagelist));
         }
         if (!$args['info'] or $args['info'] and isset($pagelist->_columns_seen['linkto'])) {
             $pagelist->addColumnObject(new _PageList_Column_SemanticSearch_link('linkto', _("Link"), $pagelist));
         }
     }
     // can we merge two different pagelist?
     if (!empty($attribute)) {
         $relquery = $this->regex_query($attribute, $args['case_exact'], $args['regex']);
         if (!in_array($attr_op, $this->_supported_operators)) {
             return HTML($form, $this->error(fmt("Illegal operator: %s", HTML::tt($attr_op))));
         }
         $s_base = preg_replace("/,/", "", $s);
         $units = new Units();
         if (!is_numeric($s_base)) {
             $s_base = $units->basevalue($s_base);
             $is_numeric = is_numeric($s_base);
         } else {
             $is_numeric = true;
         }
         // check which type to search with:
         // at first check if forced text matcher
         if ($attr_op == '=~') {
             if ($s == '*') {
                 $s = '.*';
             }
             // help the poor user. we need pcre syntax.
             $linkquery = new TextSearchQuery("{$s}", $args['case_exact'], 'pcre');
             $querydesc = "{$attribute} {$attr_op} {$s}";
         } elseif ($is_numeric) {
             // do comparison with numbers
             /* We want to search for multiple attributes also. linkSearch can do this.
              * But we have to construct the query somehow. (that's why we try the AND OR dhtml)
              *     population < 1 million AND area > 50 km2
              * Here we check only for one attribute per page.
              * See SemanticSearchAdvanced for the full expression.
              */
             // it might not be the best idea to use '*' as variable to expand. hmm.
             if ($attribute == '*') {
                 $attribute = '_star_';
             }
             $searchtype = "Numeric";
//.........这里部分代码省略.........
开发者ID:hugcoday,项目名称:wiki,代码行数:101,代码来源:SemanticSearch.php

示例9: _lines

 function _lines($lines, $class, $prefix = false, $elem = false)
 {
     if (!$prefix) {
         $prefix = HTML::raw('&nbsp;');
     }
     $div = HTML::div(array('class' => 'difftext'));
     foreach ($lines as $line) {
         if ($elem) {
             $line = new HtmlElement($elem, $line);
         }
         $div->pushContent(HTML::div(array('class' => $class), HTML::tt(array('class' => 'prefix'), $prefix), $line, HTML::raw('&nbsp;')));
     }
     $this->_block->pushContent($div);
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:14,代码来源:diff.php

示例10: showWatchList

 function showWatchList($pagelist)
 {
     return HTML::strong(HTML::tt(empty($pagelist) ? _("<empty>") : $pagelist));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:4,代码来源:WatchPage.php

示例11: setaclForm

 function setaclForm(&$header, $pagehash)
 {
     $pages = array();
     foreach ($pagehash as $name => $checked) {
         if ($checked) {
             $pages[] = $name;
         }
     }
     $header->pushContent(HTML::strong(_("Selected Pages: ")), HTML::tt(join(', ', $pages)), HTML::br());
     return $header;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:11,代码来源:WikiAdminSetAclSimple.php

示例12: pagePermissionsSimpleFormat

function pagePermissionsSimpleFormat($perm_tree, $owner, $group = false)
{
    list($type, $perm) = pagePermissionsAcl($perm_tree[0], $perm_tree);
    /*
    $type = $perm_tree[0];
    $perm = pagePermissionsAcl($perm_tree);
    if (is_object($perm_tree[1]))
        $perm = $perm_tree[1];
    elseif (is_array($perm_tree[1])) {
        $perm_tree = pagePermissionsSimpleFormat($perm_tree[1],$owner,$group);
    	if (isa($perm_tree[1],'pagepermission'))
    	    $perm = $perm_tree[1];
    	elseif (isa($perm_tree,'htmlelement'))
            return $perm_tree;
    }
    */
    if ($type == 'page') {
        return HTML::tt(HTML::strong($perm->asRwxString($owner, $group)));
    } elseif ($type == 'default') {
        return HTML::tt($perm->asRwxString($owner, $group));
    } elseif ($type == 'inherited') {
        return HTML::tt(array('class' => 'inherited', 'style' => 'color:#aaa;'), $perm->asRwxString($owner, $group));
    }
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:24,代码来源:PagePerm.php

示例13: tex2png

 function tex2png($text)
 {
     // the name of the png cached file
     $imagename = md5($text) . ".png";
     $url = $this->imagepath . "/{$imagename}";
     if (!file_exists($url)) {
         if (is_writable($this->imagepath)) {
             $texfile = $this->imagepath . "/temp.tex";
             $this->createTexFile($texfile, $text);
             $this->createPngFile($this->imagepath, $imagename);
         } else {
             $error_html = _("TeX directory not writable.");
             trigger_error($error_html, E_USER_NOTICE);
         }
     }
     // there is always something in the html page
     // even if the tex directory doesn't exist
     // or mathematical expression is wrong
     switch ($this->isMathExp($text)) {
         case 0:
             // not a mathematical expression
             $html = HTML::tt(array('class' => 'tex', 'style' => 'color:red;'), $text);
             break;
         case 1:
             // an inlined mathematical expression
             $html = HTML::img(array('class' => 'tex', 'src' => $url, 'alt' => $text));
             break;
         case 2:
             // mathematical expression on separate line
             $html = HTML::img(array('class' => 'tex', 'src' => $url, 'alt' => $text));
             $html = HTML::div(array('align' => 'center'), $html);
             break;
         default:
             break;
     }
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:37,代码来源:TeX2png.php


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