Example #1
0
?>
</h3>
	<div class="widget-tools pull-right"><a href="<?php 
echo permalinkCategory($catID);
?>
">+ indexs</a></div>
</div>
<div class="widget-body">
<?php 
if (!empty($data)) {
    $i = 0;
    foreach ($data as $row) {
        $i += 1;
        $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 with-space">
<div class="widget-left">
<span class="widget-number"><?php 
        echo $i;
        ?>
</span><?php 
        echo $title;
Example #2
0
<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;
            ?>
Example #3
0
 function generateOGFB($route, $data)
 {
     $title = '';
     $img = '';
     $type = '';
     $permalink = '';
     if ($route == "post") {
         $postid = $this->CI->m_database->fieldRow('posts', $data, 'post_id');
         $img = mc_imagepost($postid);
         $title = postInfo($postid, 'post_title');
         $type = "website";
         $permalink = permalinkPost($postid);
     } else {
         $img = mc_logo();
         $title = optionGet('site_title');
         $type = "website";
         $permalink = base_url();
     }
     $output = "";
     $output .= '<meta property="og:title" content="' . $title . '" /><meta property="og:type" content="' . $type . '" /><meta property="og:url" content="' . $permalink . '" /><meta property="og:image" content="' . $img . '" />';
     return $output;
 }