Page 39 of 227 FirstFirst ... 2937383940414989139 ... LastLast
Results 381 to 390 of 2267
  1. #381
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Nilsen -
    The catimg1.gif and catbg1.gif are not able to be used at the same time. If a catimg#.gif file is found for the category, the code will not look for a catbg#.gif file, nor use it if it exists. Delete catimg1.gif and see if catbg1.gif and catbg1hover.gif show up.
    I have described the modifications for bilingual images above.

    Juliet -
    I have to get to sleep now... I'll look at your code when I get back to the computer in a day or so.
    Last edited by gjh42; 27 Aug 2008 at 10:49 AM.

  2. #382
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Categories Dressing

    Thank you! Sleep well!
    Working on http://www.skull-shop.net once again.

  3. #383
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    For bilingual background images, the language-specific stylesheets would be the way to go, instead of altering the PHP code. The class/id tags would stay the same, but the image files associated with them would change based on the language.

  4. #384
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Thinking more about the bg images - the method above will work correctly, as long as there is one image named according to the pattern (/your_template/images/catbg#.gif). This can be for any of the languages; the other language(s) can call for an image in the language stylesheet with any name desired (for example /your_template/images/catbg#french.gif), as these will not be checked for in the PHP code.

    This does mean that if an alternate image file is missing, the code will not know it and will still be calling for it. The PHP code method is more robust and will check for the current language bg image.
    Last edited by gjh42; 28 Aug 2008 at 01:19 AM.

  5. #385
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Juliet -
    I can't troubleshoot your code when I can't see what wasn't working for you. Can you put it back the way you had it and post the relevant part of the file? (10 lines or so in the area should be enough.)

  6. #386
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Categories Dressing

    Glenn,

    You are an absolute angel, you are so kind to help me!!!

    PHP Code:
         // skip if this is for the document box (==3) 
        
    } else {
          
    // categories dressing - add divider above specified cats
          
    if(in_array($current_pathexplode(",",'3,22,21_56'))) { //replace numbers with your cat ids separated by commas
            
    $content .= '<hr class="catBoxDivider" />' "\n";
          }
           
    // categories dressing - display image if exists for category name in current language - with title tag
          
    if (file_exists(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/catimg' $current_path '.gif')) {
            
    $cat_name_display zen_image(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/catimg' $current_path '.gif''''''''title="' $box_categories_array[$i]['name'] . '"');  
          
    // categories dressing - add (divider and) heading above a cat
          
    switch ($current_path) {
          case 
    '23'//replace number with your desired cPath
            //$content .= '<hr class="catBoxDivider" />' . "\n";  // to add divider uncomment this line
            
    $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') . '</span>':'Heading 1</span>' $disp_block_head) . "\n"
          break;
          } 
    Working on http://www.skull-shop.net once again.

  7. #387
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Categories Dressing

    I almost understand what you say about working it trough the stylesheet, but still two questions about it.

    Would I have to name every button in the stylesheet seperatly? So I mean /your_template/images/catbg1.gif,/your_template/images/catbg2.gif,/your_template/images/catbg3.gif etcetra.

    And do I keep the php in this case or would I throw it out?
    Working on http://www.skull-shop.net once again.

  8. #388
    Join Date
    Aug 2008
    Posts
    33
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi Glenn,
    thanks for your help. I have taken the catimg1 out, but now I don't see any image at all, only a gray rectangle (see pic) also by rollover. I also don't see the text of the cat.
    How can I fix this?
    thanks a lot!!!
    nils
    Attached Images Attached Images  

  9. #389
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Juliet - it looks like you have added the whole lines I posted to your tpl_categories.php at a different location in the file instead of replacing the original lines with the modified ones.
    Your file has this:
    PHP Code:
          // categories dressing - category name mods
          
    $cat_name_display $box_categories_array[$i]['name'];
    //      $subcat_level = (substr_count($current_path, '_'); //strip out subcat indent 
    //      $cat_name_display = substr_replace($cat_name_display,'',0,($subcat_level*strlen(CATEGORIES_SUBCATEGORIES_INDENT)));
          
    $cat_img_bg '';
          
    // categories dressing - display image if exists for category name - with title tag
          
    if (file_exists(DIR_WS_TEMPLATE_IMAGES 'catimg' $current_path '.gif')) {
            
    $cat_name_display zen_image(DIR_WS_TEMPLATE_IMAGES 'catimg' $current_path '.gif''''''''title="' $box_categories_array[$i]['name'] . '"'); 
    It should be changed to this:
    PHP Code:
          // categories dressing - category name mods
          
    $cat_name_display $box_categories_array[$i]['name'];
    //      $subcat_level = (substr_count($current_path, '_'); //strip out subcat indent 
    //      $cat_name_display = substr_replace($cat_name_display,'',0,($subcat_level*strlen(CATEGORIES_SUBCATEGORIES_INDENT)));
          
    $cat_img_bg '';
          
    // categories dressing - display image if exists for category name in current language - with title tag
          
    if (file_exists(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/catimg' $current_path '.gif')) {
            
    $cat_name_display zen_image(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/catimg' $current_path '.gif''''''''title="' $box_categories_array[$i]['name'] . '"'); 

  10. #390
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    The background image comments were for nilsen. They don't apply to what you are doing, Juliet.

    Nilsen - can you post a link to your site? That would help me figure out why you are not getting good results. It's hard to troubleshoot something you can't really see.

 

 

Similar Threads

  1. categories dressing
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2010, 09:29 PM
  2. Categories Dressing
    By wotnow in forum Addon Sideboxes
    Replies: 10
    Last Post: 7 Apr 2010, 03:06 AM
  3. Categories Dressing issue
    By Maynards in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Mar 2010, 10:51 PM
  4. Categories Dressing
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 11:05 PM
  5. Categories Dressing
    By PGlad in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2007, 07:05 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR