| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Find and Replace Text | |
|---|---|
| Tweet Topic Started: Jul 12 2012, 02:24 PM (1,505 Views) | |
| Cory | Jul 12 2012, 02:24 PM Post #1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Code Name: Find and Replace Text What the code does: This is a simple snippet that is often requested that will allow you to change text across the board to whatever you'd like. How to use the code: Replace CURRENT_TEXT and NEW_TEXT as necessary. You may keep repeating the replace function to change other text selections, for example: How to install the code: Admin CP Themes Board Template Below the Board
Edited by Cory, Oct 30 2016, 12:23 AM.
|
![]() |
|
| Chaotic_Dreamer | Jul 12 2012, 07:00 PM Post #2 |
|
Member
![]() ![]() ![]()
|
Is there a way to make this code work with this code? Spoiler: click to toggle
|
![]() |
|
| Ferby | Jul 12 2012, 08:02 PM Post #3 |
![]()
Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Isnt this what the filter system does? |
![]() |
|
| hissae2-ZNR | Jul 12 2012, 10:36 PM Post #4 |
|
Member
![]() ![]() ![]()
|
When I added this code, the AIO money would show up twice and the shoutbox would no longer move to the top of the page. Judging by the above posts, it seems this does not work with many codes. Is there any way this could be fixed?
Edited by hissae2-ZNR, Jul 12 2012, 10:37 PM.
|
![]() |
|
| Cory | Jul 13 2012, 07:35 AM Post #5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have updated the code for an apparent better-working version that I found on Google. It shouldn't have the repeating content issue that the original version had. Ferby: The word filter only replaces words in posts, this will replace text selections everywhere across the board. |
![]() |
|
| Chaotic_Dreamer | Jul 16 2012, 07:44 PM Post #6 |
|
Member
![]() ![]() ![]()
|
Thank you so much it is working perfectly
|
![]() |
|
| Professor Jango | Jul 23 2012, 09:12 PM Post #7 |
![]()
Member
![]() ![]() ![]()
|
Will this work with BBCode? For instance, we changed URLs a while back and a lot of old links still use the old URL. Could I use this to change the text of the link while still leaving the forum or thread numbers the same? |
![]() |
|
| Cory | Jul 23 2012, 09:17 PM Post #8 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Sorry, it only matches text nodes, not HTML. You may be interested in this: http://stackoverflow.com/questions/3947911/replace-part-of-an-href-attribute-in-a-link-with-jquery |
![]() |
|
| Professor Jango | Jul 23 2012, 09:20 PM Post #9 |
![]()
Member
![]() ![]() ![]()
|
Thanks for your quick response. I'll check that option out. |
![]() |
|
| Ferby | Jul 29 2012, 01:41 PM Post #10 |
![]()
Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Is there a way you can make it work with HTML?
Edited by Ferby, Jul 29 2012, 05:43 PM.
|
![]() |
|
| Cory | Jul 31 2012, 10:45 PM Post #11 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I suggest a different approach if you are trying to replace HTML:
|
![]() |
|
| 0 users reading this topic | |
| « Previous Topic · ZetaBoards Codes & Modifications · Next Topic » |
| Track Topic · E-mail Topic |
2:54 PM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)
Themes




Is there any way this could be fixed?

2:54 PM Jul 11