<?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>Lonnie Knows Everything &#187; Programming</title>
	<atom:link href="http://blog.oneduality.com/category/nerd/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.oneduality.com</link>
	<description>So you don&#039;t have to!</description>
	<lastBuildDate>Wed, 30 Nov 2011 19:37:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Post to twitter using PHP without using oauth or the API</title>
		<link>http://blog.oneduality.com/2011/03/15/post-to-twitter-using-php-without-using-oauth-or-the-api/</link>
		<comments>http://blog.oneduality.com/2011/03/15/post-to-twitter-using-php-without-using-oauth-or-the-api/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 18:54:42 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[Nerd Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Curl]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=1167</guid>
		<description><![CDATA[So you want to post twitter updates and perhaps follow people using PHP but you&#8217;re annoyed with that oauth implementation because it makes life difficult? no problem I&#8217;ve constructed a class that implements two functions, posting a status update and following an author .. This is purely for educational purposes and is intended to demonstrate [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to post twitter updates and perhaps follow people using PHP but you&#8217;re annoyed with that oauth implementation because it makes life difficult? no problem</p>
<p>I&#8217;ve constructed a class that implements two functions, posting a status update and following an author .. This is purely for educational purposes and is intended to demonstrate the art of page scraping as well as the use of CURL for posting and retrieving data, I would of course never personally recommend using the code because I&#8217;m sure it&#8217;s some sort of violation of their TOS ;) so yeah.. don&#8217;t do it! ;) ;)</p>
<p>Some important things to note:</p>
<p>1. This will break if twitter changes their html up too much<br />
2. This is probably a violation, so if you do use it, use it reasonably .. don&#8217;t submit a million requests per second, throttle it down =)<br />
3. You&#8217;re using it at your own risk<br />
4. It will post status updates as if you posted from a mobile device ( Ie. Mobile Web )</p>
<p><strong>DOWNLOAD: </strong><a href="http://blog.oneduality.com/tweeter.zip" target="_blank">Click to download example and class file</a></p>
<p><strong>USAGE:</strong></p>
<blockquote><p>include(&#8220;tweeter.php&#8221;);</p>
<p>$tweeter = new tweeter();<br />
$tweeter-&gt;login($username,$password);<br />
$tweeter-&gt;post_tweet(&#8220;Hey, this is cool!&#8221;);<br />
$tweeter-&gt;folllow(&#8220;oneduality&#8221;);</p></blockquote>
<p><strong>Contents of tweeter.php:</strong></p>
<blockquote>
<pre>class tweet {
    var $user;
    var $token='';
    var $ch='';
    var $action='';

    // Logs in to twitter
    function login($user,$pass) {
        $this-&gt;user = $user;

        // Initialize CH
        if (!function_exists("curl_init")) die("This requires the CURL module, please install CURL for php.");
        $this-&gt;ch = curl_init();

        // Parse the login form
        curl_setopt($this-&gt;ch, CURLOPT_URL, "https://mobile.twitter.com/session/new");
        curl_setopt($this-&gt;ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($this-&gt;ch, CURLOPT_FAILONERROR, 1);
        curl_setopt($this-&gt;ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($this-&gt;ch, CURLOPT_RETURNTRANSFER,1);
        curl_setopt($this-&gt;ch, CURLOPT_TIMEOUT, 5);
        curl_setopt($this-&gt;ch, CURLOPT_COOKIEJAR, $this-&gt;user . ".txt");
        curl_setopt($this-&gt;ch, CURLOPT_COOKIEFILE, $this-&gt;user . ".txt");
        curl_setopt($this-&gt;ch, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 ");
        $page = curl_exec($this-&gt;ch);

        $page = stristr($page, "
<div class="signup-body">");
        preg_match("/form action=\"(.*?)\"/", $page, $this-&gt;action);
        preg_match("/input name=\"authenticity_token\" type=\"hidden\" value=\"(.*?)\"/", $page, $this-&gt;token);

        // Login and get your home page
        $strpost = "authenticity_token=".urlencode($this-&gt;token[1])."&amp;username=".urlencode($user)."&amp;password=".urlencode($pass);
        curl_setopt($this-&gt;ch, CURLOPT_URL, $this-&gt;action[1]);
        curl_setopt($this-&gt;ch, CURLOPT_POSTFIELDS, $strpost);
        $page = curl_exec($this-&gt;ch);

        // Verify that we logged in ok
        preg_match("/\
<div class="\&quot;warning\&quot;\">(.*?)\&lt;\/div\&gt;/", $page, $warning);
        if (isset($warning[1])) return $warning[1];
        $page = stristr($page,"
<div class="tweetbox">");
        preg_match("/form action=\"(.*?)\"/", $page, $this-&gt;action);
        preg_match("/input name=\"authenticity_token\" type=\"hidden\" value=\"(.*?)\"/", $page, $this-&gt;authenticity_token);
    }

    function post_tweet($status) {

        // Set status
        $tweet['display_coordinates']='';
        $tweet['in_reply_to_status_id']='';
        $tweet['lat']='';
        $tweet['long']='';
        $tweet['place_id']='';
        $tweet['text']=$status;
        $ar = array("authenticity_token" =&gt; $this-&gt;token[1], "tweet"=&gt;$tweet);
        $data = http_build_query($ar);
        curl_setopt($this-&gt;ch, CURLOPT_URL, $this-&gt;action[1]);
        curl_setopt($this-&gt;ch, CURLOPT_POSTFIELDS, $data);
        $page = curl_exec($this-&gt;ch);

        return true;
    }

    function follow($author_name) {

        $action = "http://mobile.twitter.com/$author_name/follow";
        $ar = array("authenticity_token" =&gt; $this-&gt;token[1], "tweet"=&gt;$tweet, 'last_url'=&gt;'/$author_name', );
        $data = http_build_query($ar);
        curl_setopt($this-&gt;ch, CURLOPT_URL, $action);
        curl_setopt($this-&gt;ch, CURLOPT_POSTFIELDS, $data);
        $page = curl_exec($this-&gt;ch);

        return true;
    }
}</div>
</div>
</div>
</pre>
</blockquote>
<h4>Incoming search terms:</h4><ul><li>curl login to twitter without Oauth</li><li>php post to twitter 2011</li><li>tweeter api php oauth</li><li>post to twitter without oauth</li><li>twitter php api</li><li>Posting to Twitter using PHP</li><li>post to twitter php 2011</li><li>php post twitter without api</li><li>How to post to twitter with php and Curl without oAuth</li><li>post twitter via php 2011</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.599 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2011/03/15/post-to-twitter-using-php-without-using-oauth-or-the-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear your facebook wall entirely with Greasemonkey and Firefox</title>
		<link>http://blog.oneduality.com/2010/12/13/clear-your-facebook-wall-entirely-with-greasemonkey-and-firefox/</link>
		<comments>http://blog.oneduality.com/2010/12/13/clear-your-facebook-wall-entirely-with-greasemonkey-and-firefox/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 19:04:32 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=1158</guid>
		<description><![CDATA[Previously I posted a perl script who&#8217;s job was to clear out your wall posts, it worked but was slow and with the recent facebook updates.. it may no longer function. I was browsing for an alternative that was simple and stumbled on a greasemonkey script to clear recent activity,  adapted that code to suit [...]]]></description>
			<content:encoded><![CDATA[<p>Previously I posted a perl script who&#8217;s job was to clear out your wall posts, it worked but was slow and with the recent facebook updates.. it may no longer function.</p>
<p>I was browsing for an alternative that was simple and stumbled on a greasemonkey script to clear recent activity,  adapted that code to suit my needs and the result is my greasemonkey wall cleaner.</p>
<p><a href="http://userscripts.org/scripts/show/92664">http://userscripts.org/scripts/show/92664</a></p>
<h4>Incoming search terms:</h4><ul><li>facebook wall cleaner</li><li>clean facebook wall</li><li>CLEAR FACEBOOK WALL</li><li>facebook clear wall</li><li>greasemonkey facebook wall</li><li>greasemonkey delete facebook wall</li><li>greasemonkey facebook wall cleaner</li><li>greasemonkey clear facebook wall</li><li>clear facebook wall greasemonkey</li><li>wall cleaner facebook</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.487 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2010/12/13/clear-your-facebook-wall-entirely-with-greasemonkey-and-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Advantages of PHP</title>
		<link>http://blog.oneduality.com/2010/08/16/advantages-of-php/</link>
		<comments>http://blog.oneduality.com/2010/08/16/advantages-of-php/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 23:30:20 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=1060</guid>
		<description><![CDATA[PHP Hypertext Processor is a server-side internet computer computer programming language that may be embedded into hypertext markup language. PHP usages are widespread, and may include any kind of server functionality that accepts user&#8217;s input and shows or alters the input. PHP may execute on both UNIX operating system and Windows servers, which makes it [...]]]></description>
			<content:encoded><![CDATA[<p>PHP Hypertext Processor is a server-side internet computer computer programming language that may be embedded into hypertext markup language. PHP usages are widespread, and may include any kind of server functionality that accepts user&#8217;s input and shows or alters the input. PHP may execute on both UNIX operating system and Windows servers, which makes it handier than Windows (ASP). This scripting language is maturing daily. PHP5 is a fully object oriented programming language and its platform independence and speed on UNIX server helps to build big and complex World Wide Web applications.</p>
<p><span id="more-1060"></span><br />
PHP is an especially effective programing language because it allows advanced computer programing  and is easy to mix with web pages. Another advantage of PHP is that the programming language interfaces very easily with MySQL, a popular computer database. MYSQL is a commercial class database application that is made available free under the Open Source to anyone. Another plus of PHP is that it is Open Source Code. The actual computer code that is PHP is available to the public free of charge, while the source code for products such as ASP is not. Therefore PHP is very affordable. Because PHP is open source, there&#8217;s a big community of PHP coders that help one another with code. This means PHP programmers can rely on one another by using reusable pieces of code called functions and classes besides constantly reinventing the wheel. This can dramatically cut back on production time.</p>
<p>PHP is based on C++ language and the syntax used in PHP is quite similar to C/C++. C/C++ is still considered the best programing language by many programmers and people who love this language would surely feel comfier with the syntax of PHP.</p>
<p>PHP and MySQL are excellent choice for webmasters anticipating automate their sites. Now search spiders &#8220;see&#8221; all the content on a PHP page, as is way it is viewed in a browser. The creation of a php-shopping cart is surprisingly simple and when finished precision it could translate into a extremely effective and universally accepted php-shopping cart.</p>
<h4>Incoming search terms:</h4><ul><li>open source music servers linux</li></ul><!-- SEO SearchTerms Tagging 2 plugin took -0.318 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2010/08/16/advantages-of-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mass Content into Joomla&#8217;s K2 Component!</title>
		<link>http://blog.oneduality.com/2010/07/27/mass-content-into-joomlas-k2-component/</link>
		<comments>http://blog.oneduality.com/2010/07/27/mass-content-into-joomlas-k2-component/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 18:48:19 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=948</guid>
		<description><![CDATA[The Joomla Mass Content component is something I&#8217;ve used for a long time to help make the creation of sections, categories and articles much easier because it enables the developer to create all of these items on a single screen without having to jump back and forth in the control panel. This handy tool can [...]]]></description>
			<content:encoded><![CDATA[<p>The Joomla Mass Content component is something I&#8217;ve used for a long  time to  help make the creation of sections, categories and articles  much easier because  it enables the developer to create all of these  items on a single screen without  having to jump back and forth in the  control panel. This handy tool can  eliminate hours of unnecessary  development time by consolidating several screens  into one.</p>
<p>In a previous blog entry (<a href="http://blog.oneduality.com/2010/07/27/joomla-and-k2-a-true-romance-story/">please  refer to Joomla and K2, a True Romance Story</a>),  I mentioned some of the advantages of  the Joomla K2 component. The  obvious question is how can the K2 component and  the Mass Content  component work together when the Mass Content component creates   standard Joomla content and the K2 component creates content that is  managed  outside of core system?</p>
<p>Fortunately, there is a solution that allows you to incorporate both   components and reap the benefits of each. The K2 component has a very  nifty  feature that lets you import content. So, when developing a new  website, as long  as you follow these steps in the proper sequence, you  should be fine.</p>
<p>1.  Install the Mass Content component<br />
2. Create your sections, categories and  content items within the Mass Content component<br />
3. When everything is set up  as you like it, run the K2 article import</p>
<p>With  step #3, the K2 system  will turn Joomla sections into top level K2  categories and the standard Joomla  categories into K2 sub-categories.  In my experience with this, everything has  gone without a hitch.</p>
<p>You  can now start building your navigational  structure in the K2 system  and delete all of the items, categories and sections  from within the  core Joomla content system. With this approach, I hope you will  find as  I did, that despite using two additional components – K2 and Mass   Content &#8211; you will save quite a bit of development time.</p>
<p><strong>Related Links:</strong><br />
Mass Content Component &#8211; <a href="http://extensions.joomla.org/extensions/news-production/mass-content/2514">Download  Link</a><br />
K2 for Joomla &#8211; <a href="http://getk2.org/">Download Link</a></p>
<h4>Incoming search terms:</h4><ul><li>k2 import joomla content</li><li>k2 bulk categories</li><li>joomla masscontent k2</li><li>k2 mass content</li><li>joomla k2 bulk</li><li>Mass Content Component</li><li>mass content k2</li><li>mass add category k2 joomla</li><li>mass category creation k2</li><li>k2 mass category creation</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.133 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2010/07/27/mass-content-into-joomlas-k2-component/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joomla and K2, a True Romance Story</title>
		<link>http://blog.oneduality.com/2010/07/27/joomla-and-k2-a-true-romance-story/</link>
		<comments>http://blog.oneduality.com/2010/07/27/joomla-and-k2-a-true-romance-story/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 18:45:45 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=944</guid>
		<description><![CDATA[As a professional developer, I&#8217;ve had quite a bit of experience working with the Joomla content management system and I can honestly say I&#8217;m very pleased with how versatile it can be in developing a broad range of website solutions. Where Joomla really shines is in its ability to be extended by way of modules, [...]]]></description>
			<content:encoded><![CDATA[<p>As a professional developer, I&#8217;ve had quite a bit of experience  working with the Joomla content management system and I can honestly say  I&#8217;m very pleased with how versatile it can be in developing a broad  range of website solutions. Where Joomla really shines is in its ability  to be <a href="http://extensions.joomla.org/" target="_blank">extended by way of modules, components and plugins</a> that provide useful features that the core system doesn&#8217;t include.</p>
<h2>Meet K2</h2>
<p>The component &#8220;K2&#8243; is an alternate content system for Joomla that  provides many additional features, the most notable features that have  proven to be invaluable are:</p>
<ol>
<li>Nested categories</li>
<li>The capability to assign templates to categories</li>
<li>Improved Access Control List (ACL)</li>
<li>Article comments</li>
</ol>
<p>There is far more to K2 than the features listed above, but these  features have made an already powerful content management solution a  much more robust package to say the least.</p>
<p>Utilizing nested categories and custom templates, TDH developers have  been able to create a feature-rich product catalog, for example. The  possibilities are endless and I&#8217;m excited to see what other magic can be  conjured up with this powerful tool set.</p>
<p>Joomla can be found at <a href="http://www.joomla.org/" target="_blank">http://www.joomla.org</a>, and you can check out the free K2 component at <a href="http://getk2.org/" target="_blank">http://getk2.org</a>.</p>
<h4>Incoming search terms:</h4><ul><li>joomla k2 trackback</li><li>advantages features K2 joomla</li><li>joomla k2 component book</li><li>joomla k2 pingback</li><li>k2 trackback joomla</li><li>k2 true stories</li><li>movie k2 true story</li><li>trackbacks k2 joomla</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.093 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2010/07/27/joomla-and-k2-a-true-romance-story/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use perl to automatically delete your facebook wall posts!</title>
		<link>http://blog.oneduality.com/2010/05/06/use-perl-to-automatically-delete-your-facebook-wall-posts/</link>
		<comments>http://blog.oneduality.com/2010/05/06/use-perl-to-automatically-delete-your-facebook-wall-posts/#comments</comments>
		<pubDate>Thu, 06 May 2010 15:46:27 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerd Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=474</guid>
		<description><![CDATA[UPDATE: as of 11/30/2011 I have abandoned this all together, I use cleanmywall.net, or did until it went down .. you can now use this link for your cleaning needs. UPDATE: as of 12/13/2010 I have a greasemonkey script for firefox that works much better than this.. http://userscripts.org/scripts/show/92664 Continue reading if you want :) OK [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: as of 11/30/2011 I have abandoned this all together, I use cleanmywall.net, or did until it went down .. you can now use <a href="http://cleanmywall.netbew.com/install.html">this link</a> for your cleaning needs.</p>
<p>UPDATE: as of 12/13/2010 I have a greasemonkey script for firefox that works much better than this.. <a href="http://userscripts.org/scripts/show/92664">http://userscripts.org/scripts/show/92664</a></p>
<p>Continue reading if you want :)</p>
<p>OK I won&#8217;t lie, this was cobbled together quickly .. and it will only delete so many at a time so you&#8217;ll need to run it a few times if you&#8217;ve got a lot of posts, I could make it so that it loops and deletes everything but I wanted to put it out there.</p>
<p>Use it at your own risk! if you get banned from facebook for automating something then that&#8217;s your own fault.. this is purely for educational purposes only and all that jazz =) *wink wink*<br />
Continue on reading!..</p>
<p><span id="more-474"></span>This code will log you in, go to m.facebook.com/minifeed.php and pull a list of stories then will loop through and delete them with a 5 second rest between deletes..  (less obvious) .. it also pretends to be firefox.</p>
<p>This requires WWW::Mechanize, HTTP::Cookies, HTML::Parser and HTML::TagParser .. ENJOY!</p>
<blockquote><p>#!/usr/bin/perl<br />
use WWW::Mechanize;<br />
use HTTP::Cookies;<br />
use HTML::Parser;<br />
use HTML::TagParser;</p>
<p>my $username = &#8220;user\@domain.com&#8221;;<br />
my $password = &#8220;password&#8221;;<br />
my $mech = WWW::Mechanize-&gt;new();</p>
<p>$mech-&gt;agent_alias( &#8216;Linux Mozilla&#8217; );<br />
$mech-&gt;cookie_jar(HTTP::Cookies-&gt;new());<br />
$mech-&gt;post(&#8220;https://login.facebook.com/login.php?m&amp;next=http://m.facebook.com/minifeed.php&#8221;,{email=&gt;$username,pass=&gt;$password});<br />
my $test = $mech-&gt;content();<br />
$mech-&gt;content() =~ /url=(.*?)&#8221;/;<br />
my $newurl = $1;</p>
<p>$mech-&gt;get($newurl);</p>
<p>my $html = $mech-&gt;content();</p>
<p>my $parser = HTML::Parser-&gt;new( api_version =&gt; 3,start_h =&gt; [\&amp;start,"tagname, attr"], );<br />
my @links;<br />
sub start {<br />
my ($tag, $attr) = @_;<br />
if ($tag =~ /^a$/ and defined $attr-&gt;{href}) {<br />
return<br />
if ($attr-&gt;{href} =~ m!^http://! and $opts{r}); # exclude absolute url when -r<br />
return<br />
if ($attr-&gt;{href} !~ m!http://! and $opts{a});# exclude relative url when -a<br />
push @links, $attr-&gt;{href};<br />
}<br />
}<br />
$parser-&gt;parse($html);<br />
$parser-&gt;eof;</p>
<p>foreach $link (@links) {<br />
if ($link =~ /delete\.php/) {<br />
$mech-&gt;get(&#8220;http://m.facebook.com&#8221; . $link);</p>
<p>$html_p = HTML::TagParser-&gt;new( $mech-&gt;content() );<br />
@elem = $html_p-&gt;getElementsByTagName( &#8220;form&#8221; );<br />
$action = $elem[0]-&gt;getAttribute(&#8220;action&#8221;);</p>
<p>@elem = $html_p-&gt;getElementsByAttribute( &#8220;name&#8221;, &#8220;fb_dtsg&#8221; );<br />
$fb_dtsg = $elem[0]-&gt;getAttribute(&#8220;value&#8221;);</p>
<p>@elem = $html_p-&gt;getElementsByAttribute( &#8220;name&#8221;, &#8220;ministory_key&#8221; );<br />
$ministory_key = $elem[0]-&gt;getAttribute(&#8220;value&#8221;);</p>
<p>@elem = $html_p-&gt;getElementsByAttribute( &#8220;name&#8221;, &#8220;story_type&#8221; );<br />
$story_type = $elem[0]-&gt;getAttribute(&#8220;value&#8221;);</p>
<p>@elem = $html_p-&gt;getElementsByAttribute( &#8220;name&#8221;, &#8220;profile_id&#8221; );<br />
$profile_id = $elem[0]-&gt;getAttribute(&#8220;value&#8221;);</p>
<p>@elem = $html_p-&gt;getElementsByAttribute( &#8220;name&#8221;, &#8220;confirm&#8221; );<br />
$confirm_id = $elem[0]-&gt;getAttribute(&#8220;value&#8221;);</p>
<p>print &#8220;Deleting mini story key: $ministory_key..\n&#8221;;<br />
$mech-&gt;post(&#8220;http://m.facebook.com&#8221; . $action,<br />
{fb_dtsg=&gt;$username,<br />
ministory_key=&gt;$ministory_key,<br />
story_type=&gt;$story_type,<br />
profile_id=&gt;$profile_id,<br />
confirm_id=&gt;$confirm_id});<br />
sleep(5);</p>
<p>}</p></blockquote>
<h4>Incoming search terms:</h4><ul><li>auto delete facebook posts</li><li>facebook auto remove posts</li><li>Facebook Auto Delete posts</li><li>perl facebook</li><li>fb_dtsg</li><li>automatically delete facebook posts</li><li>facebook auto delete</li><li>delete facebook wall</li><li>facebook perl</li><li>login facebook perl search</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.451 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2010/05/06/use-perl-to-automatically-delete-your-facebook-wall-posts/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Shopping cart made from Joomla, K2, Simple Caddy and a CSV import</title>
		<link>http://blog.oneduality.com/2009/09/22/shopping-cart-made-from-joomla-k2-simple-caddy-and-a-csv-import/</link>
		<comments>http://blog.oneduality.com/2009/09/22/shopping-cart-made-from-joomla-k2-simple-caddy-and-a-csv-import/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 17:24:50 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=462</guid>
		<description><![CDATA[One of my clients had recently came to me looking for a clean shopping cart that could be ran mostly via CSV&#8230; they had a &#8220;product matrix&#8221; in excel that had categories, sub categories, item name, skew and price&#8230; I evaluated VirtueMart which I decided was just too bulky and buggy to work with .. [...]]]></description>
			<content:encoded><![CDATA[<p>One of my clients had recently came to me looking for a clean shopping cart that could be ran mostly via CSV&#8230; they had a &#8220;product matrix&#8221; in excel that had categories, sub categories, item name, skew and price&#8230;</p>
<p>I evaluated VirtueMart which I decided was just too bulky and buggy to work with .. then I checked out dozens of others, but none were suited to our needs..  I&#8217;ve run into this issue before and decided to roll my own cart using existing tools.. I opted to use K2 (since Joomla can&#8217;t do subcategories), Simplecaddy (k2 is not a cart) and some custom tweaks..</p>
<p>Read on for more info!</p>
<p><span id="more-462"></span></p>
<p>1. K2 is an amazing content organization system (<a href="http://k2.joomlaworks.gr/" target="_blank">link</a>) that offers a far more flexible way to manage your categories/sub categories&#8230;  it&#8217;s not a shopping cart, but it makes a very effective catalog .. it&#8217;s capable of acting as a blog, an event calendar, a catalog (with no ecom functionality) and many other things&#8230; built in content voting, comments and social sharing options.. it can be everything, or it can be minimal depending on what you turn on and off.</p>
<p>2. Simple Caddy (<a href="http://atlanticintelligence.net/index.php?option=com_phocadownload&amp;view=sections&amp;Itemid=93" target="_blank">link</a>) is a basic cart system, but it lacks a catalog &#8230; it&#8217;s designed for you to be able to build your own product pages within Joomla and slap on &#8220;add to cart&#8221; button and then it provides a method to check out via paypal (only paypal is supported).</p>
<p>3. My own code to import a CSV into the system.. it&#8217;s job is to create the category hierarchy, add the products to simplecaddy, create the items in K2 and apply the simplecaddy tag for &#8220;add to cart&#8221; .. this CSV also adds to another database with additional information that is used to create a product selector, or I guess a better word would be a drill down search.</p>
<p>In addition to the three main ingredients above, I made a series of tweeks to both components to suit my needs.. some of the things I&#8217;ve done.</p>
<p>1. I gutted the K2 item image system, I wanted to keep it automated and simple so I have K2 looking for category images by category name and product images by product ID&#8230; this gives easy ability to just properly name some files and bulk upload them.. this was done entirely in K2 templates.</p>
<p>2. I added an option in Simplecaddy to disable ecom, which simply means it doesn&#8217;t appear even with the tag in place.. the reason being is that for phase one, we&#8217;re just building the catalog and leaving the cart disabled.. if the tag is in place and the simplecaddy plugin is disabled, the tag shows.. we wanted to be able to enable ecom without needing to import again, just a flip of a switch.</p>
<p>3. An additional payment option for simplecaddy (authorized.net)</p>
<p>The result is a fully functioning shopping cart solution powered off of a simple CSV file</p>
<h4>Incoming search terms:</h4><ul><li>simplecaddy</li><li>simplecaddy joomla</li><li>simple caddy</li><li>joomla K2 catalog</li><li>joomla k2 shopping cart</li><li>joomla k2 product catalog</li><li>joomla simplecaddy</li><li>simplecaddy import products</li><li>joomla caddy</li><li>simplecaddy csv</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.009 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2009/09/22/shopping-cart-made-from-joomla-k2-simple-caddy-and-a-csv-import/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Download Dynamic Header Images 1.5.1 Released!</title>
		<link>http://blog.oneduality.com/2009/02/25/download-dynamic-header-images-151-released/</link>
		<comments>http://blog.oneduality.com/2009/02/25/download-dynamic-header-images-151-released/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 18:26:16 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=230</guid>
		<description><![CDATA[Hey gang! Today I&#8217;ve released the latest version of the Oneduality Dynamic Header Images Joomla module (say that 5 times fast) ..  there are a number of enhancements that increase the usefulness and possibilities of the module, primarily, a modification that will allow you the ability to load more than one instance of the module [...]]]></description>
			<content:encoded><![CDATA[<p>Hey gang!</p>
<p>Today I&#8217;ve released the latest version of the Oneduality Dynamic Header Images Joomla module (say that 5 times fast) ..  there are a number of enhancements that increase the usefulness and possibilities of the module, primarily, a modification that will allow you the ability to load more than one instance of the module on a page, as well as change the type of images you&#8217;re using .. for full details and to download it, <a href="http://blog.oneduality.com/dynamic-header-images/">click here!</a></p>
<h4>Incoming search terms:</h4><ul><li>oneduality header image</li><li>Download Dynamic Header Images 1 5 1</li><li>oneduality header</li><li>wordpress blogs</li><li>dynamic header one duality my subscriptions</li><li>Dynamic Header Images 1 5</li><li>one duality header image help</li><li>Dynamic Header Images 1 5 download</li><li>oneduality dynamic header image</li><li>dynamic header images in wordpress</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.253 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2009/02/25/download-dynamic-header-images-151-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Alternating html table colors, in javascript!</title>
		<link>http://blog.oneduality.com/2009/02/05/alternating-html-table-colors-in-javascript/</link>
		<comments>http://blog.oneduality.com/2009/02/05/alternating-html-table-colors-in-javascript/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 15:30:49 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=111</guid>
		<description><![CDATA[Recently I was working on an e-com project where I was given a database that contained the customer&#8217;s product catalog, but the catalog contained tons and tons of html tables that contained no id&#8217;s or classes whatsoever .. they were just vanilla tables that made use of the &#8220;TH&#8221; tag for the header row, so [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on an e-com project where I was given a database that contained the customer&#8217;s product catalog, but the catalog contained tons and tons of html tables that contained no id&#8217;s or classes whatsoever .. they were just vanilla tables that made use of the &#8220;TH&#8221; tag for the header row, so at least i could style that without hassle.</p>
<p>I could easily do some styling to all the tables, but what I really wanted to do was alternate the row&#8217;s colors so that everything didn&#8217;t run together, but without a class for each row (odd/even for example) .. I couldn&#8217;t do it in CSS.</p>
<p>That is where Javascript comes in! read on for more..</p>
<p><span id="more-111"></span></p>
<p>The first thing I did in my PHP code that pulled these tables out of the database was wrap the table in a div with a class of &#8220;product_group&#8221;, then I put this HTML code in the section of the website ..</p>
<p>[sniplet alternating]<br />
We have a function called getElementsByClass which works in both IE and FireFox, I&#8217;ve not tested in ALL browsers so your mileage may vary .. but this allows us to build an array of all elements within a tag of a specified class, in our case, we&#8217;re pulling in all elements contained in &#8220;product_group&#8221;.. Once we have that, we use getElementsByTagName to pull out all of the table rows (TR), and loop through them .. we then tag each one with a class of even or odd.</p>
<p>After you&#8217;ve done that, it&#8217;s really just matter of assigning a background color to the alternating classes you&#8217;ve set up!</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2009/02/05/alternating-html-table-colors-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download Dynamic Header Images 1.5.1</title>
		<link>http://blog.oneduality.com/2009/01/22/download-dynamic-header-images-made-easy/</link>
		<comments>http://blog.oneduality.com/2009/01/22/download-dynamic-header-images-made-easy/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:55:59 +0000</pubDate>
		<dc:creator>Lonnie</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.oneduality.com/?p=88</guid>
		<description><![CDATA[The Dynamic Header Images module has beem moved to it&#8217;s own page which can be found right here The module has also been converted to donationware, and there are two upcoming releases! Roadmap 1. Support fort Virtuemart (custom header images per department) (1.5.2) 2. A re-write of the logic, this will allow you to have [...]]]></description>
			<content:encoded><![CDATA[<p>The Dynamic Header Images module has beem moved to it&#8217;s own page which can be found <a href="http://blog.oneduality.com/dynamic-header-images/">right here</a></p>
<p>The module has also been converted to donationware, and there are two upcoming releases!</p>
<p><strong>Roadmap</strong></p>
<p>1. Support fort Virtuemart (custom header images per department) (1.5.2)<br />
2. A re-write of the logic, this will allow you to have a default image by section and category rather than having to have an image for every article. (1.6)</p>
<h4>Incoming search terms:</h4><ul><li>Dynamic Header joomla</li><li>joomla dynamic header</li><li>header images download</li><li>dinamic header jomla</li><li>Header Image Module download</li><li>joomla dynamic header image</li><li>dynamic header image joomla</li><li>dynamic header images joomla</li><li>Dynamic Header Images download</li><li>mod_od_headerimage</li></ul><!-- SEO SearchTerms Tagging 2 plugin took 0.519 ms -->]]></content:encoded>
			<wfw:commentRss>http://blog.oneduality.com/2009/01/22/download-dynamic-header-images-made-easy/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

