Comments Fixer (admin extension)
This is an admin extension that helps you to fix problems with comments (e.g. converting old style <br /> formatting to <p></p>).
Download
Current features (version 0.1, released July 2006):
- Detection of old style <br /> formatting in comments
- Tool for converting old style comment markup to use <p></p>
- Additional facility during conversion for picking out problematical characters (typically special-case entities) and replacing them (see note)
Note: Problem Character Entities
I found a problem in some of my older comments with a series of characters that PHP was getting
confused and displaying as “â??”. The ASCII
character codes for this series came out were 226, 128 and 153. Textpattern will actually render this series of characters correctly, as an
apostrophe (or single right quote as used in textpattern). However, I created a fix for this that grabs those characters in any old style comment
(chr(226).chr(128).chr(153)) and replaces it with the character entity that should have been there. In this case, that was an apostrophe, for
which textpattern uses the entity ’.
Usage
- Download and install the plugin code (can copy and paste directly into textpattern's "Install plugin" box and hit "Upload").
- Activate the plugin by clicking where it says "no" next to the Comments Fixer in your plugin listings.
- The plugin will not appear as the extensions tab is disabled when in the plugins tab. Leave the plugins tab and select the extensions tab.
- If you're not already there, select the Comments Fixer tab.
- You are advised to make a backup of your textpattern database before attempting to use any of the tools in this plugin.
- You will be told how many comments with old style formatting have been detected.
- You may browse those comments by hitting "browse old style comments".
- In the comments browser, you may use the Toggle link to display the proposed converted comments. Only run the "Fix Old
Style Comments" tool on the main Comments Fixer page if you are happy with these conversions. There is currently no way to
select which comments are converted.
- You can run a fix on the comments with old style formatting from the main Comments Fixer page. Check the box in the tool if you want the tool
to show details of the conversions during the fix process. Hit the "Fix Old Style Comments" button to run the fix. If any of the comments fail,
you will be able to check through those comments in the comments browser to see if you can locate the problem.
- There is also some details about half way through the plugin code that will help you to locate problem character entities and set up fixes for
those problems that will be used when you run the fix process. You should be able to follow the comments to do this.
Download
Download: dtj_comments_fixer version 0.1