Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    help question Categories_box_heading_featured_products

    Hello,

    I've been trying to change the text to an image for:

    Categories Box - Show Featured Products Link

    english.php: define('CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS', 'Featured Product...');

    and can not figure out how to accomplish this. i am also using the category dressing mod. Any help would be appreciated.

    thanks
    Last edited by tonkali; 26 Feb 2008 at 08:58 PM.

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

    Default Re: Categories_box_heading_featured_products

    The code that checks for and substitutes a category image in Categories Dressing could be applied to the links as well, with some modification.

    Probably the easiest way, though, would be to change the define.

    define('CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS', '<img ...etc.>');
    The exact form has been posted here; look around for it. I'll see if I can remember the right keywords for it.

  3. #3
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Categories_box_heading_featured_products

    thanks gjh42. tried putting the image link in the english.php file and it just showed the image name instead of the image. i did the same thing for the products header and it worked so scratching my head on this. i feel like a dog chasing it's tail and i know the answer is right in front of my face, eGad!

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

    Default Re: Categories_box_heading_featured_products

    The code is straightforward in displaying the value of that constant:
    PHP Code:
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS '</a>' $disp_block "\n"
    so I'm not sure why it wouldn't work there if the same thing worked for you elsewhere.

  5. #5
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Categories_box_heading_featured_products

    i'll show you by example, will put the image url in english.php and upload.

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

    Default Re: Categories_box_heading_featured_products

    OK, I see the filename... What exactly does your define statement look like?

    If the categories box is just outputting the contents of the constant, then you're not defining it properly.

  7. #7
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Categories_box_heading_featured_products

    for Featured:

    Code:
      define('BOX_HEADING_FEATURED_PRODUCTS', 'Featured');
      define('CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS', 'hdr_featprod.gif');
      define('TEXT_NO_FEATURED_PRODUCTS', '');
    and for the one thats working, Products:
    Code:
    // categories box text in sideboxes/categories.php
      define('BOX_HEADING_CATEGORIES', 'products_hdr.gif');

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

    Default Re: Categories_box_heading_featured_products

    You are using some code that takes the value of BOX_HEADING_CATEGORIES and puts it into an <img> call. There is no such code in tpl_categories.php, so the same thing won't work for the links.

    You need to put the entire <img src="whatever"> into the definition, inside single quotes.

  9. #9
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Categories_box_heading_featured_products

    thanks so much for your help glenn.

    "some code", hmmmmm?? If i remember correctly, I thought there was an option in the Admin to replace category text for image.

    sorry, but I'm not understanding: "You need to put the entire <img src="whatever"> into the definition, inside single quotes." can you please clarify a bit further? Apologies and thanks so much.

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

    Default Re: Categories_box_heading_featured_products

    There are admin settings to show category images or not, but that is for the center column and does not replace text. To replace sidebox headings with images, you need a mod installed or coded (Image Titles does it, but your filename is not in the form that it uses.)
    PHP Code:
      define('CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS''<img src="includes/templates/custom_sun/images/hdr_featprod.gif" alt="" />'); 
    may do it correctly.

 

 
Page 1 of 2 12 LastLast

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