EDIT I’m inserting an extra paragraph
Just to test if the textile stuff is misbehaving
Because I had an error report.
I’m releasing a new version of the WordPress Textile 2 plugin, as well as my own plugin for doing syntax highlighting with GeSHi. But I feel like I need to explain what’s going on, rather than just posting the downloads.
There are two big changes to the Textile 2 plugin. I’ve changed the way I’m distributing the plugin: instead of a single file, there are two, which must go together into a folder in your WordPress plugins directory. To simplify that I’ve packaged them as a .7z .tgz .zip which you can just unpack in the plugins folder. The reason for this change is that this allows me to distribute the unmodified classTextile.php from Dean Allen’s last textpattern release, and allows you the option of just replacing that file with the latest from the svn repository in the future.
I’ve changed the name to “TextileWrapper” to be more in line with what’s really going on. I want to make perfectly clear that I am not editing Textile at all this time. Any bugs with the way Textile work are Textile’s bugs, and should be filed via the Textile Homepage. Any bugs with the way it integrates into WordPress should be filed here. As far as the version number … Dean Allen has left Textile as “2.0 Beta” for a very long time, despite the fact that he’s on version 4.3 of Textpattern (which has been using Textile since the beggining). The internal revision number for the file has been divorced from actual revisions to Textile, because Subversion revision’s the whole project, so there’s nothing to go on there, either. At any rate, based on all that, I’ve decided to just call this version 2.8 as it’s really the next version of my “Textile 2” plugin, even though I’ve renamed it … and it really should work with any version of Textile since the first 2.0 Beta.
I finally came to my senses with this release and realized that the problem with code blocks is really not a Textile problem, but rather, a problem of the various syntax highlighters I’ve been using.
(more…)This post is just a test post, with some code, some Textile torture, and some embedded images so I can test some things. Please feel free to ignore it completely, unless you just want to see how well my blog handles torture.
Here’s some HTML code:
And here’s a little PHP code:
And there is some non-highlighted code. In-line: print( "this is not highlighted" );, and the first part of the Hammurabbi Code in block form:
1.
If any one ensnare another, putting a ban upon him, but he can not prove it, then he that ensnared him shall be put to death.
2.
If any one bring an accusation against a man, and the accused go to the river and leap into the river, if he sink in the river his accuser shall take possession of his house. But if the river prove that the accused is not guilty, and he escape unhurt, then he who had brought the accusation shall be put to death, while he who leaped into the river shall take possession of the house that had belonged to his accuser.
But hey, the whole point here is to just see what works and what doesn’t. Here’s more sample Textile:
This is some red text. Yeah. Just because I can. Actually, you probably don’t care, but it’s cool that I can highlight text using colors or styles.
This is a block quote. It’s in english. It’s more boring than Dean’s.
We should really have a list or two:
We can have multi-level lists:
This might look like one. But it probably isn’t, really. What on earth do I mean by that? Well, basically, you can embed HTML code, so as long as you don’t mind doing that, you can put your own paragraph breaks in wherever you like.
Of course, it looks a lot better if you put them in logical places, and it really screws things up if you forget to close them.
We can have mixed lists:
On the topic of inserting plain html, how about we insert an old-fashioned hypertext link? Thankfully, Textile’s clever enough not to muck about with the quote marks in the tags!
| this | is | a | header |
|---|---|---|---|
| this is | a | row | |
| this | is | another | row |
A stolen image:
With a link back, so it’s ok
(ooh, look,
my smilies work) ![[groupwoot]](http://HuddledMasses.org/wordpress/wp-content/plugins/smilingmasses/groupwoot.gif)
. That’s so fun
...
someday I’m going to package all of those up into a plugin for distribution
.
Some more text of dubious character. Here is a noisome string of CAPITAL letters. Here is something we want to emphasize.
That was a linebreak. And something to indicate strength. Of course I could still use my own HTML tags if I felt like it.
This is some code, "isn't it". Check out those quote marks! Now for some preformatted text:
$text = str_replace("<p>%::%</p>","",$text);
$text = str_replace("%::%</p>","",$text);
$text = str_replace("%::%","",$text);
Well, that’s enough of that.
Note: A newer version is available. Please see the category page for the latest.
Another release of Textile by Dean Allen in his blogging tool TextPattern 4.0 has prompted me to make another release of my pluing based on his work. This release is so much better than the last couple, that I really want to just call it Textile 3. I won’t though, because that would confuse everyone, including me.
At any rate, this release improves block handling, and the ‘notextile’ tag (or double equals) actually works as advertised ( *check out* this "textile":1 code that was _not_ converted! ). Actually, that example brings us to another new feature: You can move the URLs out of your code, (even for images) and refer to them by number.
This release is also a lot better about not screwing up when you insert html into your posts, so this, for instance was done with a pair of <b> tags instead of textile markup. That means that comments don’t get messed up, and there should be any problem, for instance, with the adwords plugin.
There are two versions: Textile 2.6 and Textile 2.6 for beautifiers ... the “for beautifiers” version is what I’m using, it removes Textile’s clean-up of <code> sections, so that I can use GeshiSyntaxColorer …
Just for a cool example of the neat stuff: (more…)
17 Mar
Spammers are despicable. Comment spammers are even more despicable. ![[diespam]](http://HuddledMasses.org/wordpress/wp-content/plugins/smilingmasses/diespam.gif)
OK, so … I got my second actual comment spam today … and it was much more of a pain than I had anticipated (of course, that’s mostly because I put together this post complaining about it instead of simply deleting the posts).
The worst part is, the domains are all registered through domainsbyproxy dot com, which I think is just fitting, considering the anonymous coward didn’t even provide a legitimate email address.
Anyway , do not, under any circumstances, shop at any of these despicable dealers:
(more…)Well, I think [
] I finally got all the kinks worked out of the combination of Textile + Beautifier + WordPress’s character replacement… I had to fix a regular expression or two in WordPress (they were actually wrong, it wasn’t just me, tweaking), and re-order a few lines of Textile code, and then force Textile (at mouse-point) to leave the stuff inside < code> blocks alone. And then, force Textile to leave the stuff inside < code> blocks alone again. 
The bad news is, I’m not sure I can keep track of the changes I made to b2functions.php so I can make them again after my next upgrade [
]
So now the problems is, since I’ve got it working, I feel like I need to show it off by posting some code here, but the only code I can think of at the moment is the code for Textile … (I’m not allowed to post the code (yet?) to my solution for my school project).
So, here’s the mungy line I had to add to the bottom of Textile’s untextile($text) method:
It’s pretty horrid, but it should work on versions of PHP back to PHP3 with varying degrees of success. That is, it works fine, even on old PHP, but it works a lot better if you have 4.3 or newer, and even better if you have multi-byte strings enabled. [
]
5 Nov
Well, in my continuing quest to have everything done for me by others, I have decided that I must have beautiful code and that it should happen even with textile turned on, the way it does on Moveable Type. I’m not sure whether I’ve accomplished that yet, but the only way to really find out is to post some code here [
]
Edit Actually, the worst part of this whole thing has been figuring out when WordPress adds all those horrid <br> tags to my post! That’s just wrong! (especially inside my < code > blocks). (more…)