![]() |
Trying to insert image into welcome txt
Help...I am trying to insert an image into my welcome text and used the WYSIWYG editor in Webmaster Mode. I searched through threads regarding this and as best I can tell I've got the code correct. The image is in my skin1/images directory, but all I can get is a red x instead of the image.
Here is my code <img alt="chef" src="<img src=" align="left" border="0" chef_th.jpg? {$ImagesDir} />Demo store powered by X-Cart. Based on PHP template technology and integrated with an SQL database, it is a fully functional store that allows you to try <a href="<A href="http://www.x-cart.com/">X-Cart">http://www.x-cart.com/">X-Cart shopping cart software</a>. As a buyer, you can browse products, put products into your cart and check out. As an administrator, you can add categories, products and change the look and feel of the store. If you have any questions please contact us. <p align="justify"><b>This service is for demo purposes only.</b> No real products. No real prices. No real charges. Please do not submit real credit card information.</p> <p align="justify">To replace this text with a welcome message of your own, log in as administrator, select the Webmaster mode link in the Administration box, then follow the instructions.</p> |
Re: Trying to insert image into welcome txt
change
Code:
<img src=" align="left" border="0" chef_th.jpg? {$ImagesDir} /> Code:
<img src="{$ImagesDir}\chef_th.jpg" align="left" border="0" /> |
Re: Trying to insert image into welcome txt
I made the change you gave me and am still getting a red x instead of the image
|
Re: Trying to insert image into welcome txt
You have this:
src="<img src=" align="left" border="0" chef_th.jpg? {$ImagesDir} /> You need this: <img src="{$ImagesDir}/chef_th.jpg" align="left" border="0" alt="" /> |
Re: Trying to insert image into welcome txt
Sorry for being such a pest, but I must be missing something. Balinor I cut and pasted your code and still get the red x. Here is the code I pasted:
<img src="{$ImagesDir}/chef_th.jpg" align="left" border="0" alt="" /> Demo store powered by X-Cart. Based on PHP template technology and integrated with an SQL etc |
Re: Trying to insert image into welcome txt
Did you upload the image into the skin1/images folder?
|
Re: Trying to insert image into welcome txt
yes. I doubled checked to make sure it is there under the same filename.
|
Re: Trying to insert image into welcome txt
one more go...
replace <img alt="chef" src="<img src=" align="left" border="0" chef_th.jpg? {$ImagesDir} /> with <img alt="chef" src="{$ImagesDir}/chef_th.jpg" align="left" border="0" /> |
Re: Trying to insert image into welcome txt
Alas...no that one didn't work either inebriate.
|
Re: Trying to insert image into welcome txt
Something is not right, as that code is correct. Make sure the file name matches exactly (chef_th.jpg and Chef_th.jpg are not the same thing).
|
Re: Trying to insert image into welcome txt
Quote:
The name is correct. I even tried inserting other files from the images directory. None of them will load. No matter what the file, I get the red x. |
Re: Trying to insert image into welcome txt
Right click on the red x and see what the url of the image is.
|
Re: Trying to insert image into welcome txt
Also there are a few older imaging software programs that will make the ext in caps. such as file.JPG instead of file.jpg
|
Re: Trying to insert image into welcome txt
Quote:
http://www.cheesecakefanatic.com/xcart4.1.7/{$ImagesDir}/chef_th.jpg url checks out correctly |
Re: Trying to insert image into welcome txt
Actually, no it doesn't...you shouldn't be seeing {$ImagesDir}, that should translate to the directory.
|
Re: Trying to insert image into welcome txt
Quote:
So what do I do about this? |
Re: Trying to insert image into welcome txt
What are you using to edit the code?
|
Re: Trying to insert image into welcome txt
I use Webmaster mode and Dreamweaver
|
Re: Trying to insert image into welcome txt
Ok, one or both of those could be screwing you up. Dreamweaver doesn't understand Smarty code, and Webmaster Mode is really meant for editing text, not adding code. Open up the language variable directly via your "Languages" area and insert the code there.
|
Re: Trying to insert image into welcome txt
I am trying to get this to work as well. Right now I have all of my "extra" images on Photobucket because I could just copy their link & it worked great. I am now trying to have everything in my directory the way it should be =). My images are in this folder: /var/www/html/skin1/images/thumbnails when I access my FTP.
I put the image I need into that folder & then typed in this code: <img alt="Available Clasps" src="{$ImagesDir}/clasptype.jpg" align="left" border="0" /> I get a box labelled "Available Clasps" with a red x. What am I doing wrong? |
Re: Trying to insert image into welcome txt
I would check if the image would appear in IE or Firefox by typing the exact location for the file and see if it comes up...
|
Re: Trying to insert image into welcome txt
If you want to avoid hand editing welcome.txt and other elements on your front page you might want to take a look at our featured product manager for x-cart:
Take a look at our frontpage on http://www.firetanksoftware.com/ for example, everything including products, images, sidebars etc are controlled easily from our add one Heres an example from a site running our featured product manager, everything in the RED boxes is controlled by out add on, and all you have to do to install it is add a few smarty tags where you want things to appear, it completely replaces x-carts front page in just a few minutes, and you can change the appearance from the admin add on easliy. http://www.firetanksoftware.com/fts/files/screenshots/fts_fpm_screen2.gif For more information and examples please visit our site: http://www.firetanksoftware.com/fts/customer/-pid-146.html This add on does not require you to hack up any of the core x-cart php files or database, it works cleanly and does not affect x-cart upgrades. It works with x-cart 3.X, 4.X and 4.1.X branches |
Re: Trying to insert image into welcome txt
have you tried WYSIWYG mode, clicked on insert image and typed out the whole http: locations?
i.e. http://www.sitename.com/skin1/images/filename.jpg I have yet to have a problem when doing it in this manner. Hope this helps! |
Re: Trying to insert image into welcome txt
I don't recommend that method GLS. All images should be called using the Smarty variable for the images directory, or as I had mentioned above. If someone happens to be in secure mode, hard coding images will cause a security warning.
|
Re: Trying to insert image into welcome txt
Quote:
OK-I tried this & the image did not come up, so I must be putting the file information in wrong. Can someone tell me what the pathname should be? To clarify, I need to know how to do this to add pictures within my product listings, my static pages, my welcome page--everywhere. This is about general ignorance on my part, rather than a welcome page issue =). I just hopped onto this thread because the OP was asking the same question. Right now I have the pictures I need up but they are "living" in Photobucket & I don't want to keep doing that & have a disaster if they ever go down, out of business, etc. For this example, the file is named "clasptype.jpg" . The directory it is stored in is called "/var/www/html/skin1/images/thumbnails" . What should I put in for the code? |
Re: Trying to insert image into welcome txt
Same issue here -
As illustrated in this thread -suggested fix doesn't work. However going into the admin languages mod and editing the window there with this: (specific to MY store path) <img alt="" src="/shopsam/skin1/images/50-logo2.gif" border="0" /><br /> it does work - Any explanation? FX Designer |
Re: Trying to insert image into welcome txt
Few! managed to sort this out after a bit of head scratching.
By default xcart doesn't parse smarty within language variables. You can turn on the option to parse smarty in static pages in the admin>static pages but for some reason not language variables. Anyhow, I did a search for ImagesDir in the languages and low and behold: txt_vbv_admin_note uses <img src="{{ImagesDir}}/vbv_pure_logo.gif" alt="" /> I searched for this string and it is in a few files along with the smarty code: {$lng.txt_vbv_admin_note|substitute:"ImagesDir":$I magesDir} So just go to skin1/customer/main/welcome.tpl and change: {$lng.txt_welcome} to {$lng.txt_welcome|substitute:"ImagesDir":$ImagesDi r} (without the spaces - not sure why these are coming up?) then in your welcome_txt variable use {{ImagesDir}} in place of skin1/images/ I am not sure if there are any security issues but I am sure one of the guru's can answer this. |
All times are GMT -8. The time now is 11:48 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.