*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 01:57:59 AM


Login with username, password and session length

Author Topic: 4 albums rows on main page  (Read 4618 times)
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« on: October 01, 2008, 08:02:50 AM »

This mod will display 4 albums in rows on main page

open main.php and find function listalbums() and replace with

Quote
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

Quote
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.
« Last Edit: September 19, 2009, 05:52:38 PM by Support » Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #1 on: October 01, 2008, 08:19:19 AM »

to make it 3 albums in rows just edit the css

Quote
table.albumbox {

  width            : 33%;

  /*table-layout      : auto; */

  float: left; /*modified*/

}

.three_column_table {



  width: 100%;       
 
}
Logged
farid
Newbie
*
Offline Offline

Posts: 18


View Profile
« Reply #2 on: October 13, 2008, 12:25:36 AM »

it didnot work for me
Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #3 on: October 14, 2008, 03:18:58 AM »

it works in all browsers and all versions
Logged
A_T_b
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: February 11, 2009, 12:01:12 AM »

can it be in 2 columns also ? hope you get what imean
Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #5 on: March 02, 2009, 11:33:53 AM »

yes it can be 2 colums or 3 colums also, A_T_b verify your account on the forums please to get the solution
Logged
A_T_b
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #6 on: March 02, 2009, 11:39:33 PM »

sure iwill but how to do so
Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #7 on: March 03, 2009, 05:46:58 AM »

like we said earlier, please verify your account on the forums first.
Logged
A_T_b
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #8 on: March 04, 2009, 12:23:07 AM »

iwas talking about activation .
 the forum says
[[An Error Has Occurred!
Your account has already been activated]]
if you mean anything else please tell me how to verify thanks in advance
« Last Edit: March 04, 2009, 12:30:16 AM by A_T_b » Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #9 on: March 04, 2009, 04:12:32 AM »

you need to verify yourself by private messaging me or emailing support@musicboxv2.com your order id details which you received at the time of purchasing musicbox.
Logged
xshaanx
Verified Customer
Newbie
*****
Offline Offline

Posts: 26


View Profile
« Reply #10 on: March 07, 2009, 09:52:54 PM »

how do you make two columns?

Thank You
Logged
Support
Administrator
Sr. Member
*****
Offline Offline

Posts: 468


View Profile
« Reply #11 on: March 08, 2009, 06:43:03 AM »

you will have to change width in css

table.albumbox {

  width            : 55%;

or

table.albumbox {

  width            : 70%;
Logged
Pages: [1]
Jump to:  

Copyright © 2010 MusicboxV2.com - Shalwan Enterprises