Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Image uploads in HTMLArea

    I'm not sure how to make this happen: I want to be able to upload images to the server when I work with product descriptions and editing pages. On one of my Zen sites, the image manager pops up when you click insert image and gives you an interface for uploading your image, then you click on the image and select it, set the alignment and parameters, etc. But for some reason on one of my Zen sites, the same editor only displays a window that lets me choose an already uploaded image by typing in the URL (which is a total pain). How do I get the editor to give me the right image manager?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Image uploads in HTMLArea

    If you use HTMLArea to configure html formatting for your product descriptions, you can (as with ANY HTML page) embed links to images - and indeed other types of content.

    To make images "visible", the browser needs to know "where they are" on the internet.

    For the most part, the images you use will be on your server - in a named directory - and there will be a PATH to that directory.

    Heres a simple example:
    <img src="http://www.mywebsite.co.uk/shop/images/image_1.jpg">

    All you have to do is:-

    1. FTP your images to an appropriate directory on a server linked to the internet.
    2. Specify the PATH to that image when you want it to show up in your product description text.

    NB: The PATH could be absolute - in other words, the FULL http://www.mywebsite.co.uk/shop/images/image_1.jpg

    Bear in mind that this may invoke the SSL warning that the page contains both secure and insecure elements because the path to the image.

    Zencart cobbles all pages from various templates and data sources, but also puts into the <HEAD> section of every page, the BASE HREF, which is equal to the root directory of your webshop.

    As this BASE HREF governs all internal hyperlinks, you could simply FTP images to your IMAGES folder, and create links such as:
    <img src="images/image1.jpg">
    and the BASE HREF will ensure that the path is fulfilled.

    HOWEVER...

    I have noticed sometimes that if we use the <img src="images/images1.jpg"> format, then later recall the product to re-edit the text at a later stage, it will strip in the word "admin/" infront of "images/" for some reason:-

    So, where we started with
    <img src="images/image1.jpg>

    We sometimes find
    <img src="admin/images/image1.jpg>
    being thrown back at us when we recall the text for later editing.

    This may be due to the fact that HTMLArea works within the ADMIN directory of the store, and it assumes that if you are talking about the images folder, then you are talking about the images folder that sits in ADMIN.

    Two ways to get round this...

    1. Put a COPY of your required images into ADMIN/IMAGES (in addition to the IMAGES folder in the shop's root directory;
    2. Edit out the ADMIN by toggling to the HTML code in HTMLArea, returning the link to <img src="images/image1.jpg">

    I tend to use option 1 above - then I know that if I miss a <img src> link that still points to "admin", the image will still show, as there's a copy of the required image there too.
    20 years a Zencart User

 

 

Similar Threads

  1. Image Uploads - Add Customers Surname to Image Filename?
    By philmoulds in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 6 Oct 2008, 10:33 AM
  2. FCKEditor Image uploads
    By ghgarcia in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 26 Oct 2006, 02:57 PM
  3. image uploads
    By allprowebmaster in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Aug 2006, 11:44 PM

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