Results 1 to 10 of 156

Hybrid View

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

    Default Re: Image Titles Support Thread

    You can use a different image for each language; the code automatically uses the image that matches the current language in the shop. When the customer has selected Italian, the code will look for a file in /includes/templates/your_template/buttons/italian/.

    To find the name of any sidebox, you can do a view source and look at the HTML that is being output. For Categories, look for the set of category links in the code, and note at the top of that list:
    <div id="categories">

    The id stays the same no matter the language in use, so you would use the same filename for images in any language. They should be saved in the appropriate language folder in /buttons/.

  2. #2
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

    Default Re: Image Titles Support Thread

    sorry but also for the image that goes I don't understand.

    If i view the code of page it looks
    <div class="leftBoxContainer" id="categories" style="width: 150px">
    <h3 class="leftBoxHeading" id="categoriesHeading"><img src="includes/templates/sugar/buttons/english/boxhead-categories.gif" alt="" width="100" height="20" /></h3>
    <div id="categoriesContent" class="sideBoxContent">
    <hr id="catBoxDivider" />
    i have insert copying by you
    boxhead-categories.gif but where I saw that I have to insert boxhead before image.gif?

    thank you for patience

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

    Default Re: Image Titles Support Thread

    You have boxhead-categories.gif saved in
    includes/templates/sugar/buttons/english/boxhead-categories.gif, but not in includes/templates/sugar/buttons/italian/boxhead-categories.gif.

    If you want the same image for both languages, just copy the file into the other language's /buttons/language/ folder.

    If you want different images for each language, save each one with the same name, but in the correct language folder.

  4. #4
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

    Default Re: Image Titles Support Thread

    sorry, i didn't understand before.
    So it is alwaysthe word BOXHEAD and the id of box?

    It was if is always word boxhead.

    Thank you very much

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

    Default Re: Image Titles Support Thread

    That is correct: boxhead-boxid.gif.

    boxhead-categories.gif,boxhead-search.gif, boxhead-manufacturers.gif...
    Last edited by gjh42; 31 Jan 2009 at 10:39 PM.

  6. #6
    Join Date
    Mar 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Image Titles Support Thread

    Let me see if I understand this correctly...

    This is the code in the tpl_box_default_left.php
    $title = (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $box_id . '.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $box_id . '.gif') : $title);
    if ($title_link) {
    if (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $box_id . '.gif')) {
    $title = '<a href="' . zen_href_link($title_link) . '">' . $title . '</a>';
    } else {
    $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
    }


    I viewed my source and this is what I found.
    <td id="navColumnOne" class="columnLeft" style="width: 150px">
    <div id="navColumnOneWrapper" style="width: 150px"><!--// bof: categories //-->
    <table width="150px" border="0" cellspacing="0" cellpadding="0" class="leftbox" id="categories-table">
    <tr class="leftboxheading" id="categories-heading-tr">
    <!-- Sidebox Header -->
    <td colspan="3" width="100%" class="leftboxheading" id="categories-heading-td">Products</td>
    </tr>
    <tr>

    In a previous post I read
    Change $title, '/boxhead-' and $box_id to fit the conditions. But that’s where I get confused. Is this even close to being right? I'm not sure what '/boxhead-' refers to.

    $categories = (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') : $categories);
    if ($categories_link) {
    if (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $ categories-heading-tr. ' boxhead-categories.gif ')) {
    $categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . '</a>';
    } else {
    $categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . BOX_HEADING_LINKS . '</a>';
    }

    Or am I so far off that you are chuckling at my attempt to make these edits. :)

  7. #7
    Join Date
    Mar 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Image Titles Support Thread

    $categories = (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') : $categories);
    if ($categories_link) {
    if (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $ categories-heading-tr. ' boxhead-categories.gif ')) {
    $categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . '</a>';
    } else {
    $categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . BOX_HEADING_LINKS . '</a>';
    }
    Is this code even close to being correct? If not, can someone assist me with the correct edits? Thanks!

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

    Default Re: Image Titles Support Thread

    You shouldn't need to edit tpl_categories.php to get Image Titles to work on the categories sidebox. Have you installed the mod files and created and named the image?

    <table width="150px" border="0" cellspacing="0" cellpadding="0" class="leftbox" id="categories-table">

    This indicates that you are using a very old version of Zen Cart (v1.2.x?), as v1.3.x doesn't use tables for most layout. It might also be a very old categories sidebox mod.
    I haven't tested Image Titles on v1.2 and don't know if it will work correctly. You really should upgrade if this is the case.
    Last edited by gjh42; 7 Mar 2009 at 09:09 PM.

 

 

Similar Threads

  1. v150 Image Handler 4 (for v1.5.x) Support Thread
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1687
    Last Post: 17 Nov 2024, 07:26 PM
  2. Rotating Image Slider [Support Thread]
    By picaflor-azul in forum All Other Contributions/Addons
    Replies: 21
    Last Post: 8 Jun 2018, 02:16 AM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. AJAX IMAGE Swapper support thread
    By jaycode in forum All Other Contributions/Addons
    Replies: 785
    Last Post: 13 Jan 2016, 11:48 PM
  5. Additional Image Titles [support]
    By gjh42 in forum All Other Contributions/Addons
    Replies: 67
    Last Post: 16 Sep 2011, 04:28 AM

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