Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    289
    Plugin Contributions
    0

    Default Image paths in language files

    Hi, I did do a search for help with this, but couldn't find what i was after, so...

    In the language files (i have created overrides), e.g. 'mytemplate/english.php' my image source (path) code looks like this:

    Code:
     
    // categories box text in sideboxes/categories.php
      define('BOX_HEADING_CATEGORIES', '<img src="http://www.logo-golfballs.co.uk/shop/includes/templates/future_zen/images/head-categories-left.gif" alt="Categories" vspace="4"/>');
    Is there a better way of doing this?

    The problem with this is that if i want to use the template again I have to go through and change all the paths (to reflect a different URL).

    I am probably doing this completely wrong, so advice would be appreciated.

    Also, i could then submit one of my templates as a contribution if i xould get this sorted (and a few other little tweaks)

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Image paths in language files

    Use the relative path instead of the Absolute path. (you should do this anyway because of issues with SSL)

    Instead of http://www.MY_SITE.com/includes/images/my_image.gif

    use: /includes/images/my_image.gif
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

 

 

Similar Threads

  1. What About Image url Paths??
    By perkiekat in forum General Questions
    Replies: 4
    Last Post: 25 Oct 2009, 09:05 PM
  2. Absolute image paths
    By restless in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Nov 2007, 05:15 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