Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    78
    Plugin Contributions
    0

    Default Category Alt Tag - Better Categories

    What file contains:

    <div class="betterCategories">
    <a class="category-top" href="http://www.mydomain.com/index.php?main_page=index&amp;cPath=32">
    <img src="includes/templates/mytemplate/images/bc_cat_pointer_right.gif" alt="" width="19" height="13" />mycategory</a></div>

    I want to fill in the alt tag. Is there a way use the image name as a default for this alt tag?

    I tried using Developers Toolkit but cannot locate the file that creates the empty alt tag for this image...

  2. #2
    Join Date
    Jul 2012
    Posts
    22
    Plugin Contributions
    1

    Default Re: Category Alt Tag - Better Categories

    I'm waiting to re-run an seo tool i'm using but i too am having this issue with alt tags missing on certain categories, However i have noticed that all images that are uploaded in jpg mode have the alt tag assigned whilst those in .gif, .png, etc have not got them. looks like it's time to convert them.
    Last edited by Neil_9481; 28 Sep 2012 at 11:22 AM. Reason: typo

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Category Alt Tag - Better Categories

    Quote Originally Posted by CustomBooks View Post
    What file contains:

    <div class="betterCategories">
    <a class="category-top" href="http://www.mydomain.com/index.php?main_page=index&amp;cPath=32">
    <img src="includes/templates/mytemplate/images/bc_cat_pointer_right.gif" alt="" width="19" height="13" />mycategory</a></div>

    I want to fill in the alt tag. Is there a way use the image name as a default for this alt tag?

    I tried using Developers Toolkit but cannot locate the file that creates the empty alt tag for this image...
    I know this is an old thread, but here's my solution for a "valid" ALT TAG in this situation:

    TWO ACTIONS NEEDED:

    1. CREATE THIS PHP FILE IN A PLAIN TEXT EDITOR
    better_categories_pointer_defines.php


    PHP Code:
    <?php
    /**
     * @package languageDefines
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: better_categories_pointer_defines.php v1.x $
     */

    // this is used to display some ALT TEXT for the pointers in the "better categories sidebox"
      
    define('MAINCAT_POINTER_ALT_TEXT''Main Category Pointer');
      
    define('SUBCAT_POINTER_ALT_TEXT''Sub Category Pointer');
      
    define('POINTER_ALT_TEXT''Category Pointer');

    ?>
    LOAD THE PHP FILE TO:
    includes/languages/english/YOUR_TEMPLATE/extra_definitions/

    2. MAKE EDITS TO THE CATEGORIES SIDEBOX TEMPLATE FILE
    (This may just be called "categories.php" in your template's SIDEBOX folder - or it may be in another sidebox folder. In any event, it is the TPL file for the better_categories sidebox)...

    AROUND LINES 130 onwards... add the define constants (IN RED)

    Code:
      	//picking the appropriate pointer image:
      	switch ($categoryType) {
      		case "down":
      			$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . 'bc_cat_pointer_down.gif', MAINCAT_POINTER_ALT_TEXT);
      			break;
      		case "right":
      			$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . 'bc_cat_pointer_right.gif', SUBCAT_POINTER_ALT_TEXT);
      			break;
      		default:
      			$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . 'bc_cat_no_sub.gif', POINTER_ALT_TEXT);

 

 

Similar Threads

  1. v151 Category Image Alt tag
    By Neil_9481 in forum General Questions
    Replies: 2
    Last Post: 29 Sep 2012, 04:09 AM
  2. Turn Off Better Categories for Sub-Category
    By Craig Robbo in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 Jun 2009, 03:45 AM
  3. Alt Tag Product Pictures?
    By ryanb4614 in forum General Questions
    Replies: 2
    Last Post: 15 Feb 2009, 06:57 AM
  4. missing alt tag
    By ctcentralinfo in forum General Questions
    Replies: 0
    Last Post: 15 Jan 2008, 06:10 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR