osCmax v2.5 User Manual
Results 1 to 7 of 7

Customization of info boxes

This is a discussion on Customization of info boxes within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Is it possible to customize the info boxes so that different boxes are different colors and have a different icon/arrow? ...

      
  1. #1
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default Customization of info boxes

    Is it possible to customize the info boxes so that different boxes are different colors and have a different icon/arrow?

    If so, what is the naming scheme in the template system? I only see one box template.

  2. #2
    New Member deviantla's Avatar
    Join Date
    Jan 2006
    Posts
    28
    Rep Power
    0


    Default RE: Customization of info boxes

    Sounds like a tough one. Infobox class is defined in the box.tpl.php, which is a template for every infobox (unless I am mistaken). If you wantt o change the infobox details in CSS then it is infoBoxHeading and infoBoxContents.

  3. #3
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default RE: Customization of info boxes

    Thank you very much for a reply.

    I'm not sure what template I am going to use yet, "CSS-fluid-1" or "aabox", but what I had in mind was to have various infoboxes headers different colors.

    Looking at the content folder in the "fallback" template, I didn't know if personalizing the info boxes could be done in a similar fashion?

  4. #4
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default Different boxes with different colors

    Can anybody point me in the right direction here?

    Is there any way to make different templates for different info boxes, such as templates/mytemplate/boxes/"box.tpl.php", "box2.tpl.php", "box3.tpl.php", and then point includes/boxes/"categories.php" or "information.php" to one of the other box templates.

    I am just trying to change the background colors of various boxes and titles and getting to my wits end.

    Anyone have some pointers here? Please.

  5. #5
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default RE: Different boxes with different colors

    1) make a list of the infoboxes
    2) make a class for each infobox in the CCS using tah background: style that you want, etc.
    3) locate the line below
    Code:
                   <table border="0" width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="14" class="infoBoxHeading"><img src="images/infobox/<?php switch ($corner_left) { case 'square': echo 'corner_right_left.gif';
    break; case 'rounded': echo 'corner_left.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
                      <td width="100%" height="14" class="infoBoxHeading"><?php echo
     $boxHeading; ?></td>
                      <td height="14" class="infoBoxHeading" nowrap><?php echo $boxLink; ?><img src="images/<?php switch ($corner_right) { case 'square': echo 'pixel_trans.gif';   break; case 'rounded': echo 'infobox/corner_right.gif'; break;} 
    ?>" border="0" alt="" width="11" height="14"></td>
                    </tr>
                  </table>
    or something very similar (this line was taken from the fallback template)

    4) replace the code with something like:

    Code:
    <td height="14" class="<?echo $box_base_name; ?>"
    or


    Code:
    <td height="14" class="<?echo $box_id; ?>"
    The secret to all of this is found in the /includes/boxes where you will find the following code



    Code:
    $box_base_name = 'information'; // for easy unique box template setup (added B
    TSv1.2)
    
      $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
    where the people that came before you put all the hooks in to permit you to do JUST what you want to do.

    (or you can put a lot of if-then-else code into the box template, but it's easier to make the stylesheets do all the work )

    Is that enough pointing in the right direction?
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  6. #6
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default RE: Different boxes with different colors

    This is an immense help, Thank you very much for your support.

  7. #7
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default RE: Different boxes with different colors

    pay it forward...
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

Similar Threads

  1. image headers in info boxes?
    By Dragonmom in forum osCmax v2 Customization/Mods
    Replies: 4
    Last Post: 12-20-2006, 07:13 AM
  2. how do i alter the width of the info boxes???
    By tafkap in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 02-21-2006, 01:26 AM
  3. how do I increase the width of the info boxes ?
    By twinklep in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-09-2004, 08:38 PM
  4. Gaps between info boxes (how do I change ?)
    By dsmcphee in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 09-25-2003, 07:52 PM
  5. Adding outside links to info boxes
    By chardae in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 11-15-2002, 09:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •