<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>octalforty</title>
	<atom:link href="http://octalforty.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://octalforty.com</link>
	<description>user interface, user experience &#38; web standards.</description>
	<lastBuildDate>Mon, 30 Jan 2012 00:24:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<atom:link rel='hub' href='http://octalforty.com/?pushpress=hub'/>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Assigning Role On WordPress Registration &amp; Profile Page</title>
		<link>http://octalforty.com/articles/assigning-role-on-wordpress-registration-profile-page/</link>
		<comments>http://octalforty.com/articles/assigning-role-on-wordpress-registration-profile-page/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 16:55:45 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://octalforty.com/?p=395</guid>
		<description><![CDATA[For this post, we'll look at how you could assign role on Wordpress registration page, and allow user to change their own role with the profile page.]]></description>
			<content:encoded><![CDATA[<p>Phew. I didn’t expect that the previous article, <a href="http://octalforty.com/articles/assigning-role-on-wordpress-registration-page/" title="Assigning Role On WordPress Registration Page">Assigning Role On WordPress Registration Page</a> gained so much attention. This might be a little late for a follow up, but better late than never eh?</p>
<p>For this post, we’ll try to assign role on WordPress registration page, and then allow user to change their own role through their profile page. This might sound a bit <em>risky</em> as we’re giving the user rights to change their own role, but we’ll limit the role choices to our custom roles only.</p>
<p>The changes should satisfy <a href="http://octalforty.com/articles/assigning-role-on-wordpress-registration-page/#comment-12">one of the scenarios</a> mentioned by Devexus. Oh, and we’ll do all this without depending on any plugins.</p>
<h3>Create the custom roles</h3>
<p>I’m sure by now, you should already familiarized yourself with <code>functions.php</code>, so let’s open it and include the snippets below:</p>
<div class="chili">
<pre><code class="php">&lt;?php
// Add two new role.
// Full list of capabilities can be found at http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
 add_role('writer', 'Writer', array( 
   'delete_posts' =&gt; true,
   'delete_published_posts' =&gt; true,
   'edit_posts' =&gt; true,
   'edit_published_posts' =&gt; true,
   'publish_posts' =&gt; true,
   'read' =&gt; true,
   'upload_files' =&gt; true,
   'edit_users' =&gt; true
));
 add_role('designer', 'Designer', array(
   'edit_files' =&gt; true,
   'edit_plugins' =&gt; true,
   'edit_theme_options' =&gt; true,
   'edit_themes' =&gt; true,
   'install_plugins' =&gt; true,
   'install_themes' =&gt; true,
   'switch_themes' =&gt; true,
   'update_plugins' =&gt; true,
   'update_themes' =&gt; true,
   'read' =&gt; true,
   'edit_users' =&gt; true
));</code></pre>
</div>
<p>Remember that the roles will allow certain capabilities to your user. If you’re using your roles as a way for the user to subscribe to a newsletter (or other uses) like Devexus, you might want to set the roles to be similar to the <a href="http://codex.wordpress.org/Roles_and_Capabilities#Subscriber" title="Subscriber's role &#038; capabilities">capabilities of Subscriber</a>.</p>
<h3>Modifying WordPress Registration Page</h3>
<p>Now that we have our roles added, we’ll need to include these new roles to the registration page. Simply include the code snippets below:</p>
<div class="chili">
<pre><code class="php">add_action('register_form','role_registration_form');
function role_registration_form(){
   $wp_roles = new WP_Roles();
   $wp_roles-&gt;use_db = true;
   $role_names = $wp_roles-&gt;get_names();
  
   foreach( $role_names as $role_name ) {
      // Ensure that the options exclude default Wordpress roles
      if ( ($role_name !== 'Administrator') and ($role_name !== 'Editor') and ($role_name !== 'Author') and ($role_name !== 'Contributor' ) and ($role_name !== 'Subscriber') ) {
         //  Role value below needs to be in lowercase only
         $role_option .= "&lt;option value='".strtolower($role_name)."'&gt;";
         $role_option .= $role_name;
         $role_option .= "&lt;/option&gt;";
      }
   }
   $html = '
      &lt;style type="text/css"&gt;
         #role {
            background:#fbfbfb;
            border:1px solid #e5e5e5;
            font-size:24px;
            margin-bottom:16px;
            margin-right:6px;
            margin-top:2px;
            padding:3px;
            width:97%;
         }
      &lt;/style&gt;

      &lt;div width="100%"&gt;
         &lt;p&gt;
            &lt;label style="display: block; margin-bottom: 5px;"&gt;' . __('Role', 'Role') . '
               &lt;select id="role" name="role" class="input"&gt;
                  ' . $role_option . '
               &lt;/select&gt;
            &lt;/label&gt;
         &lt;/p&gt;
      &lt;/div&gt;
   ';
   echo $html;
}</code></pre>
</div>
<p>Save the file, and take a peek at your WordPress registration page. You should see a screen similar to the one below:</p>
<div id="attachment_411" class="wp-caption alignnone"><a href="http://octalforty.com/assets/395-registration-page.jpg?9707a5"><img src="http://octalforty.com/assets/395-registration-page.jpg?9707a5" alt="Screenshot showing the modified WordPress registration page." title="Screenshot showing the modified WordPress registration page." class="size-full wp-image-411" /></a><p class="wp-caption-text">Screenshot showing the modified WordPress registration page.</p></div>
<p>Feel free to modify the markup, or even the CSS to suit your theme.</p>
<p>Now that we’ve managed to output the new role, next we’ll need to make sure that the role is saved when a user actually clicks on the Register page. The code below should do the trick:</p>
<div class="chili">
<pre><code class="php">add_action('user_register', 'register_role');
function register_role($user_id, $password="", $meta=array()) {

   $userdata = array();
   $userdata['ID'] = $user_id;
   $userdata['role'] = $_POST['role'];

   // allow if a role is selected
   if ( $userdata['role'] ){
      wp_update_user($userdata);
   }
}</code></pre>
</div>
<h3>Modifying WordPress Profile Page</h3>
<p>If you’ve read the last post, this is where we stopped. Previously, as you <em>might</em> have noticed, updating the role on the profile will take no effect as WordPress will revert it back to the default state.</p>
<p>This time, we’ll still output the same field on the profile page, plus updating WordPress role field for that user based on the selection.</p>
<div class="chili">
<pre><code class="php">add_action( 'show_user_profile', 'role_selection_field' );
add_action( 'edit_user_profile', 'role_selection_field' );
function role_selection_field( $user ) {
   $wp_roles = new WP_Roles();
   $wp_roles-&gt;use_db = true;
   $role_names = $wp_roles-&gt;get_names();
  
   foreach( $role_names as $role_name ) {
      if ( ($role_name !== 'Administrator') and ($role_name !== 'Editor') and ($role_name !== 'Author') and ($role_name !== 'Contributor' ) and ($role_name !== 'Subscriber') ) {
         if ( !empty( $user-&gt;roles ) &amp;&amp; is_array( $user-&gt;roles ) ) {
            foreach ( $user-&gt;roles as $role ) {			
               if ( strtolower($role_name) == $role ) {
                  $role_option .= "&lt;option value='".strtolower($role_name)."' selected='selected'&gt;";
                  $currentrole = strtolower($role_name);
               } else {
                  $role_option .= "&lt;option value='".strtolower($role_name)."'&gt;";
               }
   
               $role_option .= $role_name;
               $role_option .= "&lt;/option&gt;";
            }
         }
      }
   }
   ?&gt;</code></pre>
</div>
<p>What we’re doing above is including our custom user meta to the Profile page. First, we get the list of names for each role on WordPress. For each of the roles available, we’ll check if the role is one of the default roles provided by WordPress. If it’s not, we’ll include the role’s name and value as one of the options for the select element.</p>
<p>Next, we’ll need to output the actual markup that the user will see on the Profile page.</p>
<div class="chili">
<pre><code class="php">&lt;h3&gt;&lt;?php _e("Extra profile information", "blank"); ?&gt;&lt;/h3&gt;
&lt;style type="text/css"&gt;
   #role { width: 15em; }
&lt;/style&gt;
   &lt;table class="form-table"&gt;
      &lt;tr&gt;
         &lt;th&gt;&lt;label for="role"&gt;&lt;?php _e("Role"); ?&gt;&lt;/label&gt;&lt;/th&gt;
         &lt;td&gt;
            &lt;select id="role" name="role" class="input"&gt;
            &lt;?php 
               echo $role_option;
            ?&gt;
            &lt;/select&gt;
            &lt;span class="description"&gt;&lt;?php _e("Select your role if you feel like going to the other side"); ?&gt;&lt;/span&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
   &lt;/table&gt;
&lt;?php }</code></pre>
</div>
<p>I guess the code above is pretty much explains themselves. We output the label, the list of roles we generated earlier into the <code>select</code> element, and a brief explaination for the users to explain the purpose of that field.</p>
<p>Save your <code>functions.php</code> file one more time, and checkout the Profile page. You should be able to see an extra user meta field like the screenshot below:</p>
<div id="attachment_423" class="wp-caption alignnone"><a href="http://octalforty.com/assets/395-profile-page.jpg?9707a5"><img src="http://octalforty.com/assets/395-profile-page.jpg?9707a5" alt="Screenshot showing the role field." title="Screenshot showing the role field." width="585" height="240" class="size-full wp-image-423" /></a><p class="wp-caption-text">Screenshot showing the role field.</p></div>
<p>Next, we’ll include the code that will actually update the role when the user make the changes.</p>
<div class="chili">
<pre><code class="php">add_action( 'personal_options_update', 'save_role_selection_field' );
add_action( 'edit_user_profile_update', 'save_role_selection_field' );
function save_role_selection_field( $user_id ) {
   update_usermeta( $user_id, 'role', $_POST['role'] );
   $user = new WP_User( $user_id );

   // Remove role
   $current_user_role = get_current_user_role();
   $user-&gt;remove_role( $current_user_role );

   // Add role
   $user-&gt;add_role( $_POST['role'] );
}
// Function that will return the current user role whenever we need it.
function get_current_user_role () {
   global $current_user;
   get_currentuserinfo();
   $user_roles = $current_user-&gt;roles;
   $user_role = array_shift($user_roles);
   return $user_role;
};

?&gt;</code></pre>
</div>
<pHere's the clever part. Whenever a user updates their profile page (and update our "role" user meta), we'll get the option that they selected, and update the meta field. Then we'll remove the user's current role, and adding the ones that they selected. This will ensure that the default user meta is always the same as the user's role.</p>
<p>That's it! You could try and create a test account and update the role through the profile page. If you have different capabilities for each role, you should be able to see your sidebar changes based on your selected role. Feel free to check out the <a href="http://gist.github.com/1391773" rel="external">complete code on Gist</a>.</p>
<p>Now dance baby, dance :)</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/assigning-role-on-wordpress-registration-profile-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating A WordPress Tag Index Page</title>
		<link>http://octalforty.com/articles/creating-a-wordpress-tag-index-page/</link>
		<comments>http://octalforty.com/articles/creating-a-wordpress-tag-index-page/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 11:15:32 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tag index]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://octalforty.com/?p=280</guid>
		<description><![CDATA[In this post, octalforty shows you how you can have your own alphabetically ordered tag index page for your Wordpress theme.]]></description>
			<content:encoded><![CDATA[<p>For some reasons, I tend to stay away from tag clouds whenever possible. While they’re visually appealing, tag clouds tend to give focus on highly-used tags and it’s quite difficult to scan for certain topics that you might actually be interested in.</p>
<p>With that in mind, I wanted the users to: </p>
<ul>
<li>See a list of all tags on my site.</li>
<li>See the tags sorted in alphabetical order to allow easy scanning.</li>
<li>Show number of frequency each tag has been used.</li>
<li>Provide a link for users to see posts related to the tag.</li>
</ul>
<p>On this post, I’ll show you how you could achieve all the points above, while still keeping your tags visually appealing. In short, we’re going to create a page similar to the <a href="http://octalforty.com/tag-index/" title="Tag Index page">Tag Index page</a> on octalforty.</p>
<h3>Preparing the PHP file</h3>
<p>First off, we’re going to create a new <code>PHP</code> file called <code>tag-index.php</code> and save it to your themes folder. Your <code>tag-index.php</code> should be on the same location as the widely-known <code>functions.php</code>. Once that’s done, we’ll include the code below to your <code>tag-index.php</code>:</p>
<div class="chili">
<pre><code class="php">&lt;?php
/*
Template Name: Tag Index
*/

get_header(); ?&gt;

    &lt;div id="primary"&gt;
        &lt;div id="content" role="main"&gt;
		
            &lt;article id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
			
                &lt;header class="entry-header"&gt;
                    &lt;h1 class="entry-title"&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
                &lt;/header&gt;&lt;!-- .entry-header --&gt;

                &lt;div class="entry-content"&gt;
                    &lt;!-- Tag index code will be placed here --&gt;
                &lt;/div&gt;&lt;!-- .entry-content --&gt;
				
                &lt;footer class="entry-meta"&gt;
                    &lt;!-- The footer for your tag index page --&gt;
                &lt;/footer&gt;&lt;!-- .entry-meta --&gt;
			
            &lt;/article&gt;&lt;!-- #post-&lt;?php the_ID(); ?&gt; --&gt;
		
        &lt;/div&gt;&lt;!-- #content --&gt;
    &lt;/div&gt;&lt;!-- #primary --&gt;
		
&lt;?php get_footer(); ?&gt;</code></pre>
</div>
<p>On line 2 — 4 on the above code, we’re telling WordPress the Template Name. This will be used when we’re going to create the actual page later on. The rest of the code is a copy of WordPress 2011 theme page markup. Feel free to make any modifications to suit your own theme.</p>
<h3>Outputting the tags</h3>
<p>Finally, the fun part.</p>
<p>On line 18 of your <code>tag-index.php</code>, replace that line with the code below:</p>
<div class="chili">
<pre><code class="php">&lt;?php
    // Make an array from A to Z.
    $characters = range('a','z');
    // Check if $characters exists and ensure that it is an array.
    if( $characters &amp;&amp; is_array( $characters ) ) {
        foreach( $characters as $index=&gt;$character ) {
            // Get the tag information for each characters in the array.
            $tags = get_tags( array('name__like' =&gt; $character, 'order' =&gt; 'ASC') );
            // Output a wrapper so that our arrays will be contained in 4 columns.
            if ($index != 0 &amp;&amp; $index % 4 == 0)  {
                $html = "&lt;div class='post-tags clearfix' style='clear:left;'&gt;";
            } else {
                $html = "&lt;div class='post-tags clearfix'&gt;";
            }
            // Output the character and use it as the title.
            $html .= "&lt;h3 class='title'&gt;{$character}&lt;/h3&gt;";
            // Output the markup for each tag found for each character.
            if ($tags) {
                $html .= "&lt;ul&gt;";
                foreach ( (array) $tags as $tag ) {
                    $tag_link = get_tag_link($tag-&gt;term_id);
                    $html .= "&lt;li class='tag-item'&gt;";
                    if ( $tag-&gt;count &gt; 1 ) {
                        $html .= "&lt;p&gt;&lt;a href='{$tag_link}' title='View all {$tag-&gt;count} articles with the tag of {$tag-&gt;name}' class='{$tag-&gt;slug}'&gt;";
                    } else {
                        $html .= "&lt;p&gt;&lt;a href='{$tag_link}' title='View the article tagged {$tag-&gt;name}' class='{$tag-&gt;slug}'&gt;";
                    }
                    $html .= "{$tag-&gt;name}&lt;/a&gt;&lt;span&gt;#{$tag-&gt;count}&lt;/span&gt;&lt;/p&gt;";
                    $html .= "&lt;/li&gt;";
                }
                $html .= '&lt;/ul&gt;';
            }
            $html .= '&lt;/div&gt;';
            // Output the markup for the current character.
            echo $html;
            // Increment the index by 1.
            $index++;
        }					
    }
?&gt;</code></pre>
</div>
<p>Easy huh? I’ve commented each line to ensure that it’s easier to understand what’s going around. If you’re unsure of something, just leave a comment eh?</p>
<p>Once you’re done figuring out what’s happening, save the file.</p>
<h3>Create the page</h3>
<p>Now go to your Add New Pages page on your WordPress admin. You should see a screen similar to the ones below:</p>
<div id="attachment_361" class="wp-caption alignnone"><a href="http://octalforty.com/assets/280-add-new-page.jpg?9707a5"><img src="http://octalforty.com/assets/280-add-new-page.jpg?9707a5" alt="Screenshot showing the Add New Page on WordPress." title="Screenshot showing the Add New Page on WordPress." class="size-full wp-image-361" /></a><p class="wp-caption-text">Screenshot showing the Add New Page on WordPress.</p></div>
<p>Give your post a title (<em>Hint: Tag Index</em>). Under the Page Attributes section on the right of your screen, select Tag Index as the template.</p>
<div id="attachment_362" class="wp-caption alignnone"><a href="http://octalforty.com/assets/280-page-template.jpg?9707a5"><img src="http://octalforty.com/assets/280-page-template.jpg?9707a5" alt="Screenshot showing Tag Index set as the Template." title="Screenshot showing Tag Index set as the Template." class="size-full wp-image-362" /></a><p class="wp-caption-text">Screenshot showing Tag Index set as the Template.</p></div>
<p>Done? Awesome. Save and preview your page to see a list of tags ordered alphabetically. You can then style it according to your taste.</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/creating-a-wordpress-tag-index-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 Useful Resources for Lessn, The URL Shortener</title>
		<link>http://octalforty.com/articles/10-useful-resources-for-lessn-the-url-shortener/</link>
		<comments>http://octalforty.com/articles/10-useful-resources-for-lessn-the-url-shortener/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 17:39:13 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[lessn]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[url-shortener]]></category>

		<guid isPermaLink="false">http://octalforty.com/?p=221</guid>
		<description><![CDATA[Lessn by Shaun Inman is an extremely simple, personal url shortener. So here I've listed down 10 resources you could use to make the most out of Lessn.]]></description>
			<content:encoded><![CDATA[<p>Recently I’ve bought myself a short domain for use with octalforty.com. Previously I’ve been using bit.ly for all my links on Twitter and I just thought it’s about time to use a url shortener service that could represent octalforty as a brand instead.</p>
<p>After spending few hours researching on the options available to me, I’ve decided to go with <a href="http://www.shauninman.com/archive/2009/08/17/less_n" title="Lessn. An extremely simple, personal url shortener">Lessn</a>, by the great <a href="http://www.shauninman.com/" title="Shaun Inman">Shaun Inman</a>.</p>
<p>Since Lessn is offered as-is, without support and without warranty, it would take some effort to bend it to your needs. So here I’ve listed down few ways you could use, or extend Lessn! Let’s go!</p>
<ol>
<li>
<p><strong>Custom Shortlinks For WordPress</strong></p>
<p>Dean Robinson wrote a nice tutorial on  how to use Lessn and WordPress together. With the method, instead of having to create a shortlink for each of your post, he basically used the post ID with your short domain, to mask the original WordPress shortlink.</p>
<p>Read the full tutorial, <a href="http://deanjrobinson.com/article/custom-shortlinks-for-wordpress/" title="Custom Shortlinks For WordPress">Custom Shortlinks For WordPress</a>.</p>
</li>
<li>
<p><strong>WP Lessn</strong></p>
<p>WP Lessn was written by Jay Robinson, and uses Shaun Inman’s Lessn to create a short URL for each new post you publish. The Lessn’d link is attached to the post meta data. The only drawback I see here is when you have a lot of existing published posts, you’ll need to re-publish them in order to generate a short link for each post.</p>
<p><a href="http://wordpress.org/extend/plugins/wp-lessn/" title="Download WP Lessn from WordPress Plugin Directory">Download WP Lessn</a> from WordPress Plugin Directory.</p>
</li>
<li>
<p><strong>Listr for Lessn</strong></p>
<p>Listr was written by <a href="http://arleym.com/" title="Arley McBlain">Arley McBlain</a> to actually list down all the original URLs and their shortened link, in a page for easy reference.</p>
<p><a href="http://debutcreative.com/getting-the-most-out-of-lessn" title="Getting the most out of Lessn">Get Listr at debutcreative.com</a></p>
</li>
<li>
<p><strong>Lessn <span class="amp">&amp;</span> Tweetie 2.0 bookmarklet</strong></p>
<p><a href="http://manasto.tumblr.com/" title="Manasto Jones">Manasto Jones</a> came up with this nifty little bookmarklet to make it easier to shorten a URL, and get Tweetie to include the shortened link in a new status update</p>
<p>Get the bookmarklet from <a href="http://manasto.tumblr.com/post/289269219/lessn-and-tweetie" title="Lessn and Tweetie">Lessn and Tweetie</a> by Monasto.</p>
</li>
<li>
<p><strong>Lessn <span class="amp">&amp;</span> Tweetie 2.0 Custom URL Shortener</strong></p>
<p>Author of Lessn, Shaun Inman himself shows you how to setup Tweetie 2.0 to use your Lessn installation as a custom URL shortener.</p>
<p>See how to set <a href="http://www.shauninman.com/archive/2009/10/12/tweetie_2_and_less_n" title="Tweetie 2 &amp; Lessn">Tweetie 2 &amp; Lessn</a> up!</p>
</li>
<li>
<p><strong>Lessn Pepper for Mint</strong></p>
<p>Lessn Pepper tracks the most recent and most popular urls and referrers in your Lessn installation and displays them in Mint. </p>
<p>Get <a href="http://www.haveamint.com/peppermill/pepper/97/lessn/" title="Lessn Pepper for Mint">Lessn Pepper</a> at the pepper page.</p>
</li>
<li>
<p><strong>Lessn fork by Mike Tierney</strong></p>
<p>Mike Tierney created a fork of Lessn, to allow a Lessn installation to be run from the root directory, instead of having to put it inside a directory.</p>
<p><a href="https://github.com/miketierney/lessn">Read more at the Github</a>.</p>
</li>
<li>
<p><strong>Lessn OS X Service</strong></p>
<p>Steve Streza wrote a text service for Mac OS X 10.6+ which compresses URLs with Lessn or ButteredURLs.</p>
<p>Get <a href="https://github.com/amazingsyco/lessn-service" title="Lessn Service">Lessn Service</a> from the Github page.</p>
</li>
<li>
<p><strong>Lessn More</strong></p>
<p>Lessn More extends the original Lessn with various features like:</p>
<ul>
<li>The ability to use custom short URLs (slugs).</li>
<li>Different auto-shorten modes (optional mixed case).</li>
<li>The ability to avoid lookalike characters.</li>
<li>An optional “banned word list” to prevent auto-generating offensive URLs.</li>
<li>And much more!</li>
</ul>
<p>Check <a href="http://lessnmore.net/" title="Lessn More">Lessn More project page</a>, or <a href="http://github.com/alanhogan/lessnmore" title="Lessn More at Github">get it from Github</a>.</p>
</li>
<li>
<p><strong>Lessn More with WordPress</strong></p>
<p>If you’re like me and decided to go with Lessn More, I’m sure you’ll be jumping around to know that <a href="http://somadesign.ca/" title="Matt Wiebe">Matt Wiebe</a> wrote a WordPress plugin that integrates WordPress shortlink functionality with the <a href="http://lessnmore.net/">Lessn More</a> URL shortener. Sweet indeed!</p>
<p><a href="https://gist.github.com/774853" title="Lessn More with WordPress">Get the plugin from Github</a>.</p>
</li>
</ol>
<h3>Additional reading.</h3>
<ol>
<li>
<p><a href="http://www.johnniemunger.com" title="Johnnie Munger">Johnnie Munger</a> shows how it’s possible to change Lessn’s hash pattern, to use arrays instead of the original base convertion. This allows his version of Lessn to support a much larger number of shortened links.</p>
<p>Read more from his post, <a href="http://www.johnniemunger.com/7/a-simple-url-shortener" title="A Simple URL Shortener">A Simple URL Shortener</a>.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/10-useful-resources-for-lessn-the-url-shortener/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Assigning Role On WordPress Registration Page</title>
		<link>http://octalforty.com/articles/assigning-role-on-wordpress-registration-page/</link>
		<comments>http://octalforty.com/articles/assigning-role-on-wordpress-registration-page/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 19:21:53 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=102</guid>
		<description><![CDATA[octalforty shows you how to modify your Wordpress registration page and let your users choose a role of their choosing when registering to your site.]]></description>
			<content:encoded><![CDATA[<div class="alert-message block-message info">
<p><strong>Update!</strong> A newer post has been published as a follow-up to this post.</p>
<p>Read <a href="http://octalforty.com/articles/assigning-role-on-wordpress-registration-profile-page/" title="Read Assigning Role On WordPress Registration &amp; Profile Page">Assigning Role On WordPress Registration &amp; Profile Page</a></p>
</div>
<p>These few months, I’ve been playing around with various parts of WordPress theming. It was no easy task as I’m used to how <a href="http://expressionengine.com/" title="Expression Engine">Expression Engine</a> allows me to do most of the stuff I needed without much PHP knowledge needed.</p>
<p>One part that I’ll try to customize most of the time, is the registration page of my WordPress installation itself. Here, I’ll show you how to add a field to the WordPress registration form by leveraging the useful <a href="http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/" title="Cimy User Extra Fields plugin site">Cimy User Extra Fields plugin</a>.</p>
<h3>The plugin</h3>
<p>First off, let’s start with downloading Cimy User Extra Fields, upload to your WordPress plugin folder and activate it. Once you’ve done that, you should see a new options aptly named Cimy User Extra Fields under Settings.</p>
<div class="caption">
<a href="http://www.octalforty.com/wp-content/uploads/2010/09/01.png?9707a5" class="caption-image"><img src="http://www.octalforty.com/wp-content/uploads/2010/09/01.png?9707a5" alt="Cimy User Extra Field under Settings" title="Cimy User Extra Field under Settings" class="size-full wp-image-118" /></a></p>
<p class="caption-text">Screenshot showing Cimy User Extra Field under Settings.</p>
</div>
<p>Next we need to add a new field on the registration form that allows the user to select the role of their choosing.</p>
<div class="caption">
<a href="http://www.octalforty.com/wp-content/uploads/2010/09/02.png?9707a5" class="caption-image"><img src="http://www.octalforty.com/wp-content/uploads/2010/09/02-618x261.png?9707a5" alt="Settings to add a new field with role options" title="Settings to add a new field with role options" class="size-full wp-image-118" /></a></p>
<p class="caption-text">Screenshot showing settings to add a new field with role options.</p>
</div>
<p>Once you’ve added the field and save changes, check your registration page and you should see something like the ones below.</p>
<div class="caption">
<a href="http://www.octalforty.com/wp-content/uploads/2010/09/03.png?9707a5" class="caption-image"><img src="http://www.octalforty.com/wp-content/uploads/2010/09/03-618x395.png?9707a5" alt="Wordpress registration page with the new role field" title="Wordpress registration page with the new role field" class="alignnone size-large wp-image-129" /></a></p>
<p class="caption-text">Screenshot showing the new role field on the registration page.</p>
</div>
<h3>Linking it all up</h3>
<p>Now that’s done, we’ll need to include the code inside our <em>functions.php</em> file. I was having troubles figuring out how to do this at first, but managed to find this <a href="http://www.jasarwebsolutions.com/2010/06/27/how-to-change-a-users-role-on-the-wordpress-registration-form/" title="How to change a users role on the wordpress registration form">article</a>. In that article, it shows us how to do something similar with the use of URL parameters.</p>
<p>We’ll need to modify a bit on the code to get it working with our dropdown field though. Below is the modified code, courtesy of my talented friend <a href="http://www.rizalalmashoor.com/" title="Rizal Almashoor’s Blog">Rizal</a>.</p>
<div id="gist-1360173" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="c1">//</span></div><div class='line' id='LC3'><span class="c1">// Modify registration form to include roles</span></div><div class='line' id='LC4'><span class="c1">//</span></div><div class='line' id='LC5'><span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;user_register&#39;</span><span class="p">,</span> <span class="s1">&#39;register_role&#39;</span><span class="p">);</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="k">function</span> <span class="nf">register_role</span><span class="p">(</span><span class="nv">$user_id</span><span class="p">,</span> <span class="nv">$password</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="nv">$meta</span><span class="o">=</span><span class="k">array</span><span class="p">())</span> <span class="p">{</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;<span class="nv">$userdata</span> <span class="o">=</span> <span class="k">array</span><span class="p">();</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;<span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;ID&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$user_id</span><span class="p">;</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;<span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;cimy_uef_USERTYPE&#39;</span><span class="p">];</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;A Contributor&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;contributor&#39;</span><span class="p">;</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;An Editor&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;editor&#39;</span><span class="p">;</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;<span class="c1">//only allow if user role is my_role</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">((</span><span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;contributor&quot;</span><span class="p">)</span> <span class="k">or</span> <span class="p">(</span><span class="nv">$userdata</span><span class="p">[</span><span class="s1">&#39;role&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;editor&quot;</span><span class="p">)){</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">wp_update_user</span><span class="p">(</span><span class="nv">$userdata</span><span class="p">);</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC22'><span class="p">}</span></div><div class='line' id='LC23'><span class="cp">?&gt;</span><span class="x"></span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1360173/32d0480d30bd248f760daf07d1b78e498edd9c98/functions.php" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1360173#file_functions.php" style="float:right;margin-right:10px;color:#666">functions.php</a>
            <a href="https://gist.github.com/1360173">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>And there you have it! Now all users registered to your WordPress site will be assigned a role of their choosing automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/assigning-role-on-wordpress-registration-page/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Renaming jQuery UI Tabs With Validation</title>
		<link>http://octalforty.com/articles/renaming-jquery-ui-tabs-with-validation/</link>
		<comments>http://octalforty.com/articles/renaming-jquery-ui-tabs-with-validation/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 08:38:45 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryui]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=81</guid>
		<description><![CDATA[Recently, one of our projects requires me to use jQuery UI Tabs for its user interface. One of the problem was, to figure a way for the user&#8230;]]></description>
			<content:encoded><![CDATA[<p>Recently, one of our projects requires me to use jQuery UI Tabs for its user interface. One of the problem was, to figure a way for the user to rename the tab and validate the input at the same time. Most of the site’s client-side validation is through jQuery Validate plugin, so that should be straight-forward.</p>
<p>Want to see the it in action? Why not play around with the <a href="http://octalforty.com/demo/renaming-jquery-ui-tabs-with-validation/">online demo</a> or <a href="http://octalforty.com/demo/renaming-jquery-ui-tabs-with-validation/demo.zip?9707a5">download the source files</a>.</p>
<h3>The markup</h3>
<p>First off, let’s start by including jQuery, jQuery UI and jQuery livequery plugin. For this demo, I’ll point the files to Google CDN whenever possible, and start with the jQuery UI Tabs <a href="http://jqueryui.com/demos/tabs/default.html" title="jQuery UI Tabs Default Functionality Demo">default functionality demo</a> markup.</p>
<div class="chili">
<pre>
<code class="html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html lang="en"&gt;
	&lt;head&gt;
		&lt;meta charset="UTF-8" /&gt;
		&lt;title&gt;jQuery UI Tabs - Default functionality&lt;/title&gt;
		&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="js/jquery.livequery.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"&gt;&lt;/script&gt;

		&lt;link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css" rel="stylesheet" /&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;div id="demo"&gt;
			&lt;div id="tabs"&gt;
				&lt;ul id="tabs-nav"&gt;
					&lt;li&gt;&lt;a href="#tabs-1"&gt;&lt;span&gt;Nunc tincidunt&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href="#tabs-2"&gt;&lt;span&gt;Proin dolor&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href="#tabs-3"&gt;&lt;span&gt;Aenean lacinia&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
				&lt;/ul&gt;
				&lt;div id="tabs-1"&gt;
				&lt;!-- Content for the first tab will be here --&gt;
				&lt;/div&gt;
				&lt;div id="tabs-2"&gt;
				&lt;!-- Content for the second tab will be here --&gt;
				&lt;/div&gt;
				&lt;div id="tabs-3"&gt;
				&lt;!-- Content for the third tab will be here --&gt;
				&lt;/div&gt;
			&lt;/div&gt;&lt;!-- /#tabs --&gt;
		&lt;/div&gt;&lt;!-- /.demo --&gt;
		&lt;script type="text/javascript"&gt;&lt;/script&gt;
	&lt;/body&gt;
&lt;/html&gt;</code>
</pre>
</div>
<h3>The JavaScript</h3>
<p>We’ll be including most of the scripts inside the <code>&lt;script&gt;</code> tag on line 32. We’ll split the whole interaction to few phases so that we can see clearly what we should do. The happy path should be something like:</p>
<ol>
<li>Click on the tab name to edit.</li>
<li>Display input text with the tab name filled in by default.</li>
<li>If the name is changed, save it. Otherwise, revert to the old name.</li>
</ol>
<p>We’ll also limit the ability to rename a tab to just the <strong>currently selected tab</strong> only.</p>
<h4>Step 1: Click Tab Name To Edit.</h4>
<p>For this, we’ll be taking advantage of LiveQuery to bind the click events to the selected tab’s span.</p>
<div class="chili">
<pre>
<code class="js">$(function() {
	// Initialize tabs with the default options
	$("#tabs").tabs();
	// Bind "click" event to the span, so that it calls the renameTab function
	$("li.ui-tabs-selected span").livequery("click", function(){
		renameTab(this);
	});
});</code>
</pre>
</div>
<h4>Step 2: Display input text with the tab name as default value</h4>
<p>Now we need to create a function to handle the “click”, and inject the form. We’ll also save the current tab name in a variable, and bind the save and cancel buttons.</p>
<div class="chili">
<pre>
<code class="js">function renameTab(obj) {
	var  obj = $(obj),
		oldName = $(obj).html(),
		editMode = '&lt;div class="editable"&gt;&lt;form id="rename_tab_form"&gt;&lt;input type="text" id="new_tab_name" value="' + oldName + '" name="new_tab_name" maxlength="20" /&gt;&lt;button id="saveRename" class="btn"&gt;&lt;span&gt;Save&lt;/span&gt;&lt;/button&gt;&lt;button id="cancelRename" class="btn"&gt;&lt;span&gt;Cancel&lt;/span&gt;&lt;/button&gt;&lt;/form&gt;&lt;/div&gt;',
		form = $("#rename_tab_form");
	// Inject the form after the span, and then remove the span from DOM
	obj.after(editMode).remove();
	//We might not need this now, but it will be useful later when we add in validation
	$("div.editable", "#tabs-nav").closest("a").addClass("editing");
	$("#new_tab_name").bind("focus", function() {
		this.select();
	}).focus();

	$("#saveRename").bind("click", function() {
		$("#rename_tab_form").submit();
		return false;
	});

	$("#cancelRename").bind("click", function() {
		replaceName( false, this, oldName );
		return false;
	});
	$("body").bind("click", function(e) {
		var target = e.target.id;
		if ( target != 'cancelRename' ) {
			replaceName(false, $("#cancelRename"), oldName);
		}
		return false;
	});

	$("#rename_tab_form").bind("submit", function(e) {
		replaceName( true, $("#cancelRename"), $("#new_tab_name").val() );
		e.preventDefault();
		return false;
	});
}</code>
</pre>
</div>
<h4>Save or cancel?</h4>
<p>Now that we’ve the form shown to the user and properly bind them to an event, they could either <em>save</em> it, or <em>cancel</em> it by clicking the cancel button or anywhere within the page. We write a function to handle these request and handle them properly. I’ve also included a check if the name is empty, it will be named as “Untitled” instead. But this could be removed based on your validation criteria later on.</p>
<div class="chili">
<pre>
<code class="js">// replaceName (boolean, object, value)
function replaceName(action, obj, val) {
	var name = '';

	if (action) { // If action is "true", we save the data
		// You could use the .ajax() method to save the data as you see fit
	} else {
		name = val;
	}

	if ( val == '' ) {
		val = 'Untitled';
	}

	$(obj).parents("div.editable").after('&lt;span&gt;'+ val +'&lt;/span&gt;').remove();
	$("li.ui-tabs-selected span","#tabs-nav").closest("a").removeClass("editing");
	$("#saveRename, #cancelRename, body").unbind();

}</code>
</pre>
</div>
<h4>Using the jQuery Validation plugin</h4>
<p>If you’re already familiar with the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" title="jQuery Validation Plugin">Validation plugin</a>, this should be easy. If not, I suggest you to go through the <a href="http://docs.jquery.com/Plugins/Validation" title="jQuery Validation Plugin Documentation">documentation</a> quickly.</p>
<div class="chili">
<pre>
<code class="js">$("#rename_tab_form").validate({
	errorClass : "error validation",
	success : "valid",
	rules : {
		new_tab_name : {
			required : true,
			maxlength : 20,
			minlength: 3
		}
	},
	errorElement : "div",
	errorPlacement : function (error, element) {
		var nextSibling  = element.siblings("div.error"),
		counter = 1;
		nextSibling.remove().empty();
		var hasErrorElement = nextSibling.val();
		if (hasErrorElement == null || hasErrorElement == '') {
			error.insertAfter(element).wrap("&lt;div class='error-wrapper'&gt;&lt;/div&gt;").parent().append("&lt;div class='error-pointer'&gt;&lt;/div&gt;");
			// Not sure why I'm getting multiple error elements, so we need to remove this manually
			$("div.error-wrapper").eq(0).siblings("div.error-wrapper").remove();
			return false;
		}
	},
	unhighlight : function() {
		$("div.error-wrapper").remove();
	},
	submitHandler: function(form) {
		return false;
	}
});</code>
</pre>
</div>
<p>Easy eh? Now all we have to do is revisit our renameTab function and include the call for validation, on line 13 and 34 — 37 as per below:</p>
<div class="chili">
<pre>
<code class="js">function renameTab(obj) {
	var  obj = $(obj),
		oldName = $(obj).html(),
		editMode = '&lt;div class="editable"&gt;&lt;form id="rename_tab_form"&gt;&lt;input type="text" id="new_tab_name" value="' + oldName + '" name="new_tab_name" /&gt;&lt;button id="saveRename" class="btn"&gt;&lt;span&gt;Save&lt;/span&gt;&lt;/button&gt;&lt;button id="cancelRename" class="btn"&gt;&lt;span&gt;Cancel&lt;/span&gt;&lt;/button&gt;&lt;/form&gt;&lt;/div&gt;',
		form = $("#rename_tab_form");

	obj.after(editMode).remove();

	$("div.editable", "#tabs-nav").closest("a").addClass("editing");

	$("#new_tab_name").bind("focus", function() {
		this.select();
		validate();
	}).focus();

	$("#saveRename").bind("click", function() {
		$("#rename_tab_form").submit();
		return false;
	});

	$("#cancelRename").bind("click", function() {
		replaceName( false, this, oldName );
		return false;
	});
	$("body").bind("click", function(e) {
		var target = e.target.id;
		if ( target != 'cancelRename' ) {
			replaceName(false, $("#cancelRename"), oldName);
		}
		return false;
	});

	$("#rename_tab_form").bind("submit", function(e) {
		var isValid = $("#new_tab_name").valid();
		if ( isValid ) {
			replaceName( true, $("#cancelRename"), $("#new_tab_name").val() );
		}
		e.preventDefault();
		return false;
	});
}</code>
</pre>
</div>
<p>And that’s it! To make the validation message appears a bit more nicer, we could apply the <a href="http://www.filamentgroup.com/lab/image_free_css_tooltip_pointers_a_use_for_polygonal_css/" title="Image-free CSS Tooltip Pointers - A Use for Polygonal CSS? by Filament Group">polygonal CSS</a> technique as mentioned by the fine guys in Filament, as per below :</p>
<div class="chili">
<pre>
<code class="css">#rename_tab_form { position: relative; }
#rename_tab_form .error-wrapper { position: absolute; top: -37px; padding: 5px 10px; background: #9a0000; border-top: 1px solid #740000; border-bottom: 1px solid #740000; width: auto; }
#rename_tab_form .error-wrapper .error { padding: 0; color: #fefefe; }
#rename_tab_form .error-pointer { width:0; height:0; position: absolute; bottom: -10px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 10px solid #9a0000; border-bottom: 0; }</code>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/renaming-jquery-ui-tabs-with-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>At long last, Adagio is here</title>
		<link>http://octalforty.com/articles/at-long-last-adagio-is-here/</link>
		<comments>http://octalforty.com/articles/at-long-last-adagio-is-here/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 11:52:01 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=3</guid>
		<description><![CDATA[A short introductory post on the new theme called Adagio, build on Wordpress by Yassir Yahya.]]></description>
			<content:encoded><![CDATA[<p>Octalforty has been offline for quite a while. Who would’ve thought that the idea to introduce a new theme for octalforty would end up getting dragged for years! Articles from previous versions of octalforty was transferred between various HDD… and got lost.</p>
<p>In any case, Adagio is mostly about me experimenting with typography and minimal design. Bits and pieces across the site is still untouched. Most of the areas involving forms, search, and even archive page have not been styled as of yet.</p>
<p>Any feedback on the new design? Why not get in touch with me on <a title="@yassiryahya on Twitter" href="http://twitter.com/yassiryahya">Twitter</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/at-long-last-adagio-is-here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Delete Myspace Tracker Comment</title>
		<link>http://octalforty.com/articles/how-to-delete-myspace-tracker-comment/</link>
		<comments>http://octalforty.com/articles/how-to-delete-myspace-tracker-comment/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 15:52:23 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[myspace]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=17</guid>
		<description><![CDATA[Myspace beginning to piss me off somehow. Everywhere I go there’s those spam about tracker thing. And people told me that they can’t delete it, thus forcing them to delete their account :( Well enough of this! Today I’m going to show you how to remove those comments!]]></description>
			<content:encoded><![CDATA[<div class="message-highlight">
<p><strong>Hello</strong>. Just so you know, this article is recovered from previous version of <em>octalforty</em> and will not be maintained. </p>
</div>
<p>Myspace beginning to piss me off somehow. Everywhere I go there’s those spam about tracker thing. And people told me that they can’t delete it, thus forcing them to delete their account :(</p>
<p><img width="472" height="150" border="0" align="middle" title="myspace_tracker_01.jpg" alt="myspace_tracker_01.jpg" src="http://web.archive.org/web/20070109232039/http://web.archive.org/wp-content/uploads/2007/1/myspace_tracker_01.jpg"></p>
<p>Well enough of this! Today I’m going to show you how to remove those comments!</p>
<p>So here’s what you need to do :</p>
<ol>
<li>
<p>Log on to Myspace, then go to <strong>Edit/View All Comments</strong>. It’s there if you view your profile. The easiest way is to copy this string below and paste it in your URL bar.</p>
<pre><code>http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&amp;amp;friendID=[yourfriendID]</code></pre>
<p>Make sure to replace “[yourfriendID]” with your friend ID number.</p>
</li>
<li>
<p>Now come’s the tricky part. First we need to understand how <strong>MySpace sort the comments</strong>. The <strong>first comments on top will always be with number 00</strong>. The one above that post will be 01 and so on. Remember the <strong>count doesn’t start with 1, but with 0!</strong></p>
</li>
<li>
<p>Now by doing that, you now know the comment ID number of the one that you want to delete, which is the spam tracker thing in this case. Check the code below :</p>
<pre><code>javascript:__doPostBack('ctl00$Main$PagedComments$viewComments$commentRepeater$ctl00$deleteLinkButton','')&lt;code&gt;&lt;/pre&gt;

&lt;p&gt;The above code is to delete the first comment. So if you’d like to delete, let’s say the third comment, you must type this in your URL address:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;javascript:__doPostBack('ctl00$Main$PagedComments$viewComments$commentRepeater$ctl02$deleteLinkButton','')</code></pre>
<p>Notice the <strong><code>02</code></strong>? (Hint it’s the <code>ctl02</code> part on the above line). Change <strong>that</strong> according to the <strong>comment ID number</strong>, <strong>paste it in the URL bar</strong> in your browser <strong>and press Enter</strong>.</p>
</li>
<li>
<p>Now <strong>laugh like a mad man</strong> because you did the unthinkable :) Play a recorded sound of thunders if you’d like :P</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/how-to-delete-myspace-tracker-comment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Google Adsense Not Showing Up</title>
		<link>http://octalforty.com/articles/fix-google-adsense-not-showing-up/</link>
		<comments>http://octalforty.com/articles/fix-google-adsense-not-showing-up/#comments</comments>
		<pubDate>Wed, 03 Jan 2007 14:23:38 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[monetize]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=25</guid>
		<description><![CDATA[So your Google Adsense decided not to show itself up on your blog? I’ve had similar problems for the past few months. But today, it works flawlessly! With the help of some of the few Google Adsense Support Team of course. I’m surprised how I didn’t managed to come across this “fix” all these months of “google”ing countless websites on how to solve this.]]></description>
			<content:encoded><![CDATA[<div class="message-highlight">
<p><strong>Hello</strong>. Just so you know, this article is recovered from previous version of <em>octalforty</em> and will not be maintained. </p>
</div>
<p>So your Google Adsense decided not to show itself up on your blog? I’ve had similar problems for the past few months. At first I thought it would take a few weeks for the Adsense to show up just to get the appropriate ad that matches my content. So I waited… and waited… until I gave up.</p>
<p>But today, it works flawlessly! With the help of some of the few Google Adsense Support Team of course. I’m surprised how I didn’t managed to come across this “fix” all these months of “google”ing countless websites on how to solve this.</p>
<p>So let’s see how you can make you Google Adsense start showing up too!</p>
<p>First of all, refer to the <a href="https://www.google.com/adsense/support/">Google Adsense Support page</a>. You’d be amazed at how much information you can find there that will help you. Here’s a few basic things you should know though, just for your easy reference, taken from the <a href="https://www.google.com/adsense/support/">Google Adsense Support</a> page :</p>
<p><strong>When will Google recrawl my site?</strong></p>
<blockquote><p>
At this time, we’re unable to control how often our crawlers index the content on your site. Crawling is done automatically by our bots. If you make changes to a page, it may take up to 1 or 2 weeks before the changes are reflected in our index.
</p>
</blockquote>
<p><strong>Why are ads not appearing on my site?</strong></p>
<blockquote><p>
If ads are not showing on your site after you’ve added the AdSense code, make sure that the ad code is correctly implemented in your site. You can do this by viewing the source of your site from a browser and double-checking that the ad code looks exactly like the code we provide you in your account, and includes every line of the ad code.</p>
<p><em><a href="https://www.google.com/adsense/support/bin/answer.py?answer=10036&amp;topic=8439">Read more on this here</a></em>
</p>
</blockquote>
<p>So, you’ve <strong>referred the support page,</strong> <strong>enable JavaScript</strong>, <strong>disable all your adblocking software and firewall</strong>, and 100% sure that you <strong>have not been disapproved on your AdSense application within the past 48 hours</strong>.</p>
<p>So what could you do? Below I listed two extra solution that might help you in solving your problem, as it did with mine.</p>
<ul>
<li><strong>Check HOSTS file</strong></li>
<p>Go to <strong>%WINDOWSINSTALLPATH%\system32\drivers\etc\</strong>, open and <strong>edit the HOSTS file</strong> with WordPad.</p>
<p>Look out for these lines below, and delete them :<br />
<code>&lt;br /&gt;
127.0.0.1 adwords.google.com&lt;br /&gt;
127.0.0.1 pagead.googlesyndication.com&lt;br /&gt;
127.0.0.1 pagead2.googlesyndication.com&lt;br /&gt;
127.0.0.1 adservices.google.com&lt;br /&gt;
127.0.0.1 www.googleadservices.com&lt;br /&gt;</code></p>
<p><em>FYI: I deleted all URL I could find related to Google Adsense in the end, just to be on the “safe” side</em> :)</p>
<li><strong>Re-register JavaScript</strong></li>
<p><strong>Go to Start &gt; Run</strong>. Key in (without quotes) <strong>“regsvr32 jscript.dll”</strong> in the field and press Enter.
</p>
</ul>
<p>There you have it. My Google Adsense showed up after I did those above steps. Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/fix-google-adsense-not-showing-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Survivor’s Setting For Flock</title>
		<link>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-flock/</link>
		<comments>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-flock/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 16:31:39 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[flock]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=24</guid>
		<description><![CDATA[<p>As promised, here is the step-by-step guide on how you can set up your <strong>Flock brower</strong> for <strong>proxy server</strong> usage.</p>]]></description>
			<content:encoded><![CDATA[<div class="message-highlight">
<p><strong>Hello</strong>. Just so you know, this article is recovered from previous version of <em>octalforty</em> and will not be maintained. </p>
</div>
<p><a href="http://www.octalforty.com/octalified-guide/octalified-guide-survivors-guide-to-internet-outage-introduction/">As promised</a>, here is the step-by-step guide on how you can set up your <strong>Flock brower</strong> for <strong>proxy server</strong> usage.</p>
<p><img alt="Screenshot of Flock - Options" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_fla.jpg?9707a5" id="image73">
<p>
Run <strong>Flock</strong>. Go to “<strong>Tools &gt; Options</strong>“.</p>
<p><img alt="Screenshot of Flock - General Settings" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_flb.jpg?9707a5" id="image74">
<p>
Under “<strong>General</strong>“, click “<strong>Connection Settings</strong>” button.</p>
<p><img alt="Screenshot of Flock - Connection Settings" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_flc.jpg?9707a5" id="image75">
<p>
Check “<strong>Manual proxy configuration:</strong>” and “<strong>Use this proxy server for all protocols</strong>“. Enter the <strong>HTTP Proxy and Port field</strong> according to your choice <a href="http://www.octalforty.com/octalified-guide/octalified-guide-survivors-guide-to-internet-outage-introduction/">earlier</a>. <strong>Click “OK”</strong> and you’re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-flock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Survivor’s Setting For Mozilla Firefox</title>
		<link>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-mozilla-firefox/</link>
		<comments>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-mozilla-firefox/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 16:30:25 +0000</pubDate>
		<dc:creator>Yassir Yahya</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.octalforty.com/?p=22</guid>
		<description><![CDATA[<p>As promised, here is the step-by-step guide on how you can set up your <strong>Firefox browser</strong> for <strong>proxy server</strong> usage.</p>]]></description>
			<content:encoded><![CDATA[<div class="message-highlight">
<p><strong>Hello</strong>. Just so you know, this article is recovered from previous version of <em>octalforty</em> and will not be maintained. </p>
</div>
<p><a href="http://www.octalforty.com/octalified-guide/octalified-guide-survivors-guide-to-internet-outage-introduction/">As promised</a>, here is the step-by-step guide on how you can set up your <strong>Firefox browser</strong> for <strong>proxy server</strong> usage.</p>
<p><img alt="Screenshot of Mozilla Firefox - Options" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_ffa.jpg?9707a5" id="image70"><br />
Run <strong>Mozilla Firefox</strong>. Go to “<strong>Tools &gt; Options</strong>“.<br />
<img alt="Screenshot of Mozilla Firefox - Network Settings" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_ffb.jpg?9707a5" id="image71"><br />
Click “<strong>Advanced</strong>“. Then click “<strong>Network</strong>” tab. Next click “<strong>Settings</strong>” button under the Connection section.<br />
&gt;<img alt="Screenshot of Mozilla Firefox - Connection Settings" src="http://www.octalforty.com/wp-content/uploads/2006/12/survivors_guide_to_internet_outage_ffc.jpg?9707a5" id="image72"><br />
Check “<strong>Manual proxy configuration:</strong>” and “<strong>Use this proxy server for all protocols</strong>“. Enter the <strong>HTTP Proxy and Port field</strong> according to your choice <a href="http://www.octalforty.com/octalified-guide/octalified-guide-survivors-guide-to-internet-outage-introduction/">earlier</a>. <strong>Click “OK”</strong> and you’re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://octalforty.com/articles/survivor%e2%80%99s-setting-for-mozilla-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching using disk: basic
Object Caching 1233/1393 objects using disk: basic

Served from: octalforty.com @ 2012-02-08 05:02:30 -->
