Esempio n. 1
0
?>
<div class="widget widget-info">
<div class="widget-header">
	<h3 class="widget-title"><?php 
echo $titleBox;
?>
</h3>
	<div class="widget-tools pull-right"><a href="<?php 
echo base_url(routeGet('events', 'route_key'));
?>
">+ indexs</a></div>
</div>
<div class="widget-body">
<?php 
$para = array('post_type' => 'event');
$g = mc_allpost($para, "post_date DESC", "5");
if ($g['jumlah'] > 0) {
    foreach ($g['data'] as $r) {
        $tgl = "";
        $jam = "";
        $tglEvent = postTaxonomy($r->post_id, 'tanggal_event');
        $jamEvent = postTaxonomy($r->post_id, 'jam_event');
        if (!empty($tglEvent)) {
            $tgl = $tglEvent;
        } else {
            $tgl = "";
        }
        if (!empty($jamEvent)) {
            $jam = $jamEvent;
        } else {
            $jam = "";
Esempio n. 2
0
<section class="homepage">
<div class="row">
<div class="col-md-8">
	<div class="homepage-left">
		<div class="slide">
		<div id="carousel-slide" class="carousel slide" data-ride="carousel">
		<div class="carousel-inner">
		<?php 
$param = array('post_type' => 'post');
$dPost = mc_allpost($param, "post_date DESC", "", 5);
$iSlide = 0;
if ($dPost['jumlah'] > 0) {
    foreach ($dPost['data'] as $rPost) {
        $iSlide += 1;
        $postId = $rPost->post_id;
        $postTitle = $rPost->post_title;
        $postImage = mc_imagepost($postId);
        $postLink = permalinkPost($postId);
        if ($iSlide == 1) {
            ?>
					<div class="item active">
				      <img src="<?php 
            echo $postImage;
            ?>
" alt="<?php 
            echo $postTitle;
            ?>
">
				      <div class="carousel-caption">
				        <a href="<?php 
            echo $postLink;
Esempio n. 3
0
<section class="blog">
<div class="row">
<div class="col-md-8">
	<div class="blog-left">
	<?php 
$param = $data;
$dPost = mc_allpost($param, 'post_date DESC', '', 1);
if ($dPost['jumlah'] > 0) {
    foreach ($dPost['data'] as $rPost) {
    }
    $postID = $rPost->post_id;
    $postTitle = $rPost->post_title;
    $postContent = $rPost->post_content;
}
?>
	<h3><?php 
echo $postTitle;
?>
</h3><hr/>
	<p><?php 
echo $postContent;
?>
</p>
	<?php 
echo mc_commentPost($postID);
?>
	</div>
</div>
<div class="col-md-4">
	<div class="blog-right">
		<?php 
Esempio n. 4
0
?>
<div class="widget widget-info">
<div class="widget-header">
	<h3 class="widget-title"><?php 
echo $titleBox;
?>
</h3>
	<div class="widget-tools pull-right"><a href="<?php 
echo base_url(routeGet('postall', 'route_key'));
?>
">+ indexs</a></div>
</div>
<div class="widget-body">
<?php 
$para = array('post_type' => 'post');
$g = mc_allpost($para, "post_date DESC", "", $limit);
if ($g['jumlah'] > 0) {
    foreach ($g['data'] as $row) {
        $postid = $row->post_id;
        $url = permalinkPost($postid);
        $img = mc_imagepost($postid);
        $title = stringWordLimit($row->post_title, 10);
        $desc = stringWordLimit($row->post_content, 20);
        $count = mc_countPostInfo($postid, 'comment');
        ?>
<div class="widget-content">
<a href="<?php 
        echo $url;
        ?>
" class="widget-anchor">
<div class="widget-left">
Esempio n. 5
0
 function generateFeed($type = "atom", $view)
 {
     //$this->CI->load->library('ext/feed');
     require_once dirname(__FILE__) . '/ext/Feedweb.php';
     $this->CI->load->helper('text');
     $feed = new Feedweb();
     $this->CI->load->library('m_database');
     $maxDate = $this->CI->m_database->maxRow('posts', '', 'post_date');
     $feed->title = optionGet('site_title');
     $feed->description = optionGet('site_description');
     $feed->link = base_url();
     $feed->lang = "id";
     $feed->pubdate = $maxDate;
     $param = array('post_status' => 'publish');
     $dPost = mc_allpost($param, 'post_date DESC', '', 20);
     if ($dPost['jumlah'] > 0) {
         foreach ($dPost['data'] as $rPost) {
             $title = $rPost->post_title;
             $author = "";
             $url = permalinkPost($rPost->post_id);
             $date = $rPost->post_date;
             $desc = word_limiter($rPost->post_content, 50);
             if (!empty($rPost->post_user)) {
                 $author = dbField('userlogin', 'user_id', $rPost->post_user, 'nama');
             } else {
                 $author = "Administrator";
             }
             $feed->add($title, $author, $url, $date, $desc);
         }
     } else {
         $feed->add(optionGet('site_title'), optionGet('site_title'), base_url(), dateNow(TRUE), optionGet('site_description'));
     }
     $feed->render($type, $view);
 }
Esempio n. 6
0
<section class="blog">
<div class="row">
<div class="col-md-8">
<div class="blog-left">
<?php 
if (!empty($data)) {
    $p = array('post_content LIKE' => '%' . $data . '%');
    $dPost = mc_allpost($p, "post_date DESC", "", 20);
    if ($dPost['jumlah'] > 0) {
        echo "<h3>Data Pencarian : <i>" . $data . "</i></h3><hr/>";
        foreach ($dPost['data'] as $rPost) {
            $postID = $rPost->post_id;
            $postTitle = $rPost->post_title;
            $postContent = $rPost->post_content;
            $link = permalinkPost($postID);
            ?>
		<a href="<?php 
            echo $link;
            ?>
"><strong><?php 
            echo $postTitle;
            ?>
</strong></a><hr/>
		<?php 
        }
    } else {
        echo "<h3>Data Pencarian : <i>" . $data . "</i> Kosong</h3><hr/>";
    }
} else {
    echo "Tidak ada kata kunci pencarian";
}