"Murphy was an optimist!"
Today’s magic trick July 2, 2015 12:03 pm
Posted by Doug McCaughan in : Programming, Software, Technology, WordPressToday, I make Caldera Forms export to Excel.
add a commentA blogger blogs, always August 16, 2013 3:16 pm
Posted by Doug McCaughan in : Communications, Philosophy, Software, Technology, WordPressA writer who waits for ideal conditions under which to work will die without putting a word on paper.
– Kurt Vonnegut
Sometimes I hear people say, "blogging is dead" or "I don’t get any visitors anymore" or "no one reads this anymore." I’ve said it myself. My wife has said it. My blogging friends have said it. My blogging friends who no longer blog have said it and committed blogicide.
Visitors, comments, stats…none of it matters. Write! Writing matters.
add a commentA blogger blogs, always August 8, 2013 10:24 am
Posted by Doug McCaughan in : Communications, Technology, WordPressWordPress 3.4 limited to 90 menu items June 19, 2012 9:26 am
Posted by Doug McCaughan in : MySQL, PHP, Programming, Software, Technology, WordPressI’m working on a WordPress site. The site is to have roughly 106 pages all accessible via the WordPress menu system so that the enduser can add and remove pages from the menu as they like. Unfortunately, WordPress currently only allows 90 nodes (ie. 90 menu items) per menu. I have not figured out if this is a memory limitation, a hard coded limitation, or a setting yet. This must be overcome!
Reference:
Possible solutions:
- Use add descendants as submenu items plugin
- Check error logs and make sure max post vars was not exceeded. If so, increase in either .htaccess or php.ini
- See if suhosin.post.max_vars and suhosin.request.max_vars are used with Dreamhost
Changing the behavior of WordPress’ Publish button June 16, 2012 11:07 am
Posted by Doug McCaughan in : Programming, Software, Technology, WordPressA long unrealized goal of mine has been to change the behavior of WordPress’ publish button when adding a new post. Today, I’ll spend a little time examining the underlying code.
obert- and pixolin in Freenode’s #wordpress gave me good pointers to the WordPress forum and the WordPress hook directory.
I narrowed it down to two functions: wp_insert_post() and wp_publish_post(). Turns out that the correct function is wp_insert_post(). The only thing that wp_publish_post() does is to transition the status. Looks like I should be able to alter wp_insert_post() in my functions.php file and achieve my goal.
Got it!
Relevant references:
- codex wp_insert_post_data
- wp_insert_post hook for a wordpress plugin
- wp_insert_post with POST data
- Codex wp_insert_post
- codex developer documentation
- Codex pluggable functions
- How to add days weeks months to any date
WordPress Hooks, Actions and Filters – Modifying the Publish function January 4, 2012 10:38 am
Posted by Doug McCaughan in : Blog, Communications, PHP, Programming, Publishing, Software, Technology, WordPressI’m writing a child theme to twentyeleven and want to modify the administrative post "Publish" function to do some additional processing during the saving of a new post. Does anyone know if there is a hook, action or filter that will allow me to extend the Publish function?
add a commentCall to action: WordPress Developers Please Comment February 17, 2011 9:33 am
Posted by Doug McCaughan in : PHP, Programming, Software, Technology, WordPressHello WordPress developers! (me included). When you make a theme, I implore you, please use a simple html comment at the top of each page to identify the template. For example: <!- – TEMPLATE: single.php – -> would allow someone unfamiliar with your theme to look in the generated source and see which template(s) are influencing the output. Yes, experienced WordPress developers should already know which files are being used but we don’t write themes only for experienced developers. And even experienced developers get stuck, tired, or would like things to be sped along and a simple comment, <!- – TEMPLATE: page.php – ->, would help tremendously. Thank you!
add a commentWordPress 2.9 has arrived December 19, 2009 8:46 am
Posted by Doug McCaughan in : Announcements, Blog, Of Interest, Publishing, Software, Technology, WordPressWordPress 2.9 includes built-in image editing and now videos can be embedded simply by putting the url of the video on its own line in the post with Oembed support and more. Update your WordPress blog soon.
https://videopress.com/v/wp-content/plugins/video/flvplayer.swf?ver=1.11
[Source]
add a commentWibiya Toolbar Not Showing on WordPress Blog November 20, 2009 11:47 am
Posted by Doug McCaughan in : Blog, Publishing, Software, Technology, WordPressIf you are trying to use the Wibiya Toolbar on your WordPress blog, but it will not appear, try editing the Wibiya plugin and changing the code from:
add_action(‘get_footer’, ‘filter_footer’);
to:
add_action(‘wp_footer’, ‘filter_footer’);
Cannot log into WordPress from Google Chrome November 12, 2009 9:27 am
Posted by Doug McCaughan in : Software, Technology, WordPressIf you go to your WordPress blog’s login page in the Google Chrome browser, type your username and password, and get kicked back to the login screen without an error message, try opening a new tab and logging in from that tab. Seemed to work for me. I also cleared my cache but that did not seem to have an impact. The new tab fixed the problem for me.
1 comment so farWordPress 2.8.3 broken! Upgrade to 2.8.4 immediately! August 13, 2009 7:11 am
Posted by Doug McCaughan in : Blog, Publishing, Security, Software, Technology, WordPressIn case you missed it, WordPress 2.8.3 has a programming error which allows anyone to reset your administrative password and takeover your WordPress blog. With administrative access, the hacker could destroy your content, lock you out, and repurpose your website for wrong doing, spamming, pornography, slander, or whatever they want. Upgrade to WordPress 2.8.4 immediately! Learn more at darknet.org.uk.
This vulnerability could be prevented by securing the /wp-admin directory.
BlogSecurity has recommended before that the /wp-admin/* directory should be password protected or restricted to IP address. This would mitigate this problem. See our advisory here for details. [Source, BlogSecurity, WordPress <= 2.8.3 Reset Admin Password Vulnerability]
See details of the exploit at milw0rm.
add a commentWordPress 2.8.3 upgrade bizarreness August 11, 2009 8:14 pm
Posted by Doug McCaughan in : Software, Technology, WordPressI decided to take some time to make sure that all of our blogs and websites relying on WordPress were brought up to version 2.8.3. Everything seemed to be going well until we started testing Cathy’s blog Domestic Psychology. She can post but cannot add tags. Categories work find but clicking in the "Add new tag" tag box acts like it is disabled. She can type words in the box but the Add button does not function. Tags do not get saved to the post.
So I jump over to Reality Me to see if it exhibits the same behavior. On Reality Me, I can create a post with tags with no problem. But on the dashboard under Incoming Links, Plugins, and WordPress Development Blog, I get a fatal error:
Fatal error: Please call SimplePie_Cache::create() instead of the constructor in /home/www/htdocs/realityme_net/wp-includes/class-feed.php on line 13
I have not tested the other blogs and sites yet. For both Reality Me and Domestic Psychology, I went back and deleted almost all files with the exception of the wp-content directory, the robots.txt, and the .htaccess. I rebuilt the WordPress installation and yes cache directories were removed. WP-Cache is not used. I also repaired and optimized all database tables. Active plugins on Reality Me: Audio Player, Seesmic, ShareThis, SimpleLife, Spam Karma 2, Subscribe to Comments, WordPress.com Stats, and WordPress XHTML Validator. Active plugins on Domestic Psychology: Audio player, Get Recent Comments, Lifestream, ShareThis, Spam Karma 2, Subscribe to Comments, and WordPress.com Stats.
In typing this, I realize that the SimpleLife plugin uses SimplePie and is likely to be the root cause for the Reality Me problem.
Update: Deactivating SimpleLife fixed the Reality Me problem.
Update: Disabling all plugins on Domestic Psychology did not change the fact that Post Tags could not be added to to the post.
Update: I’ve narrowed it down to Cathy’s theme. None of the active plugins on Domesticp Psychology are causing the problem. She is using a Woo theme called irresistible. Disabling this theme fixes lets her use tags with posts again. Time to see if Woo Themes has posted a fix. Yes. irrestible 2.0.0 fixes the post tag problem.
2commentsShareThis WordPress Plugin Broken – Easy Fix! April 6, 2009 1:15 pm
Posted by Doug McCaughan in : Of Interest, Philosophy, Politics, Programming, Software, Technology, WordPressI recently added a ShareThis link to each of my posts. I chose ShareThis.com because it seems to be very robust while leaving a relatively small footprint on the blog and appears relatively unintrusiveness and benign. Of course, some folks will be quick to point out that the tracking features and having the icon linked back to sharethis.com is very intrusive and anything but benign. In this instance, I don’t see it as that big a deal. One of the attractions to ShareThis.com was its WordPress plugin making setup as easy as going to the website to generate the widget code, then inserting that code in the settings box on the admin screen in your WordPress blog. But it didn’t work.
At ShareThis.com, a publisher generates a script that looks like this:
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&type=wordpress&embeds=true&post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&headerTitle=Thank%20you%20for%20sharing!"></script>
After updating, the code will have a 2nd publisher id appended to the end. With two publisher ids, ShareThis will not register your site nor collect statistics.
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&type=wordpress&embeds=true&post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&headerTitle=Thank%20you%20for%20sharing!&publisher=a1b2c3d4-ijkl-mnop-qrst-u4w2y10a2r4d"></script>
After reviewing the plugin code, I realized the way ShareThis generates the script must have changed overtime. Crowd Favorite wrote a great plug-in but it expects the publisher=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx to be at very end and if it does not find a publisher id at the end, it puts one there which is why you will end up with two publisher ids. To fix this, simply move the publisher id to the end of the script before pasting the code into the ShareThis settings box in the WordPress admin:
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#type=wordpress&embeds=true&post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&headerTitle=Thank%20you%20for%20sharing!&publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345"></script>
Note: In the settings box, the & will be converted to just & but the code correctly uses & with the post. Your code will still be xhtml compliant.
1 comment so farSpam Karma open source or die die die July 23, 2008 10:06 am
Posted by Doug McCaughan in : Programming, Software, Technology, WordPressIn case you missed the announcement, Dave who developed Spam Karma is no longer going to make changes or update the code. Instead he has released it as GPL v.2 and created a Google Code repository in hopes that some talented people will pickup where we he leaving off. I wonder if we Spam Karma users had actually donated money toward his efforts if he would have continued.
Spam Karma puts Akismet and other spam fighting tools to shame. I think in all the time I have been using Spam Karma, I have had only one false positive. I get false negatives on trackbacks but that is because it was only recently that I realized I could change the settings for how Spam Karma handles trackbacks so I’m still making adjustments.
I also found Dave’s comments on a WordPress replacement very interesting. Specifically he notes, "If you look at it, blog systems are over 10 year old now. Their UI have barely evolved since the first versions. … There is a bad need for a groundbreaking platform that would get rid of ten years of accumulated UI habits."
add a commentCutting a plugin loose – Goodbye WP-Project June 23, 2008 10:24 pm
Posted by Doug McCaughan in : Programming, Software, Technology, WordPressI liked the concept of WP-Project. It’s a WordPress plugin which adds a tab in your dashboard for project management. It was inspired by Basecamp (collaboration piece for project management) and Harvest(er) (a timetracker). Conceptually we like to spend a lot of time in our dashboards so why not do our project management there too? I just didn’t find the plugin robust enough for my needs. And if it was robust enough, I’d be concerned that my database, which already has issues with Spam Karma eating its space, would fillup too quickly. (n.b. The database has a 100MB allocation.) For now, I’m going to try out Zoho’s project management.
2comments