osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Easypopulate Wrecks my HTML

This is a discussion on Easypopulate Wrecks my HTML within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi guys, I did lots of Googling, searched this site and the OSC site before posting this, I know repeat ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 09-25-2005, 03:46 PM
New Member
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Arrgh
Default Easypopulate Wrecks my HTML

Hi guys, I did lots of Googling, searched this site and the OSC site before posting this, I know repeat questions are annoying.
After some struggles, I got EP to accept my text files. CHMODd the temp dir, added model numbers, etc.
But I have lots of html in the item descriptions (thanks to the great WYSIWYG editor) and it gets wrecked when imported via EP.
I turned off the "replace quotes" feature, and this causes it to hang up on ' marks during import. I tried search/replacing the ' marks with /', which still resulted in the same errors during upload.
Is there a rewrite/code change in easypopulate.php or something that will allow me to upload product descriptions with all my html intact?
Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 09-25-2005, 03:50 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,092
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Easypopulate Wrecks my HTML

You must replace single quotes with \' NOT /'

Backslash is the escape character not forwardslash...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-25-2005, 03:58 PM
New Member
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Arrgh
Default RE: Easypopulate Wrecks my HTML

Thank you! You're a saint to answer all these questions. I run a forum myself so I know how it can be.
Ok, so I ended up editing the easypopulate.php file, changing this:
Code:
$items[$i] = str_replace('\"\"',""",$items[$i]);
					if ($replace_quotes){
						$items[$i] = str_replace('\"',"&#34",$items[$i]);
						$items[$i] = str_replace("\'","&#39",$items[$i]);
					}
				} else { // no magic_quotes are on
					// check if the last character is a quote;
					// if it is, chop off the 1st and last character of the string.
					if (substr($items[$i],-1) == '"'){
						$items[$i] = substr($items[$i],1,strlen($items[$i])-2);
					}
					// now any remaining doubled double quotes should be converted to one doublequote
					$items[$i] = str_replace('""',"&#34",$items[$i]);
					if ($replace_quotes){
						$items[$i] = str_replace('"',"&#34",$items[$i]);
						$items[$i] = str_replace("'","&#39",$items[$i]);
to this (added a ; mark after the &#32 and &#34) -- even wrapped in the code tags, this forum is interpreting those strings into the actual " and ' characters

Code:
$items[$i] = str_replace('\"\"',""",$items[$i]);
					if ($replace_quotes){
						$items[$i] = str_replace('\"',""",$items[$i]);
						$items[$i] = str_replace("\'","'",$items[$i]);
					}
				} else { // no magic_quotes are on
					// check if the last character is a quote;
					// if it is, chop off the 1st and last character of the string.
					if (substr($items[$i],-1) == '"'){
						$items[$i] = substr($items[$i],1,strlen($items[$i])-2);
					}
					// now any remaining doubled double quotes should be converted to one doublequote
					$items[$i] = str_replace('""',""",$items[$i]);
					if ($replace_quotes){
						$items[$i] = str_replace('"',""",$items[$i]);
						$items[$i] = str_replace("'","'",$items[$i]);
So now the pages render with tables intact, etc, but images are broken. Right click/properties on a broken image gives me the image URL with a %22 tacked on the end (there are no %22 strings in easypopulate.php) like so:

Code:
http://www.deepstealth.com/store/images/atulips.jpg%22/
BUT viewing the source on the page shows the image url as having a #34 w/semicolon (again being rendered on this forum page as a space char below, although in the code it is the actual #34semicolon string)
Code:
<img width="230" hspace="10" height="153" alt="voice" src="../../../store/images/atulips.jpg"/>
So I'm stumped as to where the %22 is coming from, and why properties and viewsource give different info on the same image.[/code]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 09-30-2005, 08:30 AM
New Member
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Kyle_Bassett
Default Anyone figure this oue out yet?

I am wondering if Anyone figure this oue out yet?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Help with HTML & PHP OSCommerce genijan osCommerce 2.2 Modification Help 1 03-05-2005 10:54 AM
Really Simple HTML Help braydonhouse osCommerce 2.2 Modification Help 1 02-22-2004 07:25 AM
HTML in emails Anonymous osCMax v1.7 Discussion 8 12-05-2003 09:09 AM
HTML? West osCommerce 2.2 Modification Help 0 05-05-2003 04:28 PM
HTML Newsletter adrenalinez osCommerce 2.2 Modification Help 0 01-29-2003 10:16 PM


All times are GMT -8. The time now is 07:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax