Forums / Templates, Stylesheets, Page Layout / Can't Insert Image in Define Pages Editor

Can't Insert Image in Define Pages Editor

Views: 11,573

Results 1 to 20 of 31
28 Apr 2007, 9:06 PM
#1
neophyte2007 avatar

neophyte2007

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Can't Insert Image in Define Pages Editor

I've been trying to insert an image into my main page using define-main-page in the Define Pages Editor. To insert an image, it prompts you for a URL as the only option. The picture I want to insert resides on my local hard drive. How can I insert a .jpg, .gif, .png or other pictures? I tried to copy and paste directly into the editor pane, and that didn't work either. Please help. Thank you.

29 Apr 2007, 6:22 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't Insert Image in Define Pages Editor

upload this to your images folder and use your site/path to this image as the url

Zen-Venom Get Bitten

30 Apr 2007, 5:11 PM
#3
neophyte2007 avatar

neophyte2007

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

I've tried inserting an image in the URL text box by typing ftp://blah-blahblahyadahyadahyadah/images/etc where the file resides. It didn't work. Should it be an http file path? Please help me. Thank you.

2 May 2007, 12:16 AM
#5
neophyte2007 avatar

neophyte2007

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thank you so much for your help.

7 May 2007, 3:52 PM
#6
aurelieandrose avatar

aurelieandrose

New Zenner

Join Date:
Nov 2006
Posts:
3
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

This is what I am trying to do. Please can you tell me how to upload said image to the right location?

Many thanks.

8 May 2007, 12:53 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't Insert Image in Define Pages Editor

aurelieandrose,

When using the admin > tools > defines page editor > and selecting the html editor mode...
You can select the insert "image" icon and browse to the image on your local PC and it will upload it

Zen-Venom Get Bitten

8 May 2007, 9:29 PM
#8
aurelieandrose avatar

aurelieandrose

New Zenner

Join Date:
Nov 2006
Posts:
3
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thanks Kobra

I have tried but when I select the image icon it just asks me for the url of the image and I can't see how to browse to my pc from there.

Sorry if I am missing something really obvious! Neophyte's original question is exactly what my problem is but I don't have an images file to put them in!

9 May 2007, 1:30 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't Insert Image in Define Pages Editor

Where it asks for url enter http://your_site.com/images/your_image

Also FTP the image to the same location

Zen-Venom Get Bitten

22 May 2007, 3:38 PM
#10
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Please pardon the ignorance but what would be the address if i'm working on localhost? Nothing i try works!!! :no:

\includes\templates\MyTemplate\images\image.jpg

Sorry for the dumb question but it truley aint workin'.
and thank you in advance,

Arpeggio

23 May 2007, 6:36 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't Insert Image in Define Pages Editor

Please pardon the ignorance but what would be the address if i'm working on localhost?
If by this you mean a local XAMP install on your PC then it is something like:

file:///C:/XAMP/www/Zen1/images/sooty.jpg

You can get this by opening the file and selecting the file with a right click and open with then your browser and view the address in the browser bar

Zen-Venom Get Bitten

25 May 2007, 3:10 PM
#12
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thanks very much Kobra.

Unfortunately when i entered the URL as per the Browser's address:

file:///D:/Program%20Files/xampp/htdocs/Zen/images/MainPageImage.jpg

the image was ripped. and then didnt show on the catalog. (refer attached snapshot) (3 ripped image icons for the three times i tried using different variations on "Program Files".
*
file:///D:/Program Files/xampp/htdocs/Zen/images/MainPageImage.jpg

*forget the other one!!

i hope you can easily spot the problem. It's very strange though.

Thank you so much in advance.

25 May 2007, 5:46 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can't Insert Image in Define Pages Editor

After you enter this and get the 'ripped' image - mouse over it and right click > properties > and check that the address has not been altered by ZC....if so toggle to text mode and correct then toggle back to html mode

Zen-Venom Get Bitten

4 Jun 2007, 4:12 PM
#14
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thank you for this information Kobra.
Unfortunately it still didn't work

When I right click I could check the code:

<img src="file:///D:/Program%20Files/xampp/htdocs/Zen/images/MainPageCentre.jpg"><br>
<img src="file:///D:/MainPageCentre.jpg"><br>

The second line is where i put the image directly into D drive (no directory) just in case something was wrong with my path.

Unfortunately even that didn't work.
Both paths show "ripped images" in the editor and dont show up in the catalog.

But apart from the path what could it be?

I checked the Filename 10 times and it's correct.
File size is only 34kB.
The image size is within the width of the catalog width setting (in pixels) and i experimented with various size images but still no go.

Hmmm!! Any ideas? Appreciate any light you can possibly shed. arigato.

Arpeggio

4 Jun 2007, 4:23 PM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Can't Insert Image in Define Pages Editor

Since you are working on your local pc, the easiest way would probably be to just copy the image file from wherever it is to the ZC /images/ folder (using your pc's file manager window). Then you can enter the url of that location.
Caution: if you use absolute filepaths that reference your local computer directly in any way, the paths will break when you move your site to a remote server.

5 Jun 2007, 8:59 AM
#16
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thanks for this but that is what i did. I copied the image to 2 locations:

  1. zencart/ images location
  2. to my D drive root directory (no folders just in case there was even the slightest problem with the address)

Both addresses are posted in previous message. Also both methods did not work and showed "ripped images" in the HTML editor and no images on the catalog page.

5 Jun 2007, 2:34 PM
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Can't Insert Image in Define Pages Editor

Try this code: ```php

<?php echo '<img src="' . HTTP_SERVER . DIR_WS_CATALOG . 'images/MainPageCentre.jpg" alt=""> ```
6 Jun 2007, 12:07 PM
#18
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

Thank you Glenn.

Not knowing where i'm supposed to put this i tried:

\includes\templates\My_Template\common\tpl_main_page.php

please refer to attached.

I just got a parse error. I tried adding a bracket and stuff but couldn't get rid of this error.

some questions:

  1. do you know what is missing in the code
  2. is "tpl_main_page.php" the file you expect me to put it?
  3. I should just put this code in as is and do not need to substitute any words?

Thank you so much, and many regards,

arpeggio

6 Jun 2007, 12:15 PM
#19
arpeggio avatar

arpeggio

Zen Follower

Join Date:
Dec 2006
Location:
Tokyo, Melbourne, Shanghai
Posts:
102
Plugin Contributions:
0

Re: Can't Insert Image in Define Pages Editor

whoops!! forgot the attachment!!

6 Jun 2007, 5:44 PM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Can't Insert Image in Define Pages Editor

Oops! I left out the php closing bracket: ```php

<?php echo '<img src="' . HTTP_SERVER . DIR_WS_CATALOG . 'images/MainPageCentre.jpg" alt="">' ?>

And this points to your main /images/ directory.