##############################################################
## : super Lenta
## : X_Z
## : 0.1
## :    
## : 
## 
##############################################################

##---[SQL]---##

INSERT INTO `bb_config` VALUES ('lenta_title', '');
INSERT INTO `bb_config` VALUES ('lenta_poster', '');
INSERT INTO `bb_config` VALUES ('lenta_topic_id', '');  
INSERT INTO `bb_config` VALUES ('lenta_forum_id', '');  
INSERT INTO `bb_config` VALUES ('lenta_desc', '');
  
---------------------------------[  index.php  ]------------------------

// Allow cron
if (IS_AM)
{
	if (@file_exists(CRON_RUNNING))
	{
		if (@file_exists(CRON_ALLOWED))
		{
			unlink (CRON_ALLOWED);
		}
		rename(CRON_RUNNING, CRON_ALLOWED);
	}
}

---------------------------------[   ]------------------------

if($bb_cfg['lenta_poster'])
{
	if (!$forums = $datastore->get('cat_forums'))
	{
		$datastore->update('cat_forums');
		$forums = $datastore->get('cat_forums');
	}

	$title_row    = unserialize($bb_cfg['lenta_title']);
    $topic_row    = unserialize($bb_cfg['lenta_topic_id']);
	$poster_row   = unserialize($bb_cfg['lenta_poster']);
	$desc_row     = unserialize($bb_cfg['lenta_desc']);
    $forum_row    = unserialize($bb_cfg['lenta_forum_id']);

	foreach($poster_row as $i => $row)
	{
		if(!$row || !$desc_row[$i]) continue;

		$template->assign_block_vars('lenta', array(
			'ID'        => ($i+1),
			'TOPIC_ID'  => $topic_row[$i],
			'TITLE'     => $title_row[$i],
			'POSTER'    => $row,
			'FORUM_ID'  => $forum_row[$i],
			'DESC'      => $desc_row[$i],
		));
	}
}

---------------------------------[  page_header.tpl  ]------------------------

<!--/login form-->
<!-- ENDIF -->

---------------------------------[   ]-----------------------

<script type="text/javascript" src="new/lenta.js"></script>

<script type="text/javascript">
function mycarousel_initCallback(carousel) {
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#my_gallery').jcarousel({
        auto: 30,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
</script>


<ul id="my_gallery" class="transparency_i">
<!-- BEGIN lenta -->
	<li data-id="cat{lenta.ID}">
		<a class="youtube" href="" rel="x6gW_EdZpew" title='   "{lenta.TITLE}"   '><div class="new"><strong>{lenta.FORUM}</strong></div></a>
		<a href="{TOPIC_URL}{lenta.TOPIC_ID}" title='{lenta.DESC}'><img src="{lenta.POSTER}" width="120" height="169" alt=""></a>
	</li>
<!-- END lenta -->
</ul>

---------------------------------[  main.css     ]-----------------------

<style type="text/css">
#my_gallery { position: relative; border: none; overflow: hidden; height: 190px; }
#my_gallery li {	float:left;	list-style:none; text-align: center; font: 9px Verdana,Arial,Helvetica,sans-serif; color: white; width: 120px; }
#my_gallery li img { top:15px; }
/*   */
.jcarousel-clip {
	z-index:2;
	padding:0;
	margin:0;
	overflow:hidden;
	position:relative;
}
.jcarousel-list {
	z-index:1;
	overflow:hidden;
	position:relative;
	top:0;
	left:0;
	margin:0;
	padding:0;
}
.jcarousel-list li,.jcarousel-item {
	float:left;
	list-style:none;
}
.jcarousel-item {
	text-align:center;
	font:9px Verdana,Arial,Helvetica,sans-serif;
	color:white;
	width: 150px;
	padding: 2px;
}

.jcarousel-container {
    position: relative;
}
.jcarousel-container-horizontal {
    padding: 0 50px 0 50px;
}
.jcarousel_img {
	width:50px;
	height:50px;
	background:#fff;
	border:1px solid #B6D4E1;
	padding:3px;
	margin-bottom:3px;
}
.jcarousel-next-horizontal {
	position:absolute;
	top:65px;
	right:8px;
	width:32px;
	height:32px;
	cursor:pointer;
	background:transparent url('new/rightnav.gif') no-repeat 0 0;
}
.jcarousel-prev-horizontal {
	position:absolute;
	top:65px;
	left:15px;
	width:32px;
	height:32px;
	cursor:pointer;
	background:transparent url('new/leftnav.gif') no-repeat 0 0;
}

/*   -
.jcarousel-next-horizontal:hover, .jcarousel-prev-horizontal:hover { background-position:-32px 0; }
.jcarousel-next-horizontal:active, .jcarousel-prev-horizontal:active { background-position:-64px 0; }
*/

.transparency_i a:hover img {filter: progid: DXImageTransform.Microsoft.Alpha(opacity=50); -moz-opacity: 0.5; opacity: 0.5; filter: alpha(opacity=50);}

.reliz{
background: url('new/yqype8dn.png');
background-position: top;
color: #fff; /* ???? */
font-size: 10px;
font-family: Georgia;
}
</style>

---------------------------------[  /    ]-------------------------------------------------------