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


PHP text_helper::slug方法代码示例

本文整理汇总了PHP中text_helper::slug方法的典型用法代码示例。如果您正苦于以下问题:PHP text_helper::slug方法的具体用法?PHP text_helper::slug怎么用?PHP text_helper::slug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在text_helper的用法示例。


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

示例1: array

				<li class="<?php 
        echo text_helper::alternate('odd', 'even');
        ?>
" id="row-picture-<?php 
        echo $picture['picture_id'];
        ?>
">

					<figure class="image classifieds-image">
						<div class="image thumbnail" style="background-image:url('<?php 
        echo storage_helper::getFileURL($picture['file_service_id'], $picture['file_path'], $picture['file_name'], $picture['file_ext'], 't', $picture['file_modify_date']);
        ?>
');">
							<?php 
        echo html_helper::anchor('classifieds/pictures/view/' . $picture['picture_id'] . '/' . text_helper::slug($picture['data_description'], 100), '<span class="name">' . $picture['data_description'] . '</span>', array('class' => 'image'));
        ?>
						</div>
					</figure>

				</li>

			<?php 
    }
    ?>

		</ul>

	<?php 
}
?>
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:index.php

示例2: edit

 public function edit()
 {
     // Is user logged in?
     if (!users_helper::isLoggedin()) {
         router::redirect('users/login');
     } elseif (!session::permission('albums_post', 'pictures')) {
         view::noAccess(session::item('slug'));
     }
     // Get URI vars
     $albumID = (int) uri::segment(4);
     // Did user reach the max albums limit?
     if (!$albumID && session::permission('albums_limit', 'pictures') && session::permission('albums_limit', 'pictures') <= session::item('total_albums')) {
         view::setError(__('album_limit_reached', 'pictures', array('%limit%' => session::permission('albums_limit', 'pictures'))));
         router::redirect('pictures/albums/manage');
     }
     // Get fields
     $fields = $this->fields_model->getFields('pictures', 1, 'edit', 'in_account');
     // Get album
     $album = array();
     if ($albumID && (!($album = $this->pictures_albums_model->getAlbum($albumID, $fields, array('escape' => false, 'parse' => false))) || $album['user_id'] != session::item('user_id'))) {
         view::setError(__('no_album', 'pictures'));
         router::redirect('pictures/albums/manage');
     }
     // Privacy options
     $privacy = array();
     // Do we need to add privacy field?
     if (config::item('album_privacy_view', 'pictures')) {
         $items = $this->users_model->getPrivacyOptions(session::item('privacy_profile', 'config'));
         $privacy[] = array('name' => __('privacy_album_view', 'pictures_privacy', array(), array(), false), 'keyword' => 'privacy', 'type' => 'select', 'items' => $items, 'privacy' => config::item('privacy_default', 'users'));
     }
     // Do we need to add enable comments field?
     if (config::item('picture_comments', 'pictures') && config::item('picture_privacy_comments', 'pictures')) {
         $items = $this->users_model->getPrivacyOptions(session::item('privacy_profile', 'config'), false);
         $items[0] = __('privacy_comments_disable', 'comments_privacy');
         $privacy[] = array('name' => __('privacy_comments_post', 'comments_privacy', array(), array(), false), 'keyword' => 'comments', 'type' => 'select', 'items' => $items, 'comments' => config::item('privacy_default', 'users'));
     }
     // Do we need to add search field?
     if (config::item('album_privacy_public', 'pictures')) {
         $privacy[] = array('name' => __('privacy_search', 'system', array(), array(), false), 'keyword' => 'public', 'type' => 'boolean');
     }
     // Assign vars
     view::assign(array('albumID' => $albumID, 'album' => $album, 'fields' => $fields, 'privacy' => $privacy));
     // Process form values
     if (input::post('do_save_album')) {
         $this->_saveAlbum($albumID, $album, $fields);
     }
     // Set title
     view::setTitle(__($albumID ? 'album_edit' : 'album_new', 'pictures'));
     // Set trail
     view::setTrail(session::item('slug'), __('my_profile', 'system_navigation'));
     view::setTrail('pictures/manage', __('pictures_albums', 'system_navigation'));
     if ($albumID && $album['total_pictures'] + $album['total_pictures_i'] > 0) {
         view::setTrail('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), __('album_view', 'pictures'), array('side' => true));
     }
     // Assign actions
     if ($albumID) {
         view::setAction('pictures/upload/' . $albumID, __('pictures_new', 'pictures'), array('class' => 'icon-text icon-pictures-new', 'data-role' => 'modal', 'data-title' => __('pictures_new', 'pictures')));
     }
     // Load view
     view::load('pictures/albums/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:61,代码来源:albums.php

示例3: array

        ?>
								<?php 
        echo html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), '<span class="name">' . $album['data_title'] . '</span>', array('class' => 'image'));
        ?>
								<div class="overlay element pictures">
									<?php 
        echo __('pictures_num' . ($album['total_pictures'] == 1 ? '_one' : ''), 'system_info', array('%pictures' => $album['total_pictures']));
        ?>
								</div>
							</div>
						</figure>

						<header class="item-header">
							<h2>
								<?php 
        echo html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), $album['data_title']);
        ?>
							</h2>
						</header>

						<div class="item-article">
							<?php 
        if ($album['data_description']) {
            ?>
								<?php 
            echo $album['data_description'];
            ?>
							<?php 
        }
        ?>
						</div>
开发者ID:soremi,项目名称:tutornavi,代码行数:31,代码来源:manage.php

示例4: array

        } else {
            ?>
								<div class="image thumbnail no_image">
							<?php 
        }
        ?>
								<?php 
        echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), '<span class="name">' . $ad['data_title'] . '</span>', array('class' => 'image'));
        ?>
							</div>
						</figure>

						<header class="item-header">
							<h2>
								<?php 
        echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), $ad['data_title']);
        ?>
							</h2>
						</header>

						<dl class="content-grid">
							<?php 
        if (isset($ad['data_price'])) {
            ?>
								<dt><?php 
            echo config::item('fields_classifieds', 'core', 'price');
            ?>
:</dt>
								<dd>
									<?php 
            echo money_helper::symbol(config::item('ad_currency', 'classifieds')) . $ad['data_price'];
开发者ID:soremi,项目名称:tutornavi,代码行数:31,代码来源:index.php

示例5: array

				<?php 
    }
    ?>

			</ul>

			<fieldset class="form">

				<div class="row actions">
					<?php 
    view::load('system/elements/button', array('value' => __('update', 'system')));
    ?>
				&nbsp;
				<?php 
    echo html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), __('cancel', 'system'));
    ?>
				</div>

			</fieldset>

		<?php 
    echo form_helper::closeForm(array('do_save_pictures' => 1));
    ?>

	<?php 
}
?>

</section>
开发者ID:soremi,项目名称:tutornavi,代码行数:29,代码来源:manage.php

示例6: foreach

		<ul class="unstyled item-list icon-list narrow arrow <?php 
    echo text_helper::alternate();
    ?>
">

			<?php 
    foreach ($blogs as $blog) {
        ?>

				<li class="<?php 
        echo text_helper::alternate('odd', 'even');
        ?>
 nowrap nooverflow" id="row-helper-blog-<?php 
        echo $blog['blog_id'];
        ?>
">
					<?php 
        echo html_helper::anchor('blogs/view/' . $blog['blog_id'] . '/' . text_helper::slug($blog['data_title'], 100), $blog['data_title'], array('title' => $blog['data_title']));
        ?>
				</li>

			<?php 
    }
    ?>

		</ul>

	</div>

<?php 
}
开发者ID:soremi,项目名称:tutornavi,代码行数:31,代码来源:blogs_list.php

示例7: array

				<?php 
    }
    ?>

			</ul>

			<fieldset class="form">

				<div class="row actions">
					<?php 
    view::load('system/elements/button', array('value' => __('update', 'system')));
    ?>
					&nbsp;
					<?php 
    echo html_helper::anchor('classifieds/pictures/index/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), __('cancel', 'system'));
    ?>
				</div>

			</fieldset>

		<?php 
    echo form_helper::closeForm(array('do_save_pictures' => 1));
    ?>

	<?php 
}
?>

</section>
开发者ID:soremi,项目名称:tutornavi,代码行数:29,代码来源:manage.php

示例8: edit

 public function edit()
 {
     // Is user logged in?
     if (!users_helper::isLoggedin()) {
         router::redirect('users/login');
     } elseif (!session::permission('blogs_post', 'blogs')) {
         view::noAccess(session::item('slug'));
     }
     // Get URI vars
     $blogID = (int) uri::segment(3);
     // Did user reach the max blogs limit?
     if (!$blogID && session::permission('blogs_limit', 'blogs') && session::permission('blogs_limit', 'blogs') <= session::item('total_blogs') + session::item('total_blogs_i')) {
         view::setError(__('blog_limit_reached', 'blogs', array('%limit%' => session::permission('blogs_limit', 'blogs'))));
         router::redirect('blogs/manage');
     }
     // Get blog fields
     $fields = $this->fields_model->getFields('blogs', 0, 'edit', 'in_account');
     // Get blog
     $blog = array();
     if ($blogID && (!($blog = $this->blogs_model->getBlog($blogID, $fields, array('escape' => false, 'parse' => false))) || $blog['user_id'] != session::item('user_id'))) {
         view::setError(__('no_blog', 'blogs'));
         router::redirect('blogs/manage');
     }
     // Privacy options
     $privacy = array();
     // Do we need to add privacy field?
     if (config::item('blog_privacy_view', 'blogs')) {
         $items = $this->users_model->getPrivacyOptions(session::item('privacy_profile', 'config'));
         $privacy[] = array('name' => __('privacy_blog_view', 'blogs_privacy', array(), array(), false), 'keyword' => 'privacy', 'type' => 'select', 'items' => $items, 'privacy' => config::item('privacy_default', 'users'));
     }
     // Do we need to add enable comments field?
     if (config::item('blog_comments', 'blogs') && config::item('blog_privacy_comments', 'blogs')) {
         $items = $this->users_model->getPrivacyOptions(session::item('privacy_profile', 'config'), false);
         $items[0] = __('privacy_comments_disable', 'comments_privacy');
         $privacy[] = array('name' => __('privacy_comments_post', 'comments_privacy', array(), array(), false), 'keyword' => 'comments', 'type' => 'select', 'items' => $items, 'comments' => config::item('privacy_default', 'users'));
     }
     // Do we need to add search field?
     if (config::item('blog_privacy_public', 'blogs')) {
         $privacy[] = array('name' => __('privacy_search', 'system', array(), array(), false), 'keyword' => 'public', 'type' => 'boolean');
     }
     // Assign vars
     view::assign(array('blogID' => $blogID, 'blog' => $blog, 'fields' => $fields, 'privacy' => $privacy));
     // Process form values
     if (input::post('do_save_blog')) {
         $this->_saveBlog($blogID, $blog, $fields);
     }
     // Set title
     view::setTitle(__($blogID ? 'blog_edit' : 'blog_new', 'blogs'));
     // Set trail
     view::setTrail(session::item('slug'), __('my_profile', 'system_navigation'));
     view::setTrail('blogs/manage', __('blogs', 'system_navigation'));
     if ($blogID) {
         view::setTrail('blogs/view/' . $blog['blog_id'] . '/' . text_helper::slug($blog['data_title'], 100), __('blog_view', 'blogs'), array('side' => true));
     }
     // Load view
     view::load('blogs/edit');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:57,代码来源:blogs.php

示例9:

        ?>

				<li class="clearfix <?php 
        echo text_helper::alternate('odd', 'even');
        ?>
" id="row-news-<?php 
        echo $entry['news_id'];
        ?>
">

					<article class="item">

						<header class="item-header">
							<h2>
								<?php 
        echo html_helper::anchor((config::item('news_blog', 'news') ? 'blog' : 'news') . '/view/' . $entry['news_id'] . '/' . text_helper::slug($entry['data_title'], 100), $entry['data_title']);
        ?>
							</h2>
						</header>

						<div class="item-article">
							<?php 
        echo text_helper::truncate($entry['data_body'], config::item('news_preview_chars', 'news'));
        ?>
						</div>

						<footer class="item-footer">

							<ul class="unstyled content-meta clearfix">
								<li class="date">
									<?php 
开发者ID:soremi,项目名称:tutornavi,代码行数:31,代码来源:index.php

示例10: isset

					<article class="item">

						<header class="item-header">
							<h3>
								<?php 
        echo html_helper::anchor('news/view/' . $entry['news_id'] . '/' . text_helper::slug($entry['data_title'], 100), $entry['data_title']);
        ?>
							</h3>
						</header>

						<div class="item-article">
							<?php 
        echo text_helper::truncate($entry['data_body'], isset($params['truncate']) && $params['truncate'] ? $params['truncate'] : config::item('news_preview_chars', 'news'));
        ?>
							<?php 
        echo html_helper::anchor('news/view/' . $entry['news_id'] . '/' . text_helper::slug($entry['data_title'], 100), '&raquo;');
        ?>
						</div>

					</article>

				</li>

			<?php 
    }
    ?>

		</ul>

	</div>
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:news.php

示例11: array

	</div>

	<div class="target-article media">
		<div class="target-header">
			<?php 
echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), $ad['data_title']);
?>
 - <?php 
echo money_helper::symbol(config::item('ad_currency', 'classifieds')) . $ad['data_price'];
?>
		</div>
		<?php 
if ($ad['file_service_id'] && $ad['total_pictures']) {
    ?>
			<figure class="image classifieds-image">
				<div class="image thumbnail" style="background-image:url('<?php 
    echo storage_helper::getFileURL($ad['file_service_id'], $ad['file_path'], $ad['file_name'], $ad['file_ext'], 't', $ad['file_modify_date']);
    ?>
');">
					<?php 
    echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), '<span class="name">' . $ad['data_title'] . '</span>', array('class' => 'image'));
    ?>
				</div>
			</figure>
		<?php 
}
?>
	</div>

</div>
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:classified.php

示例12: isset

						</figure>

						<header class="item-header">
							<h3>
								<?php 
        echo html_helper::anchor('blogs/view/' . $blog['blog_id'] . '/' . text_helper::slug($blog['data_title'], 100), $blog['data_title']);
        ?>
							</h3>
						</header>

						<div class="item-article">
							<?php 
        echo text_helper::truncate($blog['data_body'], isset($params['truncate']) && $params['truncate'] ? $params['truncate'] : config::item('blogs_preview_chars', 'blogs'));
        ?>
							<?php 
        echo html_helper::anchor('blogs/view/' . $blog['blog_id'] . '/' . text_helper::slug($blog['data_title'], 100), '&raquo;');
        ?>
						</div>

					</article>

				</li>

			<?php 
    }
    ?>

		</ul>

	</div>
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:blogs.php

示例13: __

					</div>

				<?php 
    }
    ?>

			<?php 
}
?>

			<div class="row actions">
				<?php 
view::load('system/elements/button');
?>
				&nbsp;
				<?php 
echo html_helper::anchor('pictures/view/' . $picture['picture_id'] . '/' . text_helper::slug($picture['data_description'], 100), __('cancel', 'system'));
?>
			</div>

		</fieldset>

	<?php 
echo form_helper::closeForm(array('do_save_picture' => 1));
?>

</section>

<?php 
view::load('footer');
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:edit.php

示例14: delete

 public function delete()
 {
     // Is user loggedin ?
     if (!users_helper::isLoggedin()) {
         router::redirect('users/login');
     } elseif (!session::permission('pictures_post', 'classifieds')) {
         view::noAccess(session::item('slug'));
     }
     // Get URI vars
     $adID = (int) uri::segment(4);
     $pictureID = (int) uri::segment(5);
     // Get album
     if (!$adID || !($ad = $this->classifieds_model->getAd($adID, 'in_view')) || $ad['user_id'] != session::item('user_id')) {
         view::setError(__('no_ad', 'classifieds'));
         router::redirect('classifieds');
     }
     // Get picture
     if (!$pictureID || !($picture = $this->classifieds_pictures_model->getPicture($pictureID)) || $picture['ad_id'] != $adID) {
         view::setError(__('no_picture', 'classifieds'));
         router::redirect('classifieds/pictures/index/' . $adID . '/' . text_helper::slug($ad['data_title'], 100));
     }
     // Delete picture
     $this->classifieds_pictures_model->deletePicture($pictureID, $adID, session::item('user_id'), $picture, $ad);
     // Process query string
     $qstring = $this->parseQuerystring(config::item('pictures_per_page', 'classifieds'));
     // Success
     view::setInfo(__('picture_deleted', 'classifieds'));
     router::redirect('classifieds/pictures/index/' . $adID . '/' . text_helper::slug($ad['data_title'], 100) . '?' . $qstring['url'] . 'page=' . $qstring['page']);
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:29,代码来源:pictures.php


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