Can string overrides replace html?

erniem - May 25, 2008 - 19:36
Project:String Overrides
Version:6.x-1.3
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I'd like to find and replace a bit of HTML code, but I'm not sure if HTML is passed through (t), or if only displayed text is.

For example: I'd like to find all instances of this HTML code

and change it to this:

If String Overrides will find/replace HTML, will it consider bits of code like this to be strings?

If String Overrides won't work for this, please let me know how you'd suggest I make this change throughout my Drupal 5.6 site. Thanks!

#1

erniem - May 25, 2008 - 19:41

oops. forgot code tags above.

For example: I'd like to find all instances of this HTML code

<td><p class="bodytext">

and change it to this:

<td class="name-info"><p class="bodytext">

#2

btopro - May 29, 2008 - 17:21

I wrote a module to do a true search and replace of node content based on type if that's what you're looking for. http://drupal.org/project/search_and_replace

I think this module's more for altering dynamically produced text/strings.

#3

Rob Loach - May 29, 2008 - 22:22

It sounds like you're looking for something in the themeing layer. One thing you could do is play with Drupal 6's Devel Theme module and see what functions you could use to override the theme output for that table.

#4

zilla - November 17, 2008 - 14:40

...but could string overrides put html into a string replacement? example: i'm using content profile module, it adds a small bit of dynamic text to user profile that says "create a (whatever admin calls the content profile node" - i'd like to insert a small image in front of that, an icon, so it's like:
img src=image.png ...followed by text "create a ..."

#5

Rob Loach - November 17, 2008 - 17:19

Yup! Since the translation is just placed directly onto the page, you can place in as much HTML as you want. I've replaced a single thank you note on site with a full HTML thank you page with graphics before....

#6

zilla - November 17, 2008 - 18:44

@rob loach - this is the most brilliant module ever, the fact that it does HTML is stellar - gonna go and try this now!!

#7

geodaniel - February 3, 2009 - 11:08
Status:active» fixed

Closing this out as it seems to be working and the ticket hasn't had any activity in a while.

#8

System Message - February 17, 2009 - 11:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

yoeld - July 6, 2009 - 06:07
Version:5.x-1.6» 6.x-1.3
Component:Miscellaneous» User interface

Can you explain how you added HTML tags? I get only text overriden.

 
 

Drupal is a registered trademark of Dries Buytaert.