コード例 #1
0
    public static function app()
    {
        if (!(self::$_instance instanceof self))
        {
            self::$_instance = new self();
            $root=dirname(__FILE__);
            $models=dirname(__FILE__).'/models';
            $base=dirname(__FILE__).'/base';
            $collections=dirname(__FILE__).'/collections';
            set_include_path(get_include_path() . PATH_SEPARATOR . $root);
            set_include_path(get_include_path() . PATH_SEPARATOR . $models);
            set_include_path(get_include_path() . PATH_SEPARATOR . $base);
            set_include_path(get_include_path() . PATH_SEPARATOR . $collections);
        }

        return self::$_instance;
    }
コード例 #2
0
<?php WpMvc::app()->view->render('header');?>
<div class="main-col span-15">
    <?php WpMvc::app()->view->render('loop',array('thePosts'=>$thePosts));?>
</div>
<div class="side-col push-1 span-8 last">
    <?php WpMvc::app()->view->render('widgets/widgetConnect');?>
    <?php WpMvc::app()->view->render('widgets/widgetMostCommented');?>
    <?php dynamic_sidebar('ContentRight');?>
</div>
<?php WpMvc::app()->view->render('footer');?>
コード例 #3
0
<?php
/*
Template Name: Blog
*/
$thePosts=TPost::findAll();
WpMvc::app()->view->render('blog',array('thePosts'=>$thePosts));

?>
コード例 #4
0
<?php

$thePosts=TPost::defaultPosts();
WpMvc::app()->view->render('search',array('thePosts'=>$thePosts));

?>
コード例 #5
0
<?php
$thePost=TPost::defaultPost();
$listPage=TPost::findAll(array('post_type'=>'page','post_status'=>'publish'));
WpMvc::app()->view->render('page',array('thePost'=>$thePost,'listPage'=>$listPage));

?>
コード例 #6
0
<?php
WpMvc::app()->view->render('404');
?>
コード例 #7
0
function viewcomment($comment, $args, $depth) {
    WpMvc::app()->view->render('comment', compact('comment', 'args', 'depth'));
}
コード例 #8
0
<div class="widget connect">
        <h3>Connect with us</h3>
        <div class="space">
            <a href="http://twitter.com/thinkrooms"> <img src="<?php echo WpMvc::app()->themeUrl;?>/images/icontwitter.png" alt="Twitter"/></a>
            <a href="<?php bloginfo('rss2_url'); ?>"> <img src="<?php echo WpMvc::app()->themeUrl;?>/images/iconrss.png" alt="RSS Feed"/></a>
            <a href="http://thinkrooms.tumblr.com"> <img src="<?php echo WpMvc::app()->themeUrl;?>/images/icontumblr.png" alt="Tumblr"/></a>
        </div>
        <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script><script type="text/javascript">FB.init("--your FB Token here---");</script><fb:fan profile_id="63194188085" stream="0" connections="10" logobar="1" width="300"></fb:fan><div style="font-size:8px; padding-left:10px"><a href="http://www.facebook.com/thinkrooms">thinkrooms</a> on Facebook</div>

    </div>
コード例 #9
0
<?php
$thePost=TPost::defaultPost();
$otherPosts=TPost::findAll(array('post_not_in'=>array($thePost->id)));
WpMvc::app()->view->render('single',array('thePost'=>$thePost,'otherPosts'=>$otherPosts));

?>
コード例 #10
0
<?php
$thePost=TPost::defaultPost();
WpMvc::app()->view->render('author',  compact('thePost'));
?>
コード例 #11
0
<?php
$memoList=TPost::findAll(array('posts_per_page'=>4));
WpMvc::app()->view->render('home',  array('memoList'=>$memoList));