7 Nov
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. [
]
2 Responses for "Beautiful, now for some CSS magic."
Hey,
Excellent! I was looking for a syntax highlighting capability, and here it is.
Question: Are there any updates you could post that will make this work? It sort of works for me, but Textile is still in the way. It inserts <p> </p> tags at unfortunate positions. I can dive into this myself, but why do that if someone already went through that trouble
.
Thanks!
BTW: The links in he “toolbar” at the top of your blog only work from the main page. This is because “index.php” is a relative link.
Yeah, If you look back a few posts, I think I showed all the code changes needed. You need to get the newest textile code … and switch around a couple of values … actually, just get mine … use that for your textile (and have a look at my previous post for changes I made to b2vars.php)
Send a comment