WordPress Plugin Repository
So a looooong time ago, I released my first WordPress plugin – expandable jQuery comment replies. I’ve been remiss in keeping it updated – it was written for WP 2.7, and here we are, almost on 3.1. So when I released by Back End Instructions plugin, I decided perhaps I should be a good girl and update my old plugin.
Updating it locally wasn’t an issue. however, updating the repository…. that’s a different story.
I don’t use Terminal a lot, so it’s still a little bit alien to me. I’m not terrified of it anymore, but I still walk on eggshells when I use it – I don’t want to ruin anything. (My stuff, I don’t care so much about – it’s accidentally…I dunno – wiping out the entire plugins database that scares me! LOL) Although the first time I added a plugin wasn’t so difficult, like I said – it’s been a while, updating is another story.
There’s a nice codex page on the issue, but it doesn’t really dive into the whole thing. I think it was written more for people who are used to downloading the nightlies, and adding code and plugins like crazy all the time. The Codex page is more of a “quick overview” kind of thing.
So while it’s fresh in my mind, I’m going to share a few little tidbits that I’ve come to understand – so when I do this again I don’t have to spend three hours just trying to update something.
Adding a brand-spanking new plugin
First off – when you want to add a fresh, new plugin, you have to ask first. I don’t remember doing this before, so it must be a new thing they’ve added to help maintain quality control (which is a good thing). From what I’m reading, when you submit the form for adding a plugin, you’re basically notifying the WP team that you want to add a new plugin, and apparently they download your file and take a few days to actually check it out (I’m being told it’s anywhere between 3 to 10 days – for me it was pretty quick). Then they’ll send you an email and give you your SVN directory so you can add the files to the repository.
Once you get the go-ahead to submit the plugin, you need to shell into the system to add it.
Now, again, I use Terminal. I’m on a Mac, and it comes with this sweet little program already built in. I don’t know what you’d use for a PC, but I do recall needing to shell some stuff back when I was using one, and I had to find and download a program – my system didn’t had anything built in for it. (Again, this is based on an old lady’s memory.) So if you’re on a PC, you’ll have to find something that allows you to shell into the plugins server. The following instructions are Mac-based, but I believe shell access doesn’t care if you’re on a Mac or PC, so if you’ve got something that gives you access, these instructions should work for you.
So, using terminal, you basically open up the puppy, and you should be in your root directory (Macintosh HD/Users/your computer name). It’ll basically look – in the Terminal Window – like:
192: ~ somename$
and have a little square cursor next to it.
Now, you want to create a new directory to store all your stuff in. So you type in (for purposes of example, we’ll use the name “plugins”)
mkdir plugins
and hit “enter.” If you have a Finder window open, you’ll see a new directory being created there
Now you need to access your own little part of the Repository world. The directory name they gave you (we’ll say it’s “love-potion-9″ in acknowledgement of Valentine’s Day) is your address. So next, you need to type in:
svn co http://svn.wp-plugins.org/love-potion-9 plugins
And this basically “checks out” what is there. If this is a new plugin, most likely there won’t be anything but some empty folders (trunk/trunk, branches, tags), and everything in your little area will be downloaded to your new plugins” directory.
So now you want to copy the plugin files you have on your computer to the “trunk” directory of the stuff the SVN just added to your hard drive. DO NOT create a subdirectory, and DO NOT put in a zipped file. Just take all the files from the root level of your plugin and move them to the “trunk” of the new area.
Now, back to Terminal. You need to “speak” to the WP server and tell it you’re preparing to commit some stuff to the server. You have to let it know that there’s new stuff there. So you need to change the directory to your local plugin area
cd plugins/
and then you should see the beginning part change – instead of
192: ~ somename$
you should see
192: plugins somename$
that’ll tell you you’re in the right directory. (if you get an error that the directory doesn’t exist, type in cdand it should move up a level, then try again.)
Now you want to “speak” to the repository, and tell it to take the files that are in your local copy and copy them to the matching directory in the WordPress repository. You do this by typing in:
svn add trunk/*
This basically tells WP that you are in your “plugins” directory that matches theirs, and you want to take everything in your local “trunk” directory and copy it to the WordPress’ matching “trunk” directory. You’ll see the terminal window sort of pause for a few seconds, then this stuff will show up. The lines will begin with “A” (the WP server telling you it’s “added” the files) and then the curosr will appear again.
Once you’re satisfied that all the files are properly in their place, you want to commit this. (If you quit now, then everything you’ve done up to this point will go away.) So you type in:
svn ci -m 'Adding first version of my plugin'
And you’ll see a message that the files are transmitting, and finally it’ll give you a “committed revision” message. All done – you can close out. Usually, in no more than 15 minutes after this point – the new plugin will show up is the plugins repository. You can easily see it by looking at the “Newest” section. By the way, the “Adding first version of my plugin” thing can really be any message you want to have there.
Updating an existing plugin
This is where I ran into trouble – apparently adding is much easier than editing! (Well, not really, but it seemed like it LOL). Really, it’s very similar to adding a new plugin. You want to start by opening up Terminal, and making sure you’re in whatever directory you want on your hard drive (I like to do my stuff at the very root of my hard drive, so I don’t accidentally edit it at some point in the future) and log into the repository to “check out” the file system that’s living there, again by typing in:
svn co http://svn.wp-plugins.org/love-potion-9 plugins
NOTE: be aware that when you do this, if you’re in your local copy, it’ll overwrite what’s there. So if you’ve already made changes, I HIGHLY recommend that you rename your existing “trunk” folder to “trunkNEW” or something so your changes don’t get overwritten, and then move the files after you’ve checked out what’s on the WP server, so you don’t lose your changes.
This will basically copy the files in the repository to your hard drive (“checking out” – like at the library). You can then open up whatever files you want to edit (I HIGHLY recommend the readme.txt file and the root file so you can change the version number and add to your changelog. But the readme.txt file is the big one.) Once you’ve made your changes, simply save them, and change your directory in the terminal so you’re in your plugin area (if you haven’t already) and then type in:
snc ci -m 'Updating my plugin to version whatever'
and hit enter. it magically knows which files you’ve changed – you’ll see them list up and it’ll end with “Committed revision [some number]“. In a bit, you’ll see the version number of your plugin in the plugins area of WordPress.org change to the new version, and everyone will be magically alerted to the update.
Hiding information from the WordPress admin
So, while I was working on my Back End Instructions plugin yesterday, I was talking to my husband about the client I had built it for. As a quick notation, it’s a group of women who are of a certain age (no offense to anyone – I’m getting there myself!) and who do not like change. It’s taken me almost three years of pulling teeth to get things to where they are now. They want to change, but man, are they putting up a fight for it.
Anyway, so I was telling my husband that the new plugin I made will make things so easy that even he could understand how to do it, and there would be no excuses for these people to do what they need to do.
read more »
Nice little Twitter Widget
So I was wanting to find a nice, simple method of using Twitter to pull in multiple accounts into a single feed. “Why would you want to do that,” you ask? Well, in my case, I was working on a site for a client who runs an organization. The organization itself has a Twitter feed for announcements and such, but its employees each had their own Twitter account as well. So they wanted to pull in the feed from their employees onto the site, all into one feed.
Now, I wasn’t sure if it was possible, because the javascript Twitter usually gives you only allows for one name to be used, and I’m no JS expert at all. So I armed myself with Google and searched.
I came up with three things: 2 were results and one was knowledge. The “knowledge” part was that yep – I’m not the only one who wants to do this, and that yep, it’s pretty hard to accomplish – but I also found that (as usual) I didn’t have this desire first, and there were a couple of methods to pull it off. The most interesting one I found was this one by Sea of Clouds.
The script on it’s own is totally usable, but because I have clients who are hard-pressed to understand what the “power” button is for on their computer (not ALL of them, but some!) I always try to make things as easy as possible for them. So I made a widget for the system, because otherwise, they’d have to read through a lot of javascript code to edit names and such – which is never a good thing to do. For this site, all I needed was the ability to add one user, or sixty users (“sixty” just being a number I randomly said – I basically needed as many as was desired), and the ability to easily add or remove them from the list. The script linked above allows for a LOT more capabilities than that – so if you see something that you wish to be added to this widget, the following code should give you an awesome head-start on it. (In fact, I’m considering turning it into a full-on WordPress plugin, it’s so awesome.)
So without further ado, here’s the code. Just copy and paste into your functions.php file, and it should show up as a reusable widget. This does not allow you to change the title of the widget, nor how many tweets are shown – but if you know enough about what’s going on here and what I’m about to post, you shouldn’t have any issues editing the below code to fit your needs.
First, you need to download the source. (scroll past the demo to the “Download” area.) Make sure you’re running jQuery 1.4.x, minimum. Upload the script files into your theme directory.
Next, you need to open up your header.php file and add in your calls to the script files you just added to your themes folder:
1
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery.tweet.js"></script>
Finally, you need to add the following code to your theme’s functions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
add_action( 'widgets_init', 'twitter_feed_widgets' );
function twitter_feed_widgets() {
register_widget( 'Twitter_Feed_Widget' );
class Twitter_Feed_Widget extends WP_Widget {
function Twitter_Feed_Widget() {
$widget_ops = array( 'classname' => 'twitter_feed_widget', 'description' => __('Widget to display multiple Twitter accounts (or a single one) into a single feed.', 'twitter_feed_widget') );
</code><code>
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'twitter-feed-widget' );
$this->WP_Widget( 'twitter-feed-widget', __('Twitter Feed Widget', 'twitter_feed'), $widget_ops, $control_ops );
}
function widget( $args, $instance ) {
global $post;
extract( $args );
$accountlist = $instance['accountlist'];
$defaultacc = $instance['defaultacc'];
// first we will want to see if we are on a single post page, so we can just grab that user's feed only - userextra and usermeta plugins are required, and a profile field named "twitter" needs to be added
if(is_single()) {
$author = $post->post_author;
$twittername = get_usermeta($author, 'twitter');
// strip "@" if exists
$find = strpos($twittername, '@');
if($find !== false) {
$twittername = str_replace('@', '', $twittername);
}
$followlink = 'http://twitter.com/' . $twittername;
// now add script to pull feeds
$script = '<script type="text/javascript">' . "\n";
$script .= 'jQuery(document).ready(function(jQuery) {' . "\n";
$script .= 'jQuery(".twitter_feed_widget").tweet({' . "\n";
$script .= 'join_text: "auto",' . "\n";
$script .= 'username: "'.$twittername.'",' . "\n";
$script .= 'count: 3,' . "\n";
$script .= 'auto_join_text_default: "we said,",' . "\n";
$script .= 'auto_join_text_ed: "we",' . "\n";
$script .= 'auto_join_text_ing: "we were",' . "\n";
$script .= 'auto_join_text_reply: "we replied to",' . "\n";
$script .= 'auto_join_text_url: "we were checking out",' . "\n";
$script .= 'loading_text: "loading tweets..."' . "\n";
$script .= '});' . "\n";
$script .= '}).bind("empty", function() { jQuery(this).append("No matching tweets found"); });' . "\n";
$script .= '</script>'."\n\n";
} // if we are on any other page, we want to pull the feed that includes everyone
else {
$accountlist = str_replace(", ", ",", $accountlist); // remove whitespace and leave commas
$accountlist = str_replace(',', '", "', $accountlist); // seems redundant, but do it again to add in spaces and apostrophes in the proper order
$followlink = 'http://twitter.com/' . $defaultacc;
// now add script to pull feeds
$script = '<script type="text/javascript">' . "\n";
$script .= 'jQuery(document).ready(function(jQuery) {' . "\n";
$script .= 'jQuery(".twitter_feed_widget").tweet({' . "\n";
$script .= 'count: 3,' . "\n";
$script .= 'username: ["' . $accountlist . '"],' . "\n";
$script .= 'loading_text: "searching twitter..."' . "\n";
$script .= '});' . "\n";
$script .= '}).bind("empty", function() { jQuery(this).append("No matching tweets found"); });' . "\n";
$script .= '</script>'."\n\n";
}
echo '<div class="widget twitter_feed_widget">' . "\n\t\t\t";
echo $before_title . 'Twitter Feed <a class="followlink" href="' . $followlink . '">> follow</a>' . $after_title;
echo $script;
echo '<!--/close twitter feed widget-->' . "\n\t\t\t";
echo '</div>' . "\n\n";
}
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['accountlist'] = strip_tags($new_instance['accountlist']);
$instance['defaultacc'] = strip_tags($new_instance['defaultacc']);
return $instance;
}
function form( $instance ) {
$defaults = array( 'accountlist' => __('', 'twitter_feed'),
'defaultacc' => __('', 'twitter_feed')
);
$instance = wp_parse_args( (array) $instance, $defaults ); ?>
<p><small style="display:inline-block; color:#777; font-style:italic; padding-bottom:7px;">Enter in a comma-separated list of twitter account usernames that you wish to have added to the feed. Do not include the "@" symbols.</small>
<label style="vertical-align:center;" for="<?php echo $this->get_field_id( 'accountlist' ); ?>"><?php _e('Account List:', 'hybrid'); ?><br />
<textarea class="widefat" rows="5" cols="20" id="<?php echo $this->get_field_id( 'accountlist' ); ?>" name="<?php echo $this->get_field_name( 'accountlist' ); ?>"><?php echo $instance['accountlist']; ?></textarea></label>
</p>
<p><small style="display:inline-block; color:#777; font-style:italic; padding-bottom:7px;">Enter in the default account name (sans "@" symbol) to be used sitewide. If you are also using the "Feed and Follow Widget", you will probably want to use the same user account set for the "Twitter Username" in that widget. </small>
<label style="vertical-align:center;" for="<?php echo $this->get_field_id( 'defaultacc' ); ?>"><?php _e('Default Username:', 'hybrid'); ?>
<input id="<?php echo $this->get_field_id( 'defaultacc' ); ?>" name="<?php echo $this->get_field_name( 'defaultacc' ); ?>" value="<?php echo $instance['defaultacc']; ?>" style="display:inline; border:1px solid #ccc; width:183px;" /></label>
</p>
<?php
}
}
}
Now, you should see up there that I included a reference to “Userextra” and”Usermeta” plugins. I love these two plugins – I’ve used them for a long time to add custom fields to my profile pages and I just haven’t found anything that’s works better for me. The above code has a “main feed” icon in the header tag. It didn’t make sense to me that you would have a “follow” link in the header, but listing 2, 5 or 50 different people in the feed. Who are you following? So what I did was provide a “twitter” field in the user’s profile page, to which they would put in their Twitter username. If you’re on a single post, the widget will look up the name of the page’s author, pull the twitter account name, and link it to the “follow” link in the header. It will also only list the feeds for that particular other. But when you’re on any other page on the site, it will list the multiple accounts you’ve entered into the widget, and make the “follow” link go to the main/default Twitter account.
So there you have it – enjoy! (and if you all talk me into actually turning this into a full-blown widget, you won’t have to push very hard. I love this one!)
Better Text Widget
NOTE: October 5, 2010
I just recently used this plugin while developing locally for a client. I did an SQL export of the site to move the testbed to the live server, and was muchly surprised to discover this widget does not get retained in the database for some reason. I had to redo all of the widgets manually.I just wanted to post notice of this bug, because I want you to know that I know, and I’m working to correct it.
Yes, I’ve been quiet for a few weeks. I’ve had some issues come up, and have been trying to knock them out of the park. I was just saying this morning, it amazes me how I’m on sabbatical, but I’m busier now than I was when I wasn’t! (OMG – that has to be some kind of grammatical nightmare right there.)
Anyway, recently I’ve had a lot of people around me (not directly to me, but sort of discussing around me) that they are using WordPress, but wished they’d had a widget that would pull off certain functionality. I can’t give you their exact words, but the gist of it is that they want some kind of easier-to-use text widget.

If you don’t know what I mean, basically WordPress has a default widget (that comes with the installation) that’s called “Text Widget”. The description of said widget is “Arbitrary text or HTML” So basically you can type up any text you want and shove it into a Widget. If you know a little HTML, you can put in an image, etc., but you would have to know the proper syntax to do it. Most of my clients look at HTML as if it’s Mandarin Chinese. However, using other widgets are overkill, and sometimes present “TMI” that they can’t seem to sort through. What they wanted was a Widget where they could put in text (or even just have an excerpt from a particular page or post), easily add an image, and even have the title of said widget look different than the title they name the widget.

Lucky for you all, I’ve already written one, and have been using it for some time. Over the last 3 weeks (or so) I’ve been handing out the code for it when anyone asks me for it. I was just getting ready to send it again, when it just dawned on my that DUH – that’s what my site is for. So here. Take it! Just pop this code into your functions.php file, and run
Update on July 12, 2010: I’ve been asked also to add in something to make the title of the widget be optionally hidden. It just so happens that I just finished doing exactly that for a client recently, so I’m adding in those lines.
Also – not because I was asked, but because I’ve found this addition very handy – is the option to make accessing the theme directory files easier. Many times, I’m developing on my own server and eventually I need to move the site to a client’s server. Many of the widgets have a full path coded, and those don’t change when you move the site, so stuff ends up broken. I’ve edited the code to make that a whole lot easier.)
$home = get_bloginfo('home');
$templatedir = get_bloginfo('template_url');
$uploadsdir = wp_upload_dir();
$uploadsdir = $uploadsdir['baseurl'];
$imgdir = $templatedir . '/images'; // be sure to change the directory to whatever you've named your images directory within your themes folder
add_action( 'widgets_init', 'easier_text_widgets' );
function easier_text_widgets() {
register_widget( 'Easier_Text_Widget' );
}
class Easier_Text_Widget extends WP_Widget {
function Easier_Text_Widget() {
$widget_ops = array( 'classname' => 'easier_text_widget', 'description' => __('Similar to the plain-vanilla "Text", but makes it easier to manipulate without the need to know PHP or HTML.', 'easier_text_widget') );
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'easier-widget' );
$this->WP_Widget( 'easier-widget', __('Easier Text Widget', 'easier_text'), $widget_ops, $control_ops );
}
function widget( $args, $instance ) {
global $post, $imgdir, $uploadsdir, $templatedir, $home;
extract( $args );
$title = apply_filters('widget_title', $instance['title'] );
$hide = $instance['hide'];
$image = $instance['image'];
$link = $instance['link'];
$link_text = $instance['link_text'];
$id = $instance['id'];
$text = $instance['text'];
// replace "home" with home url
$findimg = strpos($image, 'images');
$findhome = strpos($link, 'home');
$finduploads = strpos($image, 'uploads');
$findlinkuploads = strpos($image, 'uploads');
if($findimg !== false) $image = str_replace('images', $imgdir, $image);
if($finduploads !== false) $image = str_replace('uploads', $uploadsdir, $image);
if($findhome !== false) $link = str_replace('home', $home, $link);
if($findlinkuploads !== false) $link = str_replace('uploads', $uploadsdir, $link);
if($hide !== false) $class = 'class="hideme"';
else $class = '';
echo $before_widget;
if (!empty($link) && empty($image) && empty($link_text)) {
echo $before_title . '<a style="font-size:1.1em;" ' . $class . ' href="' . $link . '">';
if (!empty($title))
echo $title;
echo '</a>' . $after_title;
} else if(!empty($title)) {
if($class == '') echo $before_title . $title . $after_title;
}
if (!empty($image))
$img = '<img src="' . $image . '" alt="' . $link_text . '" />';
if (!empty($link)) {
echo '<a href="' . $link . '">';
if(!empty($image))
echo $img;
else if(!empty($link_text))
echo $link_text;
echo '</a>';
} else if(!empty($image)) {
echo $img;
}
if (!empty($id)) {
$excerpt = get_the_excerpt();
if($excerpt == '') {
$excerpt = get_post_meta($id, 'page_excerpt_value', true); // post meta value
}
echo '<p>' . $excerpt;
echo '<a class="more-link" href="' . get_permalink($id) . '"> more</a></p>';
}
if (!empty($text)) {
$findimg = strpos($text, 'images');
$findhome = strpos ($text, 'home');
$finduploads = strpos($text, 'uploads');
if($findimg !== false) $text = str_replace('images', $imgdir, $text);
if($findhome !== false) $text = str_replace('home', $home, $text);
if($finduploads !== false) $text = str_replace('uploads', $uploadsdir, $text);
apply_filters( 'widget_text', $instance['text'] );
echo $instance['filter'] ? wpautop($text) : $text;
}
echo $after_widget;
}
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title'] );
$instance['hide'] = isset($new_instance['hide']);
$instance['image'] = strip_tags($new_instance['image']);
$instance['link'] = strip_tags($new_instance['link']);
$instance['link_text'] = strip_tags($new_instance['link_text']);
$instance['id'] = strip_tags($new_instance['id']);
//$instance['$text'] = stripslashes($new_instance['text']);
if ( current_user_can('unfiltered_html') )
$instance['text'] = $new_instance['text'];
else
$instance['text'] = wp_filter_post_kses( $new_instance['text'] );
$instance['filter'] = isset($new_instance['filter']);
return $instance;
}
function form( $instance ) {
global $imgdir, $uploadsdir, $templatedir, $home;
$defaults = array( 'title' => __('', 'easier_text'),
'hide' => __('', 'easier_text'),
'image' => __('', 'easier_text') ,
'link' => __('', 'easier_text'),
'link_text' => __('', 'easier_text'),
'id' => __('', 'easier_text'),
'text' => __('', 'easier_text')
);
$instance = wp_parse_args( (array) $instance, $defaults ); ?>
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'hybrid'); ?></label>
<input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:100%;" />
</p>
<p><input type="checkbox" id="<?php echo $this->get_field_id( 'hide' ); ?>" name="<?php echo $this->get_field_name( 'hide' ); ?>" <?php checked($instance['hide']); ?> />
<label for="<?php echo $this->get_field_id( 'hide' ); ?>"><?php _e('Visually hide title'); ?></label>
</p>
<p><small style="color:#777; font-style:italic;display:block;">If you'd like to use an image (that's not already within the content) in this widget, enter in the full path to the image. <br />
Use "<strong>images</strong>" instead of the full path for images located within the theme files. For example, "images/BG.jpg" will convert to "<?php echo $imgdir; ?>/BG.jpg. <br />
Use "<strong>uploads</strong>" for the path to the uploads directory, if using a media file image. This will give you the first part of the directory, but you will need to supply the rest of the path to the file - the year, month directories and image file name.")</small><label for="<?php echo $this->get_field_id( 'image' ); ?>"><?php _e('Image Path:', ''); ?></label>
<input id="<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" value="<?php echo $instance['image']; ?>" />
<p><label for="<?php echo $this->get_field_id( 'link' ); ?>"><?php _e('Full URL to link image or text to - rules for paths apply as with images:', ''); ?></label>
<input id="<?php echo $this->get_field_id( 'link' ); ?>" name="<?php echo $this->get_field_name( 'link' ); ?>" value="<?php echo $instance['link']; ?>"/>
</p>
<p><label for="<?php echo $this->get_field_id( 'link_text' ); ?>"><?php _e('Link text (will also be used as the alternate text for the image):', ''); ?></label>
<input id="<?php echo $this->get_field_id( 'link_text' ); ?>" name="<?php echo $this->get_field_name( 'link_text' ); ?>" value="<?php echo $instance['link_text']; ?>" />
</p>
<p><label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e('ID of Page or post you would like the excerpt from:', ''); ?></label>
<input id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" value="<?php echo $instance['id']; ?>" />
</p>
<p><label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php _e('If not using an excerpt, then enter in text you would like to display. HTML is allowed.', ''); ?></label>
<textarea class="widefat" rows="7" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $instance['text']; ?></textarea>
</p>
<p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked($instance['filter']); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs.'); ?></label></p>
<?php
}
}
Filtering yourself from Google Analytics
I, like many, many people out there, use Google Analytics on my website. At first, I obtained it because it seemed like a good idea at the time. I never really was one for tracking my userdata and that kind of thing, but I was convinced (by a discussion I can no longer find reference to) that it would be a good idea to start doing it, because in the future it might come in handy. So, I chose the easy thing: Google Analytics.
I’ve been tracking the stuff on my site for a long time – I can’t honestly tell you how long without actually going to see – but it’s been more than a year. I find all the various reports interesting, and it’s pretty cool to know that I get (on average) about 2-300 visitors per day. however, I am always confuzzled by the vast amounts of data that’s being reported, and just relegate myself to looking at the pretty lines going up and down every now and again, without a clue as to what it means.
As part of this sabbatical, I’ll be delving a little more deeply into this, and make an attempt to learn about this tool I’m using, and I’m going to start with this little tidbit: filtering myself out of my user data.
read more »
Creating an HTML signature file for just about anything
So I’ve recently had the opportunity to create a plethora of (pinatas?) e-mail siggy files
And not just a nice little siggy file to place with your Outlook or Mac Mail program, but in ALL KINDS of things. Even for Gmail.
I had to piece together the “how-to”s from a bunch of different sources throughout the web, but I’m here to share how I did it, and how I managed to make it work for all kinds of different mail-reading-and-sending programs.
read more »
Client instructions through the WordPress admin
So I currently have a client that – no offense to anyone, I swear it – cannot seem to handle instructions to save his life. I’ve written two PDF documents, as well as one in Word format, as well as multiple phone conversations, and having an “Active Collab” type area where your discussions are stored for future reference – and finally emails. However, I still find myself repeatedly giving him instructions, because if it’s not right in front of his face, he forgets (or doesn’t bother to go looking). It is a lesson in frustration, because I’m starting to sound like a broken record to myself.
read more »
Why I moderate comments
Many people feel that moderation of comments of a blog (such as this) is bad practice, and is performed pretty much by people who believe themselves to be the end-all of correctness. Only people who love themselves and care nothing for other people’s opinions moderate the comments on their site. (This observation, anyway, is something I’ve seen in my years as a blog-reader and Twitterer, but I don’t have any direct references to such a belief – I wish I did!)
I do not agree with this.
read more »
6 Things to Check Before the Site Launch
I am absolutely sure that this list will change over time. But I realized this morning that I don’t have a real set list of things to do before I launch a site – be it a redesign or a brand new site. Again, it’s a whole “fly by the seat of my pants” kind of thing. Using experience and memory to help me through it – when really I should have something written down. So here is my first attempt at the things I need to be sure of before a site goes live.
Most of it, I’m sure, will fall under the category of “all sites,” but there will be a few that are different between a brand-new site and one that already exists and is getting redesigned.I should also note that the vast majority of my sites (in fact, all of them, within the last 2 years) have been WordPress sites. So I don’t know how much this list will apply to regular HTML sites (or even sites using other platforms.)
So, let’s have at it.
read more »
Setting Up Virtual Hosts on MAMP
Typically I do most of my work on my computer in a localhost environment. Makes for much faster editing – I can change the file on my computer and changes are immediately seen on the “site” locally (the alternative would be edit, upload, wait, reload page, and repeat). Now, on my PC, I used to run a neat little program called XAMPP to put Apache, PHP and MySQL on my computer and turn it into my own personal server. However, now that I’m a Mac user (I switched in early 2008), I use MAMP.
Today, I needed to install WordPress MU to aid in developing a theme for a client. I haven’t used MU in quite some time, and I’d forgotten that it won’t install on simply “localhost” (which is what my current setup is – or rather, was about 20 minutes ago). So, to install WPMU locally, I had to set up a virtual host (i.e. to access my localhost files via “http://localhost.com” instead of “http://localhost”). I discovered that, when using MAMP, it’s sometimes a difficult trial to pull off. I was lucky in finding the info I wanted though – I had it completed in a snap. So, I figured I’d share with you how I did it, so it’s all in one place (and maybe help you!)
read more »
