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


PHP auto_typography函数代码示例

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


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

示例1: dir2array

/**
 * This function takes a directory and maps its content
 * out into an Array. An easier form of doing a CMS
 * without needing to build big tools.
 */
function dir2array($directory, $map = null)
{
    $CI =& get_instance();
    $CI->load->helpers(array('directory', 'file', 'url', 'typography'));
    if (!$map || !is_array($map)) {
        $map = directory_map($directory);
    }
    $text_extensions = array('txt');
    $html_extensions = array('htm', 'html');
    $url_extensions = array('url');
    $data = array();
    foreach ($map as $key => $item) {
        // respect numeric order, 11 should not be in front of 2
        $key_split = explode("--", $key);
        $skey = $key;
        // recurse
        if (is_array($item)) {
            if (count($key_split) > 1) {
                if (is_numeric($key_split[0])) {
                    $skey = $key_split[0];
                }
            }
            $data[$skey] = dir2array($directory . '/' . $key, $item);
            // parse
        } else {
            $info = pathinfo($item);
            $ext = $info['extension'];
            $name = $info['filename'];
            if (in_array($ext, $text_extensions) || in_array($ext, $html_extensions)) {
                $text = read_file($directory . '/' . $item);
                if (in_array($ext, $text_extensions)) {
                    $text = auto_typography($text);
                }
                $data[$name] = $text;
            } else {
                if (in_array($ext, $url_extensions)) {
                    $url = explode("\n", $project['link']);
                    if (count($url) > 1) {
                        $data[$name] = array('text' => $url[0], 'url' => $url[1]);
                    } else {
                        $data[$name] = array('url' => $url[0]);
                    }
                } else {
                    $data[$info['filename']] = base_url($directory . '/' . $item);
                }
            }
        }
    }
    ksort($data);
    return $data;
}
开发者ID:Tunisia-Dev,项目名称:CodeIgniter-Sunrise,代码行数:56,代码来源:MY_directory_helper.php

示例2: get_excerpt_formatted

 function get_excerpt_formatted($char_limit = NULL, $readmore = '')
 {
     $this->_CI->load->helper('typography');
     $this->_CI->load->helper('text');
     $excerpt = $this->content;
     if (!empty($char_limit)) {
         // must strip tags to get accruate character count
         $excerpt = strip_tags($excerpt);
         $excerpt = character_limiter($excerpt, $char_limit);
     }
     $excerpt = auto_typography($excerpt);
     $excerpt = $this->_parse($excerpt);
     if (!empty($readmore)) {
         $attrs = array('class' => 'readmore');
         if ($this->type == 'news') {
             $attrs['target'] = '_blank';
         }
         $excerpt .= ' ' . anchor($this->get_url(), $readmore, $attrs);
     }
     return $excerpt;
 }
开发者ID:ressphere,项目名称:cb_iloveproperty,代码行数:21,代码来源:news_model.php

示例3: viewFile

 public function viewFile($file_root)
 {
     $this->load->helper('file');
     $this->load->helper('typography');
     $file = $file_root . $this->input->get('path');
     $string = read_file($file);
     echo $string = '<div style="font-size: 12px; line-height: 18px; padding: 0 10px;">' . auto_typography($string) . '</div>';
 }
开发者ID:rockylo,项目名称:webmis,代码行数:8,代码来源:Sys_filemanager.php

示例4: if

  	<?php if (isset($posts) && is_array($posts)) :?>
        <?php foreach ($posts as $post) : ?>     
        <div class="post">
            <h2><?php e($post->title) ?></h2>

            <?php echo auto_typography($post->body) ?>
        </div>
        <?php endforeach; ?>

    <?php else : ?>
        <div class="alert alert-info">
            No Posts were found.
        </div>
    <?php endif; ?>
开发者ID:BinaryGeometry,项目名称:jquery-scrapbook,代码行数:14,代码来源:index.php

示例5: auto_typography

									
									
									<div id="sub_hold_field_<?php 
        echo $field_list[$_n]['field_id'];
        ?>
" <?php 
        echo $layout_styles[$_n]['collapse'] ? 'class="js_hide"' : '';
        ?>
>
										
										<?php 
        if ($field_list[$_n]['field_instructions'] != '') {
            ?>
											<div class="instruction_text">
												<?php 
            echo auto_typography('<strong>' . $this->lang->line('instructions') . '</strong>' . NBS . $field_list[$_n]['field_instructions']);
            ?>
											</div>
										<?php 
        }
        ?>
										
										<fieldset class="holder">
											<?php 
        echo isset($field_list[$_n]['string_override']) ? $field_list[$_n]['string_override'] : $field_output[$_n];
        ?>
											<?php 
        echo form_error($_n);
        ?>
										</fieldset>
										
开发者ID:kentonquatman,项目名称:iofa,代码行数:28,代码来源:publish.php

示例6: auto_typography

</p>
	<?php 
}
?>

	<p><?php 
echo auto_typography($row->invoice_note);
?>
</p>

	<?php 
if ($this->config->item('show_client_notes') === TRUE) {
    ?>
	<p>
		<?php 
    echo auto_typography($client_note);
    ?>
	</p>
	<?php 
}
?>

	<div id="footer">
		<?php 
if ($this->settings_model->get_setting('display_branding') == 'y') {
    ?>
			<p>
				<?php 
    echo $this->lang->line('invoice_generated_by');
    ?>
 
开发者ID:skarcha,项目名称:BambooInvoice,代码行数:30,代码来源:pdf.php

示例7: foreach

<h1 class="page-heading">Client Testimonials</h1>
<p class="page-opener">See what customers say about Mark!</p>

<div class="reviews">
<?php 
foreach ($reviews->result() as $review) {
    // review goes here
    echo '<div class="testimonial">';
    echo auto_typography($review->review);
    echo '<p class="from">-- ' . $review->name . '</p>';
    echo '</div>';
    echo '<hr>';
}
?>
</div>
开发者ID:sitesbyjoe,项目名称:cmsbyjoe,代码行数:15,代码来源:reviews.php

示例8: auto_typography

                                        <a href="#">
                                            <?php 
$a = $this->announce->latest();
$this->db->where('id', $a['user']);
$r = $this->db->get('users')->row_array();
?>
                                            <img class="media-object" style="max-width:120px;" src="/assets/uploads/<?php 
echo $r['pic'];
?>
" alt="...">
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <h4 class="media-heading">Announcement</h4>
                                    <?php 
echo auto_typography($a['message']);
?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <br>
                        <a href="/view_prev" class="btn btn-primary btn-sm pull-right">View Previous Announcement</a>
                        <span class="clearfix"></span>
                        <br>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php 
开发者ID:Jheysoon,项目名称:TADPS,代码行数:31,代码来源:post.php

示例9: exit

<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed.');
}
if ($section->num_rows() > 0) {
    echo '<h1>' . $section->row()->name . '</h1>';
}
foreach ($pages->result() as $page) {
    echo '<hr>';
    echo '<h2>' . anchor('pages/' . $page->slug, $page->title) . '</h2>';
    echo auto_typography($page->description);
}
/* End of File: section_pages.php */
/* Location: ./application/views/public/pages/section_pages.php */
开发者ID:sitesbyjoe,项目名称:cmsbyjoe,代码行数:15,代码来源:section_pages.php

示例10: parse_template_syntax

<?php

$preview_body = parse_template_syntax(auto_typography($body));
// $vars['body'] = '<div class="preview_body">'.markdown(strip_javascript($preview_body)).'</div>';
$vars['body'] = '<div class="preview_body">' . $preview_body . '</div>';
$this->load->view('_layouts/main', $vars);
//echo $preview_body;
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:7,代码来源:_fuel_preview.php

示例11: foreach

$this->load->helper('typography');
?>

<?php 
if ($images) {
    ?>
	<?php 
    foreach ($images as $image) {
        echo '<div style="float:left; margin:0 20px 0 0"><a href="' . base_url() . 'assets/img/products/' . $image->filename . '" 
		title="' . $product->title . '" rel="modal">' . image('products/' . substr($image->filename, 0, -4) . '_thumb' . substr($image->filename, -4)) . '</a></div>';
        ?>
	<?php 
    }
}
?>

<h2><?php 
echo $product->title;
?>
</h2>
<strong><?php 
echo lang('products_price_label');
?>
: <?php 
echo sprintf(lang('products_price_format'), $this->settings->item('currency'), $product->price);
?>
</strong>
<p><?php 
echo auto_typography($product->description);
?>
</p>
开发者ID:nhockiki,项目名称:pyrocms,代码行数:31,代码来源:view.php

示例12: anchor

</h2>
        <h4>Location: <?php 
echo $Treasure->location;
?>
</h4>
        <h4>Hash: <?php 
echo $Treasure->md5;
?>
</h4>
        <h4>URL: <?php 
echo anchor('treasure/find/' . $Treasure->md5);
?>
</h4>
        <hr>
        <?php 
echo auto_typography($Treasure->text);
?>
    </div>
    <div class="span2"></div>
</div>

<script type="text/javascript">
    var form = $('form');
    $('form').submit(function(event){
        $('div.input').each(function (){ 
            $(form).append('<input type="hidden" name="' + $(this).attr('name') + '" value="' + $(this).html() + '">');
        });
    });
    
    $('.span2').html('<img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=<?php 
echo site_url('treasure/find/' . $Treasure->md5);
开发者ID:robertmain,项目名称:Treasure-Hunt,代码行数:31,代码来源:view.php

示例13: auto_typography

            ?>
</p><p><?php 
            echo auto_typography(html_entity_decode(str_replace('\\n', "\n", $row->email_body)));
            ?>
</p></div>
						<?php 
        } else {
            ?>
						<div class="comment"><p class="commentintro"><?php 
            echo $this->lang->line('invoice_sent_to');
            ?>
 <?php 
            echo implode(", ", unserialize($row->clientcontacts_id));
            ?>
</p><?php 
            echo auto_typography(str_replace('\\n', "\n", $row->email_body));
            ?>
</p></div>
					<?php 
        }
        ?>

				</div>
		<?php 
    }
}
// ends if ($invoiceHistory->num_rows() ==0)
?>

		<h4><?php 
echo $this->lang->line('invoice_payment_history');
开发者ID:jfoucher,项目名称:BambooInvoice,代码行数:31,代码来源:estimate.php

示例14: format

 private function format($str)
 {
     $this->load->helper('smiley');
     $this->load->helper('typography');
     return str_replace("\n", "", auto_typography(parse_smileys($str, asset_url('smileys/'))));
 }
开发者ID:n-bailly,项目名称:MyBlog,代码行数:6,代码来源:home.php

示例15: if

	<?php if ($lead['notes_list'] != null && count($lead['notes_list']) > 0) : ?>
	<h5>Notes and Updates</h5>
	<table>
		<thead>
			<tr>
				<td>Date</td>
				<td>Created By</td>
				<td>Note</td>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($lead['notes_list'] as $note) : ?>
			<tr>
				<td><?=date_user(strtotime($note['event']->timestamp))?></td>
				<td><?=profile_link($note['event']->pid)?></td>
				<td><?=auto_typography(auto_link($note['note'],'url'))?></td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<?php endif; ?>
	
</div>
<hr/>
<?php endforeach; ?>

<script type="text/javascript">
	$(function() {
		$('#btn_addLead').click( function () {
			$('#form_addLead').slideDown();
			$('#buttonBar').slideUp();
开发者ID:G-LAB,项目名称:glab-cms,代码行数:31,代码来源:sales_lead.php


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