The Snipplr WordPress Plugin
The Snipplr WordPress Plugin is great, since it allows you to place code snippets by typing in something as easy as [snippet=123], where the 123 is really your code’s Snipplr Id. You also get the option to display the code’s author, the code’s title, or even to toggle code highlighting.
If you’re a Standards Compliant maniac, like me, then you’d probably want to edit your snipplr.php file and search for the $source variable. Replace it with the following code:
Make Snipplr WordPress plugin output valid XHTML
Posted by rolandog on July 15th, 2006
You should edit your WordPress plugin so that the $source variable at the end shows this value. Though it is a shame that code can't have an 'ol' as a childNode, and neither can the pre element. Couldn't find any way of making it all fit: http://learningforlife.fsu.edu/webmaster/references/xhtml/tags/text/pre.cfm
-
$source = "</p><p>{$title}{$author}{$comment}</p><div class='code' style='border: 1px dotted; overflow: auto; white-space:nowrap;'>$source</div><p>";
-
-
/* You should also set, in your WordPress Stylesheet, a 'code' class:
-
.code {
-
font: 1.1em 'Courier New', Courier, Fixed;
-
text-align: left;
-
}
-
*/
Tyler Hall wrote:
Nice changes. I’m going to roll them into the plugin on the Snipplr website so everyone can take advantage of them. I’ll stick your name in the list of contributors, too
Posted on 15-Jul-06 at 5:48 pm | Permalink
rolandog wrote:
Hi Tyler. I’m honored to be in the list
I thank you for that.
Posted on 15-Jul-06 at 8:16 pm | Permalink
Braeden wrote:
What I want to do on my blog, is every few hours take the oldest post and move it to the
front of the queue, all automatically. Anyone know if there is a plugin that can do this or
a simple way to set up another plugin to do this (use my own feed perhaps)?
Thanks.
Posted on 12-Dec-06 at 12:30 pm | Permalink
Braeden wrote:
What I want to do on my blog, is every few hours take the oldest post and move it to the
front of the queue, all automatically. Anyone know if there is a plugin that can do this or
a simple way to set up another plugin to do this (use my own feed perhaps)?
Thanks.
Posted on 12-Dec-06 at 3:30 pm | Permalink