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


PHP do_textile函数代码示例

本文整理汇总了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;
}
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:12,代码来源:wwww.php

示例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 
    }
}
开发者ID:bklein01,项目名称:Project-Pier,代码行数:13,代码来源:task_list.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>';
}
开发者ID:bklein01,项目名称:Project-Pier,代码行数:24,代码来源:wiki.php

示例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>';
        }
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:31,代码来源:file_details.php

示例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())) {
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:31,代码来源:my_tasks.php

示例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 
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:index.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>
开发者ID:bklein01,项目名称:Project-Pier,代码行数:29,代码来源:view.php

示例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 
开发者ID:federosky,项目名称:ProjectPier-Core,代码行数:31,代码来源:view_task.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
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:view_ProjectMilestones.php

示例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 
开发者ID:bklein01,项目名称:Project-Pier,代码行数:30,代码来源:edit.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) ?>
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:31,代码来源:edit.php

示例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 />
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:31,代码来源:edit_ticket.php

示例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()) {
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:view_message.php

示例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
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:object_statuses.php

示例15: lang

<?php

if ($object->isPrivate()) {
    echo "<em>" . lang('private message') . "</em>";
}
// if
echo do_textile($object->getText());
开发者ID:bklein01,项目名称:Project-Pier,代码行数:7,代码来源:render_message.php


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