####################| Poster_Mod for SVN |####################
##############################################################
####################| page_header.php  |#################

$have_new_pm = $have_unread_pm = 0;

####################|   |#########################

$porno_forums = $bb_cfg['porno_forums'] ? $bb_cfg['porno_forums'] : 0;
$new_torrent = $db->sql_query("SELECT t.topic_id, pt.post_text, pt.post_id, tt.topic_title, tt.topic_time
          FROM   ".BT_TORRENTS_TABLE." AS t,
                 ".POSTS_TEXT_TABLE." AS pt,
                 ".TOPICS_TABLE." AS tt
          WHERE pt.post_id = t.post_id
          AND   tt.topic_id = t.topic_id
          AND   tt.forum_id NOT IN (".$porno_forums.")
          GROUP BY t.reg_time DESC LIMIT 30
");
  $i = 0;
while ($tor = $db->sql_fetchrow($new_torrent))
  {
      $i++;
      preg_match_all('/\[img=.*?\](.*?)\[\/img:.*?\]/i', $tor['post_text'], $out);
	  $title = $tor['topic_title'];
      $post_img = @$out[1][0] ? '<img title="$title" src="'.@$out[1][0].'" width=100 />' : '<img title="$title" src="images/no_poster.jpg" width=100 />';
      $last_release = '<a href="'.TOPIC_URL.$tor['topic_id'].'">'.$post_img.'</a>&nbsp;';
      $template->assign_block_vars('last_release', array(
         'LAST_RELEASE' => $last_release,
         'TITLE'        => $title,));
  }

####################| page_header.tpl  |####################

<script type="text/javascript" src="{#BB_ROOT}misc/js/jquery.pack.js?v={$bb_cfg['js_ver']}"></script>

####################|   |############################

<script type="text/javascript" src="{#BB_ROOT}misc/js/ui/jquery.mousewheel.js?v={$bb_cfg['js_ver']}"></script>
<script type="text/javascript" src="{#BB_ROOT}misc/js/ui/jquery.scrollable.js?v={$bb_cfg['js_ver']}"></script>


####################|  |#################

<!-- IF SHOW_ONLY_NEW_MENU -->
<div class="menu-sub" id="only-new-options">
	<table cellspacing="1" cellpadding="4">
	<tr>
		<th>{L_DISPLAYING_OPTIONS}</th>
	</tr>
	<tr>
		<td>
			<fieldset id="show-only">
			<legend>{L_SHOW_ONLY}</legend>
			<div class="pad_4">
				<label>
					<input id="only_new_posts" type="checkbox" <!-- IF ONLY_NEW_POSTS_ON -->{CHECKED}<!-- ENDIF -->
						onclick="
							user.set('only_new', ( this.checked ? {ONLY_NEW_POSTS} : 0 ), 365, true);
							$('#only_new_topics').attr('checked', 0);
						" />{L_ONLY_NEW_POSTS}
				</label>
				<label>
					<input id="only_new_topics" type="checkbox" <!-- IF ONLY_NEW_TOPICS_ON -->{CHECKED}<!-- ENDIF -->
						onclick="
							user.set('only_new', ( this.checked ? {ONLY_NEW_TOPICS} : 0 ), 365, true);
							$('#only_new_posts').attr('checked', 0);
						" />{L_ONLY_NEW_TOPICS}
				</label>
			</div>
			</fieldset>
		</td>
	</tr>
	</table>
</div><!--/only-new-options-->
<!-- ENDIF / SHOW_ONLY_NEW_MENU -->
<!--/menus-->

####################|   |#################

<script>
$(function() {
  $("div.scrollable").scrollable({
      size: 8,
      items: '#thumbs',
      hoverClass: 'hover',
      keyboard: false
    });
});
</script>
<table cellpadding="0" cellspacing="0" class="poster">
<tr>
<td class="pad_2">
<!-- prev link -->
<a class="prev"></a>
<!-- root element for scrollable -->
<div class="scrollable">
<div id="thumbs">
<!-- BEGIN last_release -->
<!-- IF last_release.LAST_RELEASE -->
<div class="tCenter">{last_release.LAST_RELEASE}</div>
<!-- ENDIF -->
<!-- END last_release -->
</div>
</div>
<!-- next link -->
<a class="next"></a>
</td>
</tr>
</table>


####################|  main.css     |##########

/* root element for the whole scrollable setup */
div.scrollable {  
  position:relative;
  overflow:hidden;
  width: 93%;
  height:143px;
}
#thumbs { 
  position:absolute;
  width:20000em;  
  clear:both;
}
a.prev, a.next {
  margin-top:118px; 
}
#thumbs div {
  float:left;
  width:110px;
  height:135px;
  color:#fff;
  cursor:pointer;
  padding: 3px 3px 3px 3px;
}
#thumbs div.hover {
  background-color:#D0DFEF;
}
#thumbs div.active {
  background-color:#6699CC;
  cursor:default;
}
div.scrollable {
  float:left;   
}
/* prev, next, prevPage and nextPage buttons */
a.prev, a.next, a.prevPage, a.nextPage {
  display:block;
  width:18px;
  height:18px;
  background:url(../images/left.png) no-repeat;
  float:left;
  margin:55px 5px;
  cursor:pointer;
}
a.prev:hover, a.next:hover, a.prevPage:hover, a.nextPage:hover {
  background-position:0px -18px;    
}
a.disabled {
  visibility:hidden !important;   
}
a.next, a.nextPage {
  background-image:url(../images/right.png);
  clear:right;
}
div.navi {
  margin-left:47%;
  width:250px;
  height:20px;
}
div.navi a {
  width:8px;
  height:8px;
  float:left;
  margin:3px;
  background:url(../images/navigator.png) no-repeat;     
  cursor:pointer; 
}
div.navi a:hover {
  background-position:0 -8px;      
}
div.navi a.active {
  background-position:0 -16px;     
}
.poster {
  margin: 3px 4px 0; padding: 0 8px; width: 99%;
  background: #EFEFEF; border: solid #CFD4D8; border-width: 1px 0px;
}

##########################| EoM |#####################################