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


PHP converttext函数代码示例

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


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

示例1: render_title

 function render_title($source)
 {
     if (!($title = $source->getName())) {
         return false;
     }
     return $this->_renderer->p($this->_renderer->link($source->getURL(), converttext($title)), array('class' => $this->_css_class_title));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:Blog.php

示例2: _HTML_blurb

 function _HTML_blurb($blurb)
 {
     if (!$blurb) {
         return false;
     }
     return $this->_HTML_in_P(converttext($blurb), array('class' => $this->_css_class_text));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:SetDisplay.inc.php

示例3: _HTML_contact

 function _HTML_contact($contact)
 {
     if (!$contact) {
         return false;
     }
     return '<table border="0" cellpadding="0" cellspacing="0"><tr>' . $this->_HTML_inTD($this->_HTML_inSpan('Contact:&nbsp;', $this->_css_class_label), array('valign' => 'top')) . $this->_HTML_inTD('&nbsp;', array('valign' => 'top')) . $this->_HTML_inTD($this->_HTML_inSpan(converttext($contact), $this->_css_class_subheading) . $this->_HTML_newline(), array('valign' => 'top')) . $this->_HTML_endTable();
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:PressRelease.inc.php

示例4: _HTML_subTitle

 function _HTML_subTitle($subtitle)
 {
     if (!$subtitle) {
         return false;
     }
     return $this->_HTML_inSpan(converttext($subtitle), $this->_css_class_subtitle) . $this->_HTML_newline(2);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:News.inc.php

示例5: setPayable

 function setPayable($payable = null)
 {
     if (!isset($payable) || !$payable) {
         return false;
     }
     $this->payment->fields['Payable_To']['enabled'] = true;
     $this->payment->fields['Payable_To']['default'] = converttext($payable);
 }
开发者ID:radicalsuz,项目名称:amp,代码行数:8,代码来源:Check.inc.php

示例6: render_title

 function render_title()
 {
     $renderer = AMP_get_renderer();
     if ($this->use_title_links) {
         return $renderer->in_P($renderer->link($this->_article->getURL(), converttext($this->_article->getName())), array('class' => $this->_css_class_title));
     }
     return $this->_HTML_title($this->_article->getTitle());
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:8,代码来源:Blog.inc.php

示例7: render_comments

 function render_comments($source)
 {
     if (!($item = $source->getComments())) {
         return false;
     }
     $comments_header = $this->_renderer->td($this->_renderer->strong(ucwords(AMP_TEXT_OTHER_COMMENTS)), array('class' => 'board', 'colspan' => 5));
     $comments_data = $this->_renderer->td(converttext($item), array('class' => 'board', 'colspan' => 5));
     return $this->_renderer->tr($comments_header, array('class' => 'board')) . $this->_renderer->tr($comments_data);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:9,代码来源:List.php

示例8: render_body

 function render_body($source)
 {
     if (!($body = $source->getBody())) {
         return false;
     }
     $body = $source->isHtml() ? $body : converttext($body);
     //hot words
     if ($hw = AMP_lookup('hotwords')) {
         $body = str_replace(array_keys($hw), array_values($hw), $body);
     }
     return $this->_renderer->p(eval_includes($body), array('class' => $this->_css_class_body));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:12,代码来源:Page.php

示例9: render_author

 function render_author($source)
 {
     $author = $source->getAuthor();
     $author_url = $source->getAuthorURL();
     if (!AMP_validate_url($author_url)) {
         $author_url = false;
     }
     if (!trim($author)) {
         $author = 'a stranger';
     }
     return $this->_renderer->link($author_url, converttext($author), array('class' => AMP_CONTENT_CSS_CLASS_ARTICLE_AUTHOR));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:12,代码来源:List.php

示例10: list_header_intro

function list_header_intro($list_name = NULL, $description = NULL, $date = NULL)
{
    echo "<p class=title>" . $list_name . "</p>";
    if ($_GET["nointro"] == NULL) {
        if ($description != NULL && $description) {
            echo "<p class=text>" . converttext($description) . '</p>';
        }
        if ($date != "00-00-0000" && isset($date)) {
            echo "<p class=text>" . DoDate($date, 'F j, Y') . "<br>" . '</p>';
        }
    }
}
开发者ID:radicalsuz,项目名称:amp,代码行数:12,代码来源:list.inc.php

示例11: renderItem

 function renderItem(&$source)
 {
     $base_description = $this->_renderer->inSpan($source->getName(), array('class' => $this->_css_class_title)) . $this->_renderer->newline() . $this->_renderer->inSpan(DoDate($source->getItemDate(), 'l, F jS Y') . ($source->getItemDate() ? $this->_renderer->space(2) : '') . $source->getData('time') . $this->_renderer->newline() . $source->getShortLocation(), array('class' => $this->_css_class_details));
     $blurb = ($description = $source->getBody()) ? $description : $source->getBlurb();
     if ($blurb) {
         $blurb = $this->_renderer->inSpan(converttext($blurb), array('class' => $this->_css_class_blurb));
     }
     $location = array();
     $location_segments = array('location', 'laddress', 'lcity', 'lzip');
     foreach ($location_segments as $location_data) {
         $location_value = $source->getData($location_data);
         if (!$location_value) {
             continue;
         }
         $location[$location_data] = $location_value;
     }
     $location['lcity'] = $source->getShortLocation();
     $location_description = isset($location['location']) ? join($this->_renderer->newline(), $location) : "";
     if ($location_description) {
         $location_description = $this->_renderer->bold(AMP_TEXT_LOCATION . ':') . $this->_renderer->newline() . $location_description;
     }
     $contact_output = '';
     $contact_name = $source->getData('contact1');
     $contact_email = $source->getData('email1');
     $contact_phone = $source->getData('phone1');
     if ($contact_name) {
         $contact_output .= $this->_renderer->newline() . $contact_name;
     }
     if ($contact_email) {
         $rendered_contact_email = AMP_protect_email($contact_email);
         $contact_output .= $this->_renderer->newline() . $rendered_contact_email;
     }
     if ($contact_phone) {
         $contact_output .= $this->_renderer->newline() . $contact_phone;
     }
     if ($contact_output) {
         $contact_output = $this->_renderer->bold(AMP_TEXT_CONTACT . ':') . $this->_renderer->newline() . $contact_output;
     }
     $sponsor_output = '';
     if ($sponsor = $source->getData('org')) {
         $sponsor_output = $this->_renderer->bold(AMP_TEXT_SPONSORED . ':') . $this->_renderer->newline() . $sponsor;
     }
     $output_segments = array('base_description', 'blurb', 'location_description', 'contact_output', 'sponsor_output');
     foreach ($output_segments as $block_name) {
         if (!${$block_name}) {
             continue;
         }
         $output_value[$block_name] = ${$block_name};
     }
     return join($this->_renderer->newline(2), $output_value);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:51,代码来源:Display.php

示例12: _HTML_title

 function _HTML_title()
 {
     $title_html = "";
     if ($text = $this->nav->getTitle()) {
         $title_html = converttext($text);
     }
     if ($image_name = $this->nav->getTitleImage()) {
         $imgpath = $this->_template->getNavImagePath();
         if (strpos($image_name, $imgpath) === FALSE) {
             $image_name = $imgpath . $image_name;
         }
         $title_html = "<img src=\"" . $image_name . "\">";
     }
     return $this->_templateTitle($title_html);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:15,代码来源:Display.inc.php

示例13: display_comment

function display_comment($id)
{
    global $dbcon;
    $R = $dbcon->CacheExecute("SELECT * FROM comments WHERE publish=1 and articleid = {$id} order by date desc") or die($dbcon->ErrorMsg());
    echo '<br><p><a href="comment.php?cid=' . $id . '">add a comment</a></p>';
    while (!$R->EOF) {
        echo "<hr><p><b>" . $R->Fields("title") . "</b><br>";
        echo '<i>by  ';
        if ($R->Fields("email")) {
            echo '<a href="mailto: ' . $R->Fields("email") . '">';
        }
        echo $R->Fields("author");
        echo '</a>,  ' . DoDateTime($R->Fields("date"), "l, M j, Y g:iA") . '</i></p>';
        echo '<p>' . converttext($R->Fields("comment")) . '</p>';
        $R->MoveNext();
    }
}
开发者ID:radicalsuz,项目名称:amp,代码行数:17,代码来源:comments.inc.php

示例14: _renderItem

 function _renderItem(&$source)
 {
     $caption = $this->_renderer->p(converttext($source->getCaption()), array('class' => $this->_css_class_photocaption));
     $imageRef =& $source->getImageRef();
     if (!$imageRef) {
         return false;
     }
     $this->_image_count++;
     $image_height = $imageRef->height;
     $this->_height_total += $image_height;
     $this->_height_avg = $this->_height_total / $this->_image_count;
     if ($this->_height_max < $image_height && !($image_height > $this->_height_avg * 2)) {
         $this->_height_max = $image_height;
     }
     $image = $this->_renderer->link(AMP_image_url($imageRef->getName(), AMP_IMAGE_CLASS_ORIGINAL, array('height' => $image_height > 600 ? 600 : 0)), $this->_renderer->image($imageRef->getURL(), array()), array('alt' => AMP_TEXT_FULL_SIZE, 'border' => 0, 'rel' => 'lightbox[' . $this->_source_gallery->getName() . ']', 'title' => $this->render_photo_byline($source), 'target' => '_blank'));
     $image_byline = $this->render_byline($source, $imageRef);
     return $image . $image_byline . $caption;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:18,代码来源:Display.php

示例15: _HTML_listItemSource

 function _HTML_listItemSource($author, $source, $url)
 {
     if (!(trim($author) || $source || $url)) {
         return false;
     }
     $output_author = FALSE;
     $output_source = FALSE;
     if (trim($author)) {
         $output_author = $this->_HTML_inSpan('by&nbsp;' . converttext($author), $this->_css_class_author);
         if (!$source) {
             return $output_author . $this->_HTML_newline();
         }
     }
     if ($source) {
         $output_source = $this->_HTML_inSpan($this->_HTML_link($url, $source), $this->_css_class_source);
     }
     if ($output_author && $output_source) {
         return $output_author . ',&nbsp;' . $output_source . $this->_HTML_newline();
     }
     return $output_source . $this->_HTML_newline();
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:21,代码来源:SetDisplay.inc.php


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