回复 15楼 的帖子
要求:PHP5.X 版本InkType is developed using PHP 5.x and MySQL 5.x. 支持一下! 可以研究得说,支持。 1# Hex
好像没有中文语言包啊 看起来很棒嘛。顶一下支持一个! ci越做越强大。。 本帖最后由 benlan 于 2009-4-27 17:38 编辑
InkType代码实现的很优雅,看起来非常清晰,非常喜欢这个代码
请教一个问题:
主页的显示不是看的很明白
主页的blog类:
class Blog extends Controller {
...
function index() {
// this function is the default blog view - it will show all published blog posts
$uri = $this->uri->uri_to_assoc(3);
if (isset($uri['page']) && (IntVal($uri['page'])>0)) {
$this->page = IntVal($uri['page']);
}
else {
$this->page = 1;
}
$this->data['posts'] = $this->lib_posts->posts();
$this->lib_view->load_view('index', $this->data);
}
...
}
view应该是在 views\templates\default里的index.php
<!--BEGIN CONTENT-->
<div id="primary-content">
<?if ($posts) {?>
<?foreach ($posts as $post) {?>
<h2><?=inktype_post_title($post);?></h2>
<?=inktype_post_content($post);?>
<?=inktype_post_read_more($post);?>
<p><?=inktype_post_meta($post, $this->settings->allow_comments);?></p>
<?}?>
<?} else {?>
<h2>No results found</h2>
<p>There are currently no posts</p>
<?}?>
<p><?=$this->lib_paginate->nav;?></p>
</div>
<!--END CONTENT-->
看这个代码,只是把context显示出来,不知道上面的导航,右边的Search This Site Categories Blogroll Users
这几个项是代码哪里控制显示出来的,
刚学CI,哪个大侠帮忙看下代码 这里使用了 layout 了吧?在他的 lib_view 里肯定有相关的装载这些视图的代码。 29# Hex
老大能否帮忙看下代码,稍微花点时间,帮忙瞧瞧代码,稍微指点一下
这个代码我就这块没看明白,首页咋么展现的没看明白。
比较过几个ci diretory里面的代码,就觉得这个精致了,想看明白