本文整理汇总了PHP中do_textile函数的典型用法代码示例。如果您正苦于以下问题:PHP do_textile函数的具体用法?PHP do_textile怎么用?PHP do_textile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_textile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pp_content
function pp_content($project_id, $content)
{
$html = '';
foreach ($content as $page) {
$html .= "<h1>{$page['project_name']}</h1>";
$html .= "<h2>{$page['page_name']}</h2>";
$c = do_textile(pp_wiki_links($project_id, $page[page_name], $page['content']));
$html .= "<div class=content>{$c}</div>";
$html .= "<h3>{$page['created_on']} {$page['log_message']}</h3>";
}
return $html;
}
示例2: task_list_description
function task_list_description()
{
global $the_task_list;
if ($the_task_list->getDescription()) {
?>
<div class="desc">
<?php
echo do_textile($the_task_list->getDescription());
?>
</div>
<?php
}
}
示例3: wiki_replace_link_callback
/**
* Replaces wiki links in format [wiki:{PAGE_ID}] with a textile link to the page
*
* @param mixed $content
* @return
*/
function wiki_replace_link_callback($matches)
{
//print_r($matches);
if (count($matches) >= 2) {
if (is_numeric($matches[1])) {
$object_id = $matches[1];
$object = Wiki::instance()->findById($object_id);
if ($object instanceof WikiPage) {
if ($matches[2] == ',content') {
$revision = $object->getLatestRevision();
return do_textile(plugin_manager()->apply_filters('wiki_text', $revision->getContent()));
}
return '<a href="' . externalUrl($object->getViewUrl()) . '" title="' . lang('wiki page') . "({$object_id})" . '">' . $object->getObjectName() . '</a>';
}
}
}
return '<del>' . lang('invalid reference', $matches[0]) . '</del>';
}
示例4: lang
?>
<?php
echo lang('file revision title long', $revision->getDownloadUrl(), $revision->getRevisionNumber(), $revision->getCreatedBy()->getCardUrl(), $revision->getCreatedBy()->getDisplayName(), format_datetime($revision->getCreatedOn()));
} else {
?>
<?php
echo lang('file revision title short', $revision->getDownloadUrl(), $revision->getRevisionNumber(), format_datetime($revision->getCreatedOn()));
}
// if
?>
</div>
<?php
if (trim($revision->getComment())) {
?>
<div class="revisionComment"><?php
echo do_textile($revision->getComment());
?>
</div>
<?php
}
// if
$options = array();
if ($revision->canEdit(logged_user())) {
$options[] = '<a href="' . $revision->getEditUrl() . '">' . lang('edit') . '</a>';
}
if ($revision->canDelete(logged_user())) {
$options[] = '<a href="' . $revision->getDeleteUrl() . '">' . lang('delete') . '</a>';
}
if ($revision->canDownload(logged_user())) {
$options[] = '<a href="' . $revision->getDownloadUrl() . '" class="downloadLink">' . lang('download') . ' <span>(' . format_filesize($revision->getFileSize()) . ')</span></a>';
}
示例5: lang
} else {
?>
<span class="assignedTo"><?php
echo lang('anyone');
?>
</span>
<?php
}
// if
$taskDueDate = $assigned_task->getDueDate();
if (!is_null($taskDueDate)) {
echo ' | ' . lang('due date') . ': <strong>' . format_date($taskDueDate) . '</strong>';
}
?>
<?php
echo do_textile('[' . $assigned_task->getId() . '] ' . $assigned_task->getText());
if ($assigned_task->getTaskList() instanceof ProjectTaskList) {
?>
(<?php
echo lang('in');
?>
<a href="<?php
echo $assigned_task->getTaskList()->getViewUrl();
?>
"><?php
echo clean($assigned_task->getTaskList()->getName());
?>
</a>)
<div class="options">
<?php
if ($assigned_task->canEdit(logged_user())) {
示例6: foreach
?>
<div id="projectForms">
<?php
foreach ($forms as $form) {
?>
<div class="block">
<div class="header"><?php
echo clean($form->getName());
?>
</div>
<div class="content">
<?php
if (trim($form->getDescription())) {
?>
<div class="description"><?php
echo do_textile($form->getDescription());
?>
</div>
<?php
}
// if
?>
<div class="successMessage"><em><?php
echo lang('success message');
?>
:</em> <?php
echo clean($form->getSuccessMessage());
?>
</div>
<?php
示例7: trace
<?php
trace(__FILE__, 'begin');
/**
* @author Alex Mayhew
* @copyright 2008
*/
set_page_title(!$iscurrev ? lang('viewing revision of', $revision->getRevision(), $revision->getName()) : $revision->getName() . ' [' . $revision->getPageId() . ']');
project_tabbed_navigation();
project_crumbs(array(array(lang('wiki'), get_url('wiki')), array($revision->getName())));
if ($page->canAdd(logged_user(), active_project())) {
add_page_action(lang('add wiki page'), $page->getAddUrl());
}
// if
if ($page->canEdit(logged_user(), active_project()) && !$page->isNew()) {
add_page_action(lang('edit wiki page'), $page->getEditUrl());
add_page_action(lang('view page history'), $page->getViewHistoryUrl());
}
// if
if ($page->canDelete(logged_user(), active_project()) && !$page->isNew() && $iscurrev) {
add_page_action(lang('delete wiki page'), $page->getDeleteUrl());
}
add_page_action(lang('wiki public wiki'), externalUrl(ROOT_URL . '/' . PUBLIC_FOLDER . '/wiki'));
?>
<div id="wiki-page-content"><?php
echo do_textile(plugin_manager()->apply_filters('wiki_text', do_textile($revision->getContent())));
?>
</div>
示例8: lang
}
}
if ($task->canChangeStatus(logged_user())) {
if ($task->isOpen()) {
$options[] = '<a href="' . $task->getCompleteUrl() . '">' . lang('mark task as completed') . '</a>';
} else {
$options[] = '<a href="' . $task->getOpenUrl() . '">' . lang('open task') . '</a>';
}
// if
}
// if
?>
<div id="taskDetails" class="block">
<div class="header"><?php
echo do_textile('[' . $task->getId() . '] ' . $task->getText());
?>
</div>
<div class="content">
<div id="taskInfo">
<?php
if (!is_null($task->getStartDate())) {
if ($task->getStartDate()->getYear() > DateTimeValueLib::now()->getYear()) {
?>
<div class="startDate"><span><?php
echo lang('start date');
?>
:</span> <?php
echo format_date($task->getStartDate(), null, 0);
?>
@ <?php
示例9: do_textile
<?php
$content = $milestone->getDescription();
if (strlen($content) > 150) {
echo do_textile(substr($content, 0, 150));
?>
<a href="<?php
echo $milestone->getViewUrl();
?>
" title="<?php
echo lang('view milestone');
?>
"><?php
echo lang('read more');
?>
</a>
<?php
} else {
echo do_textile($content);
}
?>
</div>
</div>
<div class="clear"></div>
</div>
<?php
}
// if
}
// if
示例10: label_tag
<div id="wiki-field-name">
<?php
echo label_tag(lang('name'), 'wikiFormName', true);
echo text_field('wiki[name]', $revision->getName(), array('class' => 'long', 'id' => 'wikiFormName'));
?>
</div>
<div id="wiki-field-content">
<?php
echo label_tag(lang('wiki page content'), 'wikiFormContent', true);
echo textarea_field('wiki[content]', $data['content'], array('cols' => 132, 'class' => 'shot', 'id' => 'wikiFormContent'));
echo submit_button(lang('preview'), 'p', array('name' => 'wiki[preview]'));
echo label_tag(lang('preview'), 'wikiFormPreview', false);
?>
<div class="preview"><?php
echo do_textile(plugin_manager()->apply_filters('wiki_text', $data['preview_content']));
?>
</div>
</div>
<div id="wiki-field-log">
<?php
echo label_tag(lang('wiki log message'), 'wikiFormLog');
echo text_field('wiki[log_message]', $page->isNew() ? lang('wiki page created') : '', array('class' => 'long', 'id' => 'wikiFormLog'));
if (plugin_active('tags')) {
echo label_tag(lang('tags'), 'wikiFormTags');
echo text_field('wiki[tags]', $tags, array('class' => 'long', 'id' => 'wikiFormTags'));
}
?>
</div>
<div>
<?php
示例11: tpl_display
<form action="<?php echo $page->getAddUrl() ?>" method="POST">
<?php else: ?>
<form action="<?php echo $page->getEditUrl() ?>" method="POST">
<?php endif;?>
<?php tpl_display(get_template_path('form_errors')) ?>
<div id="wiki-field-name">
<?php echo label_tag(lang('name'), 'wikiFormName', true) ?>
<?php echo text_field('wiki[name]', $revision->getName(), array('class' => 'long', 'id' => 'wikiFormName')) ?>
</div>
<div id="wiki-field-content">
<?php echo label_tag(lang('wiki page content'), 'wikiFormContent', true) ?>
<?php echo textarea_field('wiki[content]', $data['content'], array('cols' => 132, 'class' => 'shot', 'id' => 'wikiFormContent')) ?>
<?php echo submit_button(lang('preview'), 'p', array( 'name' => 'wiki[preview]') ) ?>
<?php echo label_tag(lang('preview'), 'wikiFormPreview', false) ?>
<div class="preview"><?php echo do_textile(plugin_manager()->apply_filters('wiki_text', $data['preview_content'])); ?></div>
</div>
<div id="wiki-field-log">
<?php
echo label_tag(lang('wiki log message'), 'wikiFormLog');
echo text_field('wiki[log_message]', ($page->isNew() ? lang('wiki page created') : ''), array('class' => 'long', 'id' => 'wikiFormLog'));
?>
<?php
if (plugin_active('tags')) {
echo label_tag(lang('tags'), 'wikiFormTags');
echo text_field('wiki[tags]', $tags, array('class' => 'long', 'id' => 'wikiFormTags'));
}
?>
</div>
<div>
<?php echo label_tag(lang('parent page'), 'wikiFormParentId', true) ?>
示例12: lang
</td>
<?php
}
// if
?>
</tr>
</table>
<br />
<div>
<span class="bold"><?php
echo lang('description');
?>
:</span>
<div class="desc"><?php
echo do_textile($ticket->getDescription());
?>
</div>
</div>
</div>
<?php
if ($canEdit) {
?>
<?php
echo submit_button($ticket->isNew() ? lang('add ticket') : lang('save'));
}
// if
?>
</form>
<br />
示例13: lang
?>
</div>
<?php
} else {
?>
<div class="messageAuthor"><?php
echo lang('posted on', format_datetime($message->getCreatedOn()));
?>
</div>
<?php
}
// if
?>
<div class="messageText">
<?php
echo plugin_manager()->apply_filters('all_messages_message_text', do_textile($message->getText()));
?>
<p><a href="<?php
echo $message->getViewUrl();
?>
"><?php
echo lang('read more');
?>
</a></p>
</div>
<?php
echo render_object_files($message, $message->canEdit(logged_user()));
?>
<div class="messageCommentCount">
<?php
if ($message->countComments()) {
示例14: lang
echo lang('private comment');
?>
</span></div>
<?php
}
// if
?>
</td>
<td>
<?php
echo format_datetime($comment->getCreatedOn(), "m/d/Y, h:ia");
?>
</td>
<td>
<?php
echo plugin_manager()->apply_filters('comment_text', do_textile($comment->getText()));
?>
</td>
<td>
<a href="<?php
echo $comment->getCreatedBy()->getCardUrl();
?>
"><?php
echo clean($comment->getCreatedBy()->getDisplayName());
?>
</a>
</td>
</tr>
<?php
}
// foreach
示例15: lang
<?php
if ($object->isPrivate()) {
echo "<em>" . lang('private message') . "</em>";
}
// if
echo do_textile($object->getText());