Simple php code: http://weblogtoolscollection.com/b2-img/convertaccents.phps
[Continue Reading...]Simple php code: http://weblogtoolscollection.com/b2-img/convertaccents.phps
[Continue Reading...]Code fragment: $string =”%u4E2D%u56FD%u5E7B%u60F3%u6587%u5B66%u57FA%u573″; $new_string = utf8RawUrlDecode( $string); echo “encoded string is “.$new_string; function utf8RawUrlDecode ($source) { $decodedStr = ”; $pos = 0; $len = strlen ($source); while ($pos < $len) { $charAt = substr ($source, $pos, 1); if ($charAt == ‘%’) { $pos++; $charAt = substr ($source, $pos, 1); if ($charAt == ‘u’) { // we got a unicode character $pos++; $unicodeHexVal = substr ($source, $pos, 4); $unicode = hexdec ($unicodeHexVal); $entity = “&#”. $unicode . ‘;’; $decodedStr .= utf8_encode ($entity); $pos += 4; } else { // we have an escaped ascii character $hexVal = substr ($source, $pos, 2); $decodedStr .= chr (hexdec ($hexVal)); $pos += 2; } } else { $decodedStr .= $charAt; $pos++; } } return $decodedStr; }
[Continue Reading...]Adam of Idly.org has come up with his version of a linkblogger for WordPress. Since his switch, he has also come up with a few other useful fixes and migration tools from Movable Type to WordPress. He says that the LinkBlogger is still infant but workable and is, of course, a work in progress. Some of the salient features include – Import from MT linkblogs – ATOM feed – Various achive feed methods – Nested, unordered list output which can be tweaked Here is the link to WordPress LinkBlogger 1.0. While I am on the subject, welcome Adam, to the WordPress community.
[Continue Reading...]Curioso has come up with a very nice WordPress (1.2) plugin that allows the easy creation of galleries as posts. He calls this pug-in PictPress. An example of this can be found here. Once the bugs have been ironed out, I have asked if I could include this as an addition to Pictorialis.
[Continue Reading...]Unteins from the WordPress forums has come up with a way to use LJ tags in your WordPress blogs. From his post on the forums: If you’d like to be able to use LJ User tags in your WordPress Blog, do this. Download this file and save it in your WordPress root as wp-ljtags.php Then add these lines to you my-hacks.php file and make sure hacks are on. //WP LJ User Tage Parser require_once(‘wp-ljtags.php’); add_filter(‘the_content’, ‘parse_lj_tags’); add_filter(‘comment_text’, ‘parse_lj_tags’); This works really nicely with the Auto Update hack which let’s you post to your Word Press blog and LJ at the same time. Check out my additions to that hack as well. You can find his blog at G.B.A.A.O.
[Continue Reading...]I wanted to tinker with the socket capabilities of PHP and wrote some small scripts to support automatic blogging of IRC conversations. It turned out pretty well after a few changes and issues that needed to be resolved. Here are the results. The likely suspect is the #wordpress channel on irc.freenode.net where developers, contributors as well as helpful friendly folk hang out often. All of the conversations from that channel are now blogged to http://proc.homeip.net/wordpress/ This is merely an experiment and if there are major objections to this process, this blog will be removed. Some of the salient features of this include automatic blogging using xmlrpc. The script does not have to reside on the webhost machine. It is extremely fast and very configurable. At this time, every peice of conversation from every user is blogged as a seperate entry with the topic of the entry as the username of […]
[Continue Reading...]I am not a big proponent of advertising on blogs, especially the big flashy ones which have moving pictures and other stupid animation. However, I have found that Google and a few other sites provide a very nice and hassle free text ad service that can generate a few bucks for the owner of the blog. As you can see on this blog, I use Google and am very happy with the results. I know that Amaxon has a similar service. I think a list of blog advertising services might help a user choose their poison. So here is list from my experience. If you know of any others that you use or would like to suggest, please leave a comment. – Google AdSense – BlogAds.com – TextAds.biz – BlogSnob – Amazon Ads
[Continue Reading...]I stumbled upon something yesterday that I thought could be really useful, at least to me. Many people have suggested and explored the idea of XHTML syndication. Some have come from big names such as Anil Dash and Tantek. However, there is very little implementation. If every blog/CMS could have its own link for a file that spits out formatted XHTML code, life would be easier. For example, if I wanted to provide a little feed of my weblogtoolscollection, I would simply include a file from that blog that would spit out pre-formatted, pre determined code. No messing with XML, no tags to worry about or feeds to validate and then parse. The div tags etc could be defined in simple, easy to understand terms and would allow simple CSS formatting as well. A couple of different methods could be used to generate and then serve the file. WordPress could […]
[Continue Reading...]Kses are a set of PHP scripts written by Ulf which removes all unwanted HTML elements and attributes, and it also does several checks on attribute values. kses can be used to avoid Cross-Site Scripting (XSS), Buffer Overflows and Denial of Service attacks I have modified the original kses distribution scripts to allow the checking of allowed HTML tags. This code will fill in incomplete or incorrectly nested HTML/XHTML tags as well. I am working towards coding an HTML filter and validator and this is the first step. Future enhancements include checking and correction of validitity according to the doc-type mentioned in the HEAD etc. For now, here is the link to the modified kses.php file. For WordPress users, you can simply download this file, rename it to kses.php and upload it to the wp-includes directory of your WordPress installation. For all other uses, please follow the directions inside the […]
[Continue Reading...]Obviously Powered by WordPress. © 2003-2013