Esempio n. 1
0
<div class="widget widget-info">
<div class="widget-header">
	<h3 class="widget-title"><?php 
echo $catName;
?>
</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 
Esempio n. 2
0
$catID = menuInfoJSON($widgetID, 'source');
$titleBox = "";
$title = menuInfoJSON($widgetID, 'title');
$limit = menuInfoJSON($widgetID, 'limit');
$style = menuInfoJSON($widgetID, 'style');
if (!empty($title)) {
    $titleBox = $title;
} else {
    $titleBox = "Category Widget";
}
if (!empty($catID)) {
    $source = $catID;
} else {
    $source = 1;
}
$catLink = permalinkCategory($source);
$catName = $titleBox;
?>


<?php 
$output = '';
$g = mc_postCategory($source, "post_date DESC", $limit);
$d['data'] = $g;
$d['catLink'] = $catLink;
$d['catName'] = $catName;
$d['catID'] = $source;
if ($style == "thumbnail") {
    $this->load->view('service/widget/category/thumbnailview', $d);
} elseif ($style == "list") {
    $this->load->view('service/widget/category/listview', $d);