This mod will display 4 albums in rows on main page
open main.php and find function listalbums() and replace with
function listalbums() {
global $HTTP_POST_VARS,$HTTP_GET_VARS,$HTTP_SERVER_VARS,$HTTP_SESSION_VARS,$HTTP_COOKIE_VARS,$HTTP_POST_FILES;
$sortby = $HTTP_POST_VARS['sort'];
/**
* Only list 5 newest albums if this is the homepage
*/
if (!$HTTP_GET_VARS)
$query = "SELECT TO_DAYS(now())-TO_DAYS(album.post_date)as date_diff, album.album_name, artist.name as artist_name, album.album_photo, album.album_info, album.id as album_id, artist.id as artist_id FROM album, artist WHERE album.artist_id = artist.id ORDER BY album.post_date DESC LIMIT 5";
else
$query = "SELECT TO_DAYS(now())-TO_DAYS(album.post_date)as date_diff, album.album_name, artist.name as artist_name, album.album_photo, album.album_info, album.id as album_id, artist.id as artist_id FROM album, artist WHERE album.artist_id = artist.id ORDER BY album.post_date DESC LIMIT 5";
$result = mysql_query($query) or die(mysql_error());
print("<td valign='top' class='album_bg' style='border-top: 0px solid #FFFFFF;'>
<table cellpadding='0' cellspacing='0' class='moduletable'>
<tr>
<th valign='top'>
5 Newest Albums </th>
</tr>
<tr>
<td>");
print("<title>".PGTITLE."</title>");
print("<div id='content'>\n");
$lastchar = '';
$xx_albumCount = 0;
print("<table class='moduletable'>");
while( $album = mysql_fetch_assoc($result) )
{
$xx_albumCount++;
// get initial name character
if( $sortby == 'album' ) {
$thischar = $album['album_name']{0};
$display = $album['album_name']." - ".$album['artist_name'];
} else {
$thischar = $album['artist_name']{0};
$display = $album['artist_name']." - ".$album['album_name'];
}
// Check to see if different than last
if( $lastchar != $thischar ) {
if( $lastchar != '' ) {
print("");
}
}
// Print album Info
print("<table class='albumbox'><tr><td><a class=text href='".$this->thisfile."?action=album&id=".$album['album_id']."'><img src='".$album['album_photo']."' width='100' height='99' class=\"borderimage\" onMouseover=\"borderit(this,'black')\" onMouseout=\"borderit(this,'black')\" align='left' hspace='5' vspace='3'></a>\n");
print("<b><a class=text href='".$this->thisfile."?action=album&id=".$album['album_id']."'>".$display."</a></b> ".(($album['date_diff']<14)?"":"")."<br><font size='2'>{$album['album_info']}</font><br>".buy_link($album[album_id],"album")." <br>".calculate_price($album[album_id])." </td></tr></table>");
// Store character
$lastchar = $thischar;
}
now open template/musicboxv2.css and add the below code
table.albumbox {
width : 25%;
/*table-layout : auto; */
float: left; /*modified*/
}
.three_column_table {
width: 100%;
}
save and preview from the browser.
Note : this mod was created in interest of existing users.