Headline News Publisher

Date 2014/9/27 14:23:41 | Topic: Hacks

Original Image

theme.html Code :
<link href="<{xoImgUrl css/mansetx.css}>" type="text/css" rel="stylesheet" />  
<
script type="text/javascript" src="<{xoImgUrl js/mansetx.js}>">script>
<
script type="text/javascript" src="<{xoImgUrl js/jquery-1.11.1.js}>">script>


theme.html add :

<{includeq file="$theme_name/slidetpublisher.html"}>



slidetpublisher.html code :

<{php}>
include_once 
XOOPS_ROOT_PATH '/modules/publisher/include/common.php';
$publisher =& PublisherPublisher::getInstance();
$myts =& MyTextSanitizer::getInstance();
$itemsObj $publisher->getHandler('item')->getItems($limit 6$start 0, array(_PUBLISHER_STATUS_PUBLISHED), -1$sort 'datesub'$order='DESC'''true$criteria nulltrue);
$totalItems count($itemsObj);

global 
$items;
$items = array();
if (
$itemsObj) {
        for ( 
$i 0$i $totalItems$i++ ) {

            
$newItems['itemid']       = $itemsObj[$i]->itemid();
            
$newItems['title']        = $itemsObj[$i]->title();
            
$newItems['body']         = $itemsObj[$i]->body();
            
$newItems['votes']        = $itemsObj[$i]->votes();
            
$newItems['image']        = XOOPS_URL '/uploads/blank.gif';
            
$images $itemsObj[$i]->getImages();
            if (
is_object($images['main'])) {
                
$newItems['image'] = XOOPS_URL '/uploads/' $images['main']->getVar('image_name');
            }
        
$items[] = $newItems;
    }
}
<{/
php}>
        <
div id="mansetx">
            <{
php}>
        foreach ( 
$GLOBALS['items'] as $myrow )
        {
        
$GLOBALS['xoopsTpl']->assign('itemid'$myrow['itemid']);
        
$GLOBALS['xoopsTpl']->assign('title'$myrow['title']);
        
$GLOBALS['xoopsTpl']->assign('body'$myrow['body']);
        
$GLOBALS['xoopsTpl']->assign('votes'$myrow['votes']);
        
$GLOBALS['xoopsTpl']->assign('image'$myrow['image']);
<{/
php}>
        <
div id="mansetx-img">
            <
a href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>"><img width="720" height="315" src="<{$image}>">a>
        div>
         <{
php}>
        }
<{/
php}> 
        <
div id="mansetx-selector">
            <
ul>
            ul>
        div>
div>


Demo :

http://estetikameliyatmerkezi.com/xoopson/

Hasta Yatakları


This article comes from XOOPS Web Application System
https://xoops.org

The URL for this story is:
https://xoops.org/modules/news/article.php?storyid=6667