First copy this -
Code:
<li><div class="story_image_feature">
{php}
// START: Image Upload Module
check_actions('image_upload_preview', $vars);
// END: Image Upload Module
{/php} <a href="{$story_url}">{$title_short}</a></div></li>
Then copy this-
Code:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
// -------------------------------------------------------------------------------------
include_once('Smarty.class.php');
if(!isset($main_smarty)){$main_smarty = new Smarty;}
// If we're calling this page through another page like index.php, $main_smarty will already be set
// If we're calling this page directly, set main_smarty
include_once('config.php');
include_once(mnminclude.'html1.php');
include_once(mnminclude.'link.php');
include_once(mnminclude.'tags.php');
include_once(mnminclude.'search.php');
include_once(mnminclude.'smartyvariables.php');
include_once(mnminclude.'sidebarstories.php');
Global $the_template;
// for filterTo you can use "published", "queued" or "all"
// to change the way the links look, edit /tempates/<your template>/sidebar_stories.tpl
$ss = new SidebarStories();
$ss->orderBy = "link_votes DESC"; // newest on top.
$ss->pagesize = 3; // the number of items to show in the box.
$ss->TitleLengthLimit = 35;
if(pagename == "index"){
$ss->filterToStatus = "published";
}
elseif(pagename == "upcoming"){
$ss->filterToStatus = "queued";
}
else{
$ss->filterToStatus = "published";
}
if(isset($_REQUEST['category'])){
$ss->header = "Top Articles In " . $_REQUEST['category'];
$ss->category = $_REQUEST['category'];
} else {
$ss->header = "Top Articles";
}
echo "<div><h1><a href=".my_pligg_base."/upcoming.php>".$ss->header."</a></h1></div><div>";
$ss->template = $the_template . '/feature_stories.tpl';
$ss->show();
echo "</div>";
?>
Open up index_center.tpl and add at the top-
Code:
{if $pagename neq "story"}
<div id="featurecontainer">
<div id="featurestory"><ul>
{* ----- show the feature ----- *}
{php}include('feature_stories.php');{/php}
{* ---------------------------------------- *}
</div></div></ul>{/if}
Now the most difficult will be the styling. Here is the basic CSS. Copy and past into your CSS file. You may have to make changes depending on your sites structure and size.
Code:
#featurecontainer{
width: 100%;
height: 200px;
background-color:#ffffff;
overflow: hidden;
border:1px solid #f2f2f2;
}
#featurestory {
padding-left:20px;
}
#featurestory ul {
list-style-type: none;
}
#featurestory ul li {
display: inline;
float: left;
width:200px;
}
#featurestory ul li a {
padding-left:5px
color: #000000;
font-size: 9px;
font-weight:bold;
}
#featurestory ul li a:hover {
color: #444444;
text-decoration: none;
}
.story_image_feature img{
width:175px;
height:125px;
padding-left:5px;
padding-right:5px;
padding-top:5px;
padding-bottom:5px;
margin-right:0px;
margin-bottom:0px;
border: 1px solid #f2f2f2;
}




Linear Mode

