Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Customized detailed images module want to prevent stripping of tags

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-16-2012, 06:46 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Customized detailed images module want to prevent stripping of tags

Hi,

I've been customizing the detailed images mod on a 4.4.5 build with some custom text fields, for which I'd like to be able to do some styling within but every time I apply changes the tags are stripped and only the plain text is saved.

Here's on example from my product_images_modify.tpl:

<td class="DataTable"><input type="text" size="32" name="image[{$images[image].imageid}][label]" value="{$images[image].label|strip_tags:false|escape}" style="width:100%" /></td>

Based on that I don't think the stripping is happening within this file but I'm not sure where to look. Does anyone have an idea where I might be able to control this so my custom fields don't get stripped of their stylings?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #2  
Old 04-16-2012, 11:10 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Customized detailed images module want to prevent stripping of tags

You have to add any fields that will contain html tags to trusted variables array - $trusted_post_variables
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 04-16-2012, 11:36 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Customized detailed images module want to prevent stripping of tags

I looked through several files but could only find that in a few (none had any effect though.)

Do you know which file I should be looking at?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #4  
Old 04-16-2012, 11:40 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Customized detailed images module want to prevent stripping of tags

This module may not have one if it was not needed. You can always add it to the php file used to save the detailed images info
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 04-16-2012, 11:48 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Customized detailed images module want to prevent stripping of tags

Thanks - I tried adding this code with my custom variables (which are working correctly):

define('USE_TRUSTED_POST_VARIABLES', true);
define('USE_TRUSTED_SCRIPT_VARS', true);

$trusted_post_variables = array(
'alt',
'label',
);

to modules/Detailed_Product_Images/config.php (as well as product_images_modify.php and product_images.php when that didn't work.) Unfortunately none of that did the trick either (cleared cache each time.)

Am I missing something maybe?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #6  
Old 04-16-2012, 12:23 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Customized detailed images module want to prevent stripping of tags

It has to be to the file saving that info the database
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 04-17-2012, 11:07 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Customized detailed images module want to prevent stripping of tags

I expect that the file is product_images_modify.php and product_images.php - but unfortunately that doesn't seem to be working. Is there a chance it might be another PHP file?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:33 AM.

   

 
X-Cart forums © 2001-2020