本文整理汇总了PHP中Jot::icon方法的典型用法代码示例。如果您正苦于以下问题:PHP Jot::icon方法的具体用法?PHP Jot::icon怎么用?PHP Jot::icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jot
的用法示例。
在下文中一共展示了Jot::icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __do_response_reply_count
function __do_response_reply_count($response)
{
global $config, $speak, $segment;
$e = File::E($response->path);
$replies = count(glob(COMMENT . DS . '*_*_' . Date::slug($response->id) . '.{txt,hold}', GLOB_NOSORT | GLOB_BRACE));
$t = Jot::icon('reply-all') . ' ' . $replies;
$tt = array('title' => $replies . ' ' . ($replies === 1 ? $speak->{$segment[0] . '_reply'} : $speak->{$segment[0] . '_replies'}));
echo ($e === 'hold' || $replies === 0 ? Cell::span($t, $tt) : Cell::a($config->manager->slug . '/' . $segment[0] . '?filter=parent%3A' . $response->id, $t, null, $tt)) . ' · ';
}
示例2: manager
/**
* Widget Manager
* --------------
*
* [1]. Widget::manager('MENU');
* [2]. Widget::manager('BAR');
*
*/
public static function manager($type = 'MENU')
{
if (!Guardian::happy()) {
return "";
}
$T1 = TAB;
if ($type === 'MENU') {
$menus = array();
if ($_menus = Mecha::A(Config::get('manager_menu'))) {
$_menus = Mecha::eat($_menus)->order('ASC', 'stack', true, 10)->vomit();
foreach ($_menus as $k => $v) {
// < 1.1.3
if (is_string($v)) {
$menus[$k] = $v;
} else {
$stack = isset($v['stack']) ? $v['stack'] : 10;
$_k = (strpos($v['icon'], '<') === false ? '<i class="fa fa-fw fa-' . $v['icon'] . '"></i>' : $v['icon']) . ' <span class="label">' . $k . '</span>' . (isset($v['count']) && ($v['count'] === '∞' || (double) $v['count'] > 0) ? ' <span class="counter">' . $v['count'] . '</span>' : "");
$menus[$_k] = isset($v['url']) ? $v['url'] : null;
}
}
}
$html = O_BEGIN . '<div class="widget widget-manager widget-manager-menu" id="widget-manager-menu-' . self::$id['manager_menu'] . '">' . NL;
self::$id['manager_menu']++;
$html .= Menu::get($menus, 'ul', $T1, 'manager:');
$html .= '</div>' . O_END;
$html = Filter::apply('widget', $html);
return Filter::apply('widget:manager.menu', Filter::apply('widget:manager', $html));
}
if ($type === 'BAR') {
$html = O_BEGIN . '<div class="widget widget-manager widget-manager-bar" id="widget-manager-bar-' . self::$id['manager_bar'] . '">' . NL;
self::$id['manager_bar']++;
$bars = array();
if ($_bars = Mecha::A(Config::get('manager_bar'))) {
$_bars = Mecha::eat($_bars)->order('ASC', 'stack', true, 10)->vomit();
foreach ($_bars as $k => $v) {
if (is_string($v)) {
$bar = $v;
} else {
$t = ' data-tooltip="' . Text::parse(isset($v['description']) ? $v['description'] : $k, '->encoded_html') . '"';
$bar = isset($v['url']) ? '<a class="item" href="' . Converter::url($v['url']) . '"' . $t . '>' : '<span class="item a"' . $t . '>';
$bar .= isset($v['icon']) ? strpos($v['icon'], '<') === false ? Jot::icon($v['icon']) : $v['icon'] : $k;
$bar .= ' <span class="label">' . $k . '</span>';
if (isset($v['count']) && ($v['count'] === '∞' || (double) $v['count'] > 0)) {
$bar .= ' <span class="counter">' . $v['count'] . '</span>';
}
$bar .= isset($v['url']) ? '</a>' : '</span>';
}
$bars[] = Filter::apply('manager:bar.item', $bar);
}
}
$html .= $T1 . Filter::apply('manager:bar', implode(' ', $bars)) . NL;
$html .= '</div>';
return Filter::apply('widget:manager.bar', Filter::apply('widget:manager', $html));
}
}
示例3: array_slice
if (trim($request['name']) === "") {
$request['name'] = $id . '.txt';
// empty file name
}
$_path = Text::parse(sprintf($request['name'], $id), '->safe_path_name');
$e = File::E($_path, false);
if ($e !== 'txt' && $e !== 'php') {
$e = 'txt';
$_path .= '.txt';
}
$_path_ = File::path($_path);
$file = ASSET . DS . '__snippet' . DS . $e . DS . $_path;
if (File::exist($file)) {
// file already exists
Notify::error(Config::speak('notify_file_exist', '<code>' . $_path_ . '</code>'));
}
if (trim($request['content']) === "") {
// empty file content
Notify::error($speak->notify_error_content_empty);
}
if (!Notify::errors()) {
$recent = array_slice(File::open(CACHE . DS . 'plugin.snippet.cache')->unserialize(), 0, $config->per_page);
File::serialize(array_merge(array($_path), $recent))->saveTo(CACHE . DS . 'plugin.snippet.cache', 0600);
$url = $config->manager->slug . '/asset/repair/file:__snippet/' . $e . '/' . File::url($_path) . '?path=' . urlencode(rtrim('__snippet/' . $e . '/' . File::D(File::url($_path)), '/'));
File::write($request['content'])->saveTo($file, 0600);
Notify::success(Config::speak('notify_file_created', '<code>' . $_path_ . '</code>' . (!isset($request['redirect']) ? ' <a class="pull-right" href="' . $config->url . '/' . $url . '" target="_blank">' . Jot::icon('pencil') . ' ' . $speak->edit . '</a>' : "")));
Notify::info('<strong>' . $speak->shortcode . ':</strong> <code>{{' . ($e === 'php' ? 'include' : 'print') . ':' . str_replace('.' . $e . X, "", File::url($_path) . X) . '}}</code>');
Guardian::kick(isset($request['redirect']) ? $url : File::D($config->url_current));
}
Guardian::kick(File::D($config->url_current));
});
示例4:
?>
<div class="tab-area">
<div class="tab-button-area">
<?php
Weapon::fire('tab_button_before', $hooks);
?>
<a class="tab-button active" href="#tab-content-1"><?php
echo Jot::icon('pencil', 'fw') . ' ' . $speak->compose;
?>
</a>
<a class="tab-button" href="#tab-content-2"><?php
echo Jot::icon('leaf', 'fw') . ' ' . $speak->manager->title_css_and_js_custom;
?>
</a>
<a class="tab-button" href="#tab-content-3"><?php
echo Jot::icon('th-list', 'fw') . ' ' . $speak->fields;
?>
</a>
<?php
Weapon::fire('tab_button_after', $hooks);
?>
</div>
<div class="tab-content-area">
<?php
echo $messages;
?>
<form class="form-<?php
echo $page->id ? 'repair' : 'ignite';
?>
form-<?php
echo $segment;
示例5: array
<p><?php
echo Config::speak('notify_not_available', $speak->config);
?>
</p>
<?php
}
?>
</div>
<div class="tab-content hidden" id="tab-content-2">
<p class="about-author">
<?php
echo Cell::strong($speak->author . ':') . ' ' . Text::parse($file->author, '->encoded_html');
if (isset($file->url) && $file->url !== '#') {
?>
<?php
echo Cell::a($file->url, Jot::icon('external-link-square'), '_blank', array('class' => array('about-url', 'help'), 'title' => $speak->link, 'rel' => 'nofollow'));
?>
<?php
}
?>
</p>
<h3 class="about-title"><?php
echo $file->title;
if (isset($file->version)) {
?>
<code class="about-version"><?php
echo $file->version;
?>
</code><?php
}
?>
示例6: array
', '<?php
echo $e === 'php' ? 'include' : 'print';
?>
');" title="<?php
echo $speak->shortcode;
?>
"><?php
echo Jot::icon($e === 'php' ? 'file-code-o' : 'file-o', 'fw') . ' ' . $_file;
?>
</a></td>
<td class="td-icon"><?php
echo Jot::a('construct', $config->manager->slug . '/asset/repair/file:__snippet/' . $e . '/' . $_file, Jot::icon('pencil'), array('title' => $speak->edit));
?>
</td>
<td class="td-icon"><?php
echo Jot::a('destruct', $config->manager->slug . '/asset/kill/file:__snippet/' . $e . '/' . $_file, Jot::icon('times'), array('title' => $speak->delete));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
?>
<p><?php
echo Jot::btn('action:database', $speak->snippets, $config->manager->slug . '/asset?path=__snippet');
?>
</p>
示例7: array
<?php
$hooks = array($page, $segment);
echo $messages;
?>
<h3><?php
echo $speak->shield . ': ' . $page->title;
?>
</h3>
<?php
if (strpos($config->url_path, '/kill/file:') !== false) {
?>
<p><?php
echo Cell::strong($folder) . ' ' . Jot::icon('arrow-right') . ' ' . str_replace(DS, ' ' . Jot::icon('arrow-right') . ' ', $path);
?>
</p>
<pre><code><?php
echo Text::parse(File::open(SHIELD . DS . $folder . DS . $path)->read(), '->encoded_html');
?>
</code></pre>
<?php
} else {
if ($files) {
?>
<ul>
<?php
foreach ($files as $file) {
?>
<li><?php
echo $file->path;
?>
示例8: array
$bars = array();
if ($_bars = Mecha::A(Config::get('manager_bar'))) {
$_bars = Mecha::eat($_bars)->order('ASC', 'stack', true, 10)->vomit();
foreach ($_bars as $k => $v) {
if (is_string($v)) {
$bar = $v;
} else {
$t = ' data-tooltip="' . Text::parse(isset($v['description']) ? $v['description'] : $k, '->encoded_html') . '"';
if (isset($v['url'])) {
$url = Filter::colon('manager:url', Converter::url($v['url']));
$c = $config->url_current === $url ? ' ' . Widget::$config['classes']['current'] : "";
$bar = '<a class="item' . $c . '" href="' . $url . '"' . $t . '>';
} else {
$bar = '<span class="item a"' . $t . '>';
}
$bar .= isset($v['icon']) ? strpos($v['icon'], '<') === false ? Jot::icon($v['icon']) : $v['icon'] : $k;
$bar .= ' <span class="label">' . $k . '</span>';
if (isset($v['count']) && ($v['count'] === '∞' || (double) $v['count'] > 0)) {
$bar .= ' <span class="counter">' . $v['count'] . '</span>';
}
$bar .= isset($v['url']) ? '</a>' : '</span>';
}
$bars[] = $bar;
}
}
$html .= $T1 . implode(' ', $bars) . NL;
}
$html .= '</div>' . O_END;
$html = Filter::apply('widget', $html);
Config::set('widget_manager_' . $kin . '_id', $id);
return Filter::apply('widget:manager.' . $kin, Filter::apply('widget:manager', $html));
示例9:
$c_path = ASSET . DS;
$c_url = $config->manager->slug . '/asset';
$c_url_kill = $c_url . '/kill/file:';
$c_url_repair = $c_url . '/repair/file:';
?>
<div class="tab-area">
<a class="tab active" href="#tab-content-1"><?php
echo Jot::icon('file-o', 'fw') . ' ' . $speak->file;
?>
</a>
<a class="tab" href="#tab-content-2"><?php
echo Jot::icon('folder', 'fw') . ' ' . $speak->folder;
?>
</a>
<a class="tab" href="#tab-content-3"><?php
echo Jot::icon('cloud-upload', 'fw') . ' ' . $speak->upload;
?>
</a>
</div>
<div class="tab-content-area">
<?php
echo $messages;
?>
<div class="tab-content" id="tab-content-1">
<h3><?php
echo Config::speak('manager.title_your_', $speak->assets);
?>
</h3>
<form class="form-kill form-asset" id="form-kill" action="<?php
echo $config->url . '/' . $c_url . '/kill';
?>
示例10: array
</td>
<?php
$s = Mecha::alter($value->type[0], array('t' => 'Text', 'b' => 'Boolean', 'o' => 'Option', 'f' => 'File', 'c' => 'Composer', 'e' => 'Editor'), 'Summary');
?>
<td><?php
echo Jot::em('info', $s);
?>
</td>
<td class="td-icon">
<?php
echo Jot::a('construct', $config->manager->slug . '/field/repair/key:' . $key, Jot::icon('pencil'), array('title' => $speak->edit));
?>
</td>
<td class="td-icon">
<?php
echo Jot::a('destruct', $config->manager->slug . '/field/kill/key:' . $key, Jot::icon('times'), array('title' => $speak->delete));
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
<?php
} else {
?>
<p><?php
示例11: foreach
foreach ($fields as $key => $value) {
// <= 1.1.3
// "" is equal to `article,page`
// '*' is equal to all scopes
if ($value['scope'] === "") {
$value['scope'] = 'article,page';
}
if ($value['scope'] === '*') {
$value['scope'] = $segment;
}
if (isset($field[$key]['type'])) {
$field[$key] = isset($field[$key]['value']) ? $field[$key]['value'] : "";
}
$type = $value['type'][0];
if (strpos(',' . $value['scope'] . ',', ',' . $segment . ',') !== false) {
$description = isset($value['description']) && trim($value['description']) !== "" ? ' <span class="text-info help" title="' . Text::parse($value['description'], '->encoded_html') . '">' . Jot::icon('question-circle') . '</span>' : "";
$title = $value['title'] . $description;
$html .= Form::hidden('fields[' . $key . '][type]', $type);
if ($type === 't') {
$html .= '<label class="grid-group grid-group-text">';
$html .= '<span class="grid span-2 form-label">' . $title . '</span>';
$html .= '<span class="grid span-4">';
$html .= Form::text('fields[' . $key . '][value]', Converter::toText(isset($field[$key]) ? $field[$key] : $value['value']), Converter::toText(isset($value['placeholder']) ? $value['placeholder'] : $value['value']), array('class' => 'input-block'));
$html .= '</span>';
$html .= '</label>';
} else {
if ($type === 'b') {
$html .= '<div class="grid-group grid-group-boolean">';
$html .= '<span class="grid span-2"></span>';
$html .= '<span class="grid span-4">';
$html .= Form::checkbox('fields[' . $key . '][value]', !empty($value['value']) ? $value['value'] : '1', isset($field[$key]) && !empty($field[$key]), $value['title']) . $description;
示例12: call_user_func
echo $messages;
$post = call_user_func('Get::' . $segment[1] . 'Anchor', $page->post);
?>
<h3><?php
echo $page->name;
echo $post ? ' » <a href="' . $page->permalink . '" target="_blank">' . $post->title . '</a>' : "";
?>
</h3>
<?php
echo $page->message;
?>
<p><time class="text-fade" datetime="<?php
echo $page->date->W3C;
?>
"><?php
echo Jot::icon('clock-o') . ' ' . $page->date->FORMAT_3;
?>
</time></p>
<form class="form-kill form-<?php
echo $segment[0];
?>
" id="form-kill" action="<?php
echo $config->url_current . str_replace('&', '&', $config->url_query);
?>
" method="post">
<?php
Weapon::fire('action_before', $hooks);
?>
<?php
echo Jot::button('action', $speak->yes);
?>
示例13: str_replace
<?php
echo $messages;
?>
<h3><?php
echo $speak->shield . ': ' . $the_info['title'];
?>
</h3>
<?php
if (strpos($config->url_path, '/kill/file:') !== false) {
?>
<p><?php
echo Cell::strong($the_shield) . ' ' . Jot::icon('arrow-right') . ' ' . str_replace(DS, ' ' . Jot::icon('arrow-right') . ' ', $the_name);
?>
</p>
<pre><code><?php
echo Text::parse(File::open(SHIELD . DS . $the_shield . DS . $the_name)->read(), '->encoded_html');
?>
</code></pre>
<?php
} else {
if ($files) {
?>
<ul>
<?php
foreach ($files as $file) {
?>
<li><?php
echo $file->path;
?>
</li>
示例14: array
$count = 0;
$hooks = array($files, $segment);
echo $messages;
?>
<form class="form-repair form-shortcode" id="form-repair" action="<?php
echo $config->url_current;
?>
" method="post">
<?php
echo Form::hidden('token', $token);
?>
<table class="table-bordered table-full-width table-sortable">
<thead>
<tr>
<th class="th-icon"><?php
echo Jot::icon('sort');
?>
</th>
<th><?php
echo $speak->key;
?>
</th>
<th><?php
echo $speak->value;
?>
</th>
</tr>
</thead>
<tbody>
<?php
if ($files) {
示例15: filemtime
">
<?php
if ($c) {
?>
<div class="media-capture" style="background-image:url('<?php
echo File::url($c);
?>
?v=<?php
echo filemtime($c);
?>
');" role="image"></div>
<?php
}
?>
<h4 class="media-title"><?php
echo Jot::icon('shield') . ' ' . $info->title;
?>
</h4>
<div class="media-content">
<p><?php
echo Converter::curt($info->content);
?>
</p>
<p>
<?php
echo Jot::btn('construct.small:cog', $speak->manage, $config->manager->slug . '/shield/' . $folder);
?>
<?php
if (File::exist(SHIELD . DS . $folder . DS . 'manager.php')) {
echo Jot::btn('action.small:shield', $speak->attach, $config->manager->slug . '/shield/attach/id:' . $folder);
?>