Page 115 of 227 FirstFirst ... 1565105113114115116117125165215 ... LastLast
Results 1,141 to 1,150 of 2267
  1. #1141
    Join Date
    May 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi,

    You may have answered this before. Or maybe you can PM or direct the answer to me. I'm not too familiar with coding.

    http://giftpackaging.com.au/

    how can I apply an image to "specials..."

    Michael

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

    Default Re: Categories Dressing

    I'm not sure what you're asking for. You already have a nicely done set of background images applied to all the top categories including "Specials" category 66.
    Are you referring to the new/all products links?

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

    Default Re: Categories Dressing

    Categories Dressing does not have a specific image substitution feature for the links at the bottom of the categories box.
    The constant CATEGORIES_BOX_HEADING_SPECIALS is only used in the categories sidebox, so you can safely add the <img> code to its definition in /includes/languages/your_template/english.php, Line #99 :
    Code:
    define('CATEGORIES_BOX_HEADING_SPECIALS','Specials ...');
    Code:
    define('CATEGORIES_BOX_HEADING_SPECIALS',zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/catimgspecials.gif', 'Specials') );
    If the zen_image() function doesn't give the right results here, try
    Code:
    define('CATEGORIES_BOX_HEADING_SPECIALS','<img src="' . DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/catimgspecials.gif" alt="Specials" />');
    Save the image as
    /includes/templates/your_template/buttons/english/catimgspecials.gif

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

    Default Re: Categories Dressing

    A more robust way of doing image substitution would be to change the tpl_categories.php code to do an image file lookup/substitution with the same function the categories use.
    As an example, for the specials link, change this
    PHP Code:
        if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          
    $cat_box_link_head cat_box_heading('SPECIALS');
          
    $content .= $cat_box_link_head[1];
          
    $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_SPECIALS) . '">' CATEGORIES_BOX_HEADING_SPECIALS '</a>' '</li>' "\n";
          }
        } 
    to this
    PHP Code:
        if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          
    $cat_box_link_head cat_box_heading('SPECIALS');
          
    $content .= $cat_box_link_head[1];
          
    $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    //test 20100124
            
    $link_name_display cat_name_display(CATEGORIES_BOX_HEADING_SPECIALS'specials')
            
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_SPECIALS) . '">' $link_name_display[1] . '</a>' '</li>' "\n";
            
    // /test 20100124
          
    }
        } 
    Not tested yet, but this should use the image at
    /includes/templates/your_template/buttons/english/catimgspecials.gif
    including (with the new v2.8 code) automatically adjusting the image type to whatever is globally set in categories_dressing_defines.php, or using the standard text if the image is not found.

    Applying this change to the rest of the links will be straightforward.

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

    Default Re: Categories Dressing

    A refinement would be to adjust the classname to reflect whether or not an image has been substituted, allowing precise list-item marker control (removing the bullet if an image is used).
    PHP Code:
            //test 20100124
            
    $link_name_display cat_name_display(CATEGORIES_BOX_HEADING_SPECIALS'specials')
            
    $content .= '<li><a class="category-links' $link_name_display[0] . '" href="' zen_href_link(FILENAME_SPECIALS) . '">' $link_name_display[1] . '</a>' '</li>' "\n";
            
    // /test 20100124 
    This will give a classname of .category-links for images and .category-links-text for text.

  6. #1146
    Join Date
    May 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi Glen,

    I removed the category 66 Specials, as I do want to apply the image to the standard specials link under the categories.

    I was able to apply your first code to change definition in /includes/languages/your_template/english.php, Line #99
    It worked perfectly, however the standard 'bullet' was in the front of the Image, which doesn't look that great and skewed the alignment of the other images above.

    I then changed it back, and tried your 2nd code suggestions, however it didn't work. It actually removed all the content and side categories.

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

    Default Re: Categories Dressing

    For now, just use the first "define" method, and uncomment this rule in stylesheet_categories_dressing.css and change
    disc inside url(../images/bullet4.gif)
    to
    none
    Code:
    /*different bullet for links if desired*/
    
    #categories li a.category-links {
        list-style: none;
        }
    I will test the code and post a working version later.

  8. #1148
    Join Date
    Oct 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi I am not sure if this is anything to do with BetterCategories but on http://www.noahsark.co.uk the category Winter Sale is in red and no other category is...... Now I know how to change the colour of this and I am up on where and how the style sheet it changes for the category colours.

    I don't however know why specifically that category is in red? It is category ID 1. My guess is somehow I can specify a particular category as the featured one or something?

    Please help, this is very annoying. All I want to do is highlight some other sale categories.

    Thanks in advance.

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

    Default Re: Categories Dressing

    You are using BetterCategories, not Categories Dressing, so you need to ask in that mod's support thread.

  10. #1150
    Join Date
    May 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Thanks Glenn - that has worked perfectly.

 

 

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