Auto-tweet from WordPress with Petite URLs
Patrick at Deferred Procrastination has got la petite url working with a WordPress Twitter updater. This is a much-asked-for feature for la petite url itself.
Patrick at Deferred Procrastination has got la petite url working with a WordPress Twitter updater. This is a much-asked-for feature for la petite url itself.
The long wait is over, and la petite url version 2.0 is out the door. WordPress users with auto-update can update at-will, and users who haven’t installed it yet (what’s wrong with you?) can get it here. Major changes include: An awesome new options panel, much faster redirects, removing of the old registration for the new one, and a sidebar widget.
The new features allow users to post and read friends posts via Twitter clients such as Tweetie and Twitteriffic. This is very clever.
I’ve been getting this error in WordPress, so I wasn’t using the auto-update functionality, which is a real time-saver. My problem was that WordPress was trying to write to /tmp/
which is a no-no as my host (Segpub.net) uses Safe Mode. You can solve this issue by adding a couple of directives to your wp-config.php
file, namely WP_TEMP_DIR
. Adding these lines to wp-config.php
fixed the problem for me:
define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));
Thanks to the WordPress forums for my answer.
URLs will continue to function until 31 December 2009 and will then go dead. Yet another reason to use a self-hosted short URL service with a system like my own la petite url.
I’m working on a project that requires the use of WordPress functions (mainly creating users and such) outside of the WordPress installation. After some Google searches of varying specificity, I’ve found a method that appears to work for both WordPress and WordPress Mu. I’ve reproduced it here for my own purposes, as well as yours.
WordPress.org member oranfry posted the following helpful bit of code, to be inserted in the top of the wp-load.php
, right after the tag:
global $domain, $path, $base, $admin_page_hooks, $ajax_results, $all_links, $allowedposttags, $allowedtags, $authordata, $bgcolor, $cache_categories, $cache_lastcommentmodified, $cache_lastpostdate, $cache_lastpostmodified, $cache_userdata, $category_cache, $class, $comment, $comment_cache, $comment_count_cache, $commentdata, $current_user, $day, $debug, $descriptions, $error, $feeds, $id, $is_apache, $is_IIS, $is_macIE, $is_winIE, $l10n, $locale, $link, $m, $map, $max_num_pages, $menu, $mode, $month, $month_abbrev, $monthnum, $more, $multipage, $names, $newday, $numpages, $page, $page_cache, $paged, $pagenow, $pages, $parent_file, $preview, $previousday, $previousweekday, $plugin_page, $post, $post_cache, $post_default_category, $post_default_title, $post_meta_cache, $postc, $postdata, $posts, $posts_per_page, $previousday, $request, $result, $richedit, $single, $submenu, $table_prefix, $targets, $timedifference, $timestart, $timeend, $updated_timestamp, $urls, $user_ID, $user_email, $user_identity, $user_level, $user_login, $user_pass_md5, $user_url, $weekday, $weekday_abbrev, $weekday_initial, $withcomments, $wp, $wp_broken_themes, $wp_db_version, $wp_did_header, $wp_did_template_redirect, $wp_file_description, $wp_filter, $wp_importers, $wp_plugins, $wp_taxonomies, $wp_the_query, $wp_themes, $wp_object_cache, $wp_query, $wp_queries, $wp_rewrite, $wp_roles, $wp_similiesreplace, $wp_smiliessearch, $wp_version, $wpcommentspopupfile, $wpcommentsjavascript, $wpdb;
and in wp-settings.php
replace all replace all occurrences of =&
with =
. Then include wp-load.php
in your external file, and (in my case) wp-includes/registration.php
. You can now call WordPress functions such as wp_insert_user
.
As a big fan of telling people when they’re Doing It Wrong, I’m happy to announce Diggbarred. Diggbarred is a new plugin from myself and Shawn Medero, using John Gruber’s original blocking code in an easy-to-activate form. You can fork, modify, or otherwise mutilate the code on Github.