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 |
Jump to:
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
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
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
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
...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
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
@rob loach - this is the most brilliant module ever, the fact that it does HTML is stellar - gonna go and try this now!!
#7
Closing this out as it seems to be working and the ticket hasn't had any activity in a while.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.
#9
Can you explain how you added HTML tags? I get only text overriden.