<?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>Russell and Associates - Forum &#187; Programming</title>
	<atom:link href="http://www.randaweb.com/forum/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.randaweb.com/forum</link>
	<description>Marketing, Management, Software Development Opinions and Advice</description>
	<lastBuildDate>Mon, 27 Jun 2011 00:12:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Python &#8211; again</title>
		<link>http://www.randaweb.com/forum/programming/python-again/</link>
		<comments>http://www.randaweb.com/forum/programming/python-again/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 23:46:27 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=686</guid>
		<description><![CDATA[My tasks of late have reacquainted me with the Python programming language.  I used it years ago at American Greetings Interactive, and for about two weeks at Humana in Louisville, KY, but little more.  The infrastructure where I am currently employed uses Cold Fusion, a tag-based language that is efficient when working with web pages, [...]]]></description>
			<content:encoded><![CDATA[<p>My tasks of late have reacquainted me with the<strong> Python programming language</strong>.  I used it years ago at American Greetings Interactive, and for about two weeks at Humana in Louisville, KY, but little more.  The infrastructure where I am currently employed uses Cold Fusion, a tag-based language that is efficient when working with web pages, but I could see little value using it as a sysadmin tool &#8211; quick, concise, terse code in the minimum of time is what I needed &#8211; Python is the perfect choice.</p>
<p>My passion for the language was reignited after creating script after script in little time.  Each script became more &#8216;pythonic&#8217; and better utilized the compact nature of the language.  I again appreciated the indentation over brackets that define a code block &#8211; <em>I had to write readable code</em>!</p>
<p><strong>Email </strong>and <strong>logging </strong>were important aspects of the scripts I was writing.  I thus utilized the &#8216;<strong>logging</strong>&#8216; class library for log file creation &#8211; easy to set up once find the right example.  For email, I used smtplib.</p>
<p>Aside: I am not a fan of Pythons documentation &#8211; I prefer <a title="PHP" href="http://www.php.net/" target="_blank">PHP</a>&#8216;s explain-&gt;example style.  But, a little digging and venturing to popular Python sites (&#8216;<a title="DiveIntoPython" href="http://www.diveintopython.org/" target="_blank">dive into python</a>&#8216;, &#8216;<a title="StackOverflow" href="http://www.stackoverflow.com/" target="_blank">stack overflow</a>&#8216;, <a title="Python.org" href="http://www.python.org/" target="_blank">python.org</a>) will eventually produce the result you need.</p>
<p><a title="logging" href="http://docs.python.org/library/logging.html" target="_blank">Logging in Python</a></p>
<p>The logging class is intuitive and has relatively low code overhead.  There are more complex ways of configuring the logging class, but for my needs, a simple inline syntax was required.  These are sys admin scripts and not part of an application where the time and effort to set up a comprehensive configuration file would be justified.</p>
<pre>import logging</pre>
<pre># Set up logger
logFile = '/path/to/logfile/myLogFileName.log'
logging.basicConfig(filename=logFile,format='%(asctime)s %(message)s',level=logging.DEBUG)</pre>
<p>That is all that is required to set up a logger.  The logfile name can be anything and located anywhere you have read/write privileges.</p>
<p>To use the logger you created, use this command:</p>
<pre>logging.info('An informative log message that applies to info status')</pre>
<p>That will place an Info entry into the log file defined above.</p>
<pre>logging.error('An error message for your app')</pre>
<pre>
<pre>logging.debug('Debug info goes here.')</pre>
</pre>
<p>Now there is no excuse not to use log files in your Python applications.  Simple.  Concise.  Intuitive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/python-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Electrical Contractors &#8211; What Software do you use for estimating?</title>
		<link>http://www.randaweb.com/forum/programming/electrical-contractors-what-software-do-you-use-for-estimating/</link>
		<comments>http://www.randaweb.com/forum/programming/electrical-contractors-what-software-do-you-use-for-estimating/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 19:04:35 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=674</guid>
		<description><![CDATA[In the past, I was involved in the construction industry.  One of the most time consuming and challenging parts of the job was estimating.  Back in my time, the tools available for the smaller contractor were limited &#8211; basically Lotus 123 and later, Excel, spreadsheets.  Pen, paper, and telephone ruled the estimating task for most [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, I was involved in the construction industry.  One of the most time consuming and challenging parts of the job was estimating.  Back in my time, the tools available for the smaller contractor were limited &#8211; basically Lotus 123 and later, Excel, spreadsheets.  Pen, paper, and telephone ruled the estimating task for most small businesses.</p>
<p>Spreadsheets are great for tabulating data, but they are not so good for data lookups.  You can put a small &#8216;database&#8217; together in a spreadsheet and query that, but you must maintain the pricing manually, and save each job sheet separately.  If something is missing, you have to manually look up the price and part number and add it to the data section of the spreadsheet.  Not efficient, and prone to error.</p>
<p><strong>So today, with personal computers in almost every home and on every contractors desk, what do the smaller contractors use for estimating?</strong></p>
<p>I am contemplating creating a service for contractors that provide industry-standard pricing and catalogs with an easy to use web interface.  Everything the contractor needs for estimating will be in the cloud, accessible from anywhere with any web-enabled device (smart phone, tablet computer, laptop, etc).</p>
<p><strong>Anyone have an opinion, or a service that already exists that offers the same functionality, about providing this service for the smaller contractors?</strong></p>
<p>Thanks,</p>
<p>Vic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/electrical-contractors-what-software-do-you-use-for-estimating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Document your code!</title>
		<link>http://www.randaweb.com/forum/programming/document-your-code/</link>
		<comments>http://www.randaweb.com/forum/programming/document-your-code/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 14:11:39 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[PCI Compliance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=608</guid>
		<description><![CDATA[I was recently contracted to work with a small company to enhance and expand their PHP application.  The people were polite and the environment was quite relaxed. I started the first day with the normal optimism that I start all projects with &#8211; looking for ways to contribute and to absorb as much as is [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently contracted to work with a small company to enhance and expand their PHP application.  The people were polite and the environment was quite relaxed.</p>
<p>I started the first day with the normal optimism that I start all projects with &#8211; looking for ways to contribute and to absorb as much as is possible about the systems in place, learn everyone&#8217;s name, understand the political environment, as well as the culture of the organization.  This project was being coded in PHP by other contractors as well as an internal web designer.  After a couple of days, it became obvious that there may be a huge learning curve with the app &#8211; <span style="color: #008000;"><strong>there was absolutely no usable documentation for the design or the myriad of third-party API&#8217;s that were used.</strong></span> To make things worse, the code lacked even the most basic commentary.  Things were thrown together, portions of scripts copy and pasted one into/on-top-of another.  To add insult to injury,  there was no &#8216;dev&#8217; environment &#8211; all code was changed on the production server!  Additionally, no QA person/team existed, nor were there any load tests performed on the app.</p>
<p>When designing a high-availability web application, it is crucial to follow basic infrastructure and design principles:</p>
<p>Separate development code and data from the production code and data until it is fully debugged/QA&#8217;d and integration tested.</p>
<p>Maintain separate databases for development and production.  Preferably, a separate db for QA.</p>
<p>Separate, as much as possible, the presentation layer from the business logic and data layers.</p>
<p>Maintain loose coupling between modules and classes.  A change in one object should not require a cascading change in code that does not deal directly with this object.</p>
<p>Document what was done and why.</p>
<p>Knowing this, I began to decipher the application.  I had to rely on the team members memory since no documentation existed.  It was at this point I discovered a bit of resistance &#8211; they would explain the code they produced, not the underlying functional design that was used for the development.  I needed the functional design specifications AND the API documentation.  &#8221;Just use what is there&#8230;&#8221; &#8211; but the code was amateurish, indecipherable, and unusable!  I have never seen so many header redirects in a PHP script that was not designated as a controller for the app as I experienced there!  How can one trace a <span style="color: #008000;"><strong>logic error </strong></span>given that level of spawning?</p>
<p>As a starting point to any code creation, I always implement a logging class and error/exception handlers.  As you may guess, there wasn&#8217;t any function or class used to standardize the error logging/debugging &#8211; it was all sent to the screen.  I then hunted for the primary Apache logs: no one knew or would share which one was the primary Apache log file  (it was not in /var/logs/httpd on CentOS ).  I did find error_log and access_log files &#8211; but there were multiple instances of them strewn throughout the system.</p>
<p>I began to take simple yet important steps to make the totally procedural application into a segmented one, introducing OO patterns as I went.  The first was a singleton logger class.  Then I authored a singleton DB class.  I was surprized to find that MySQLi was NOT used &#8211; the old MySql db lib was.  <em>Personally, I now prefer PHP&#8217;s SPL PDO since it allows easy translation from database record(s) to object(s)</em>.</p>
<p>One of the assignment we had to do asap was to integrate an additional payment gateway.  I watched as the designer create another monstrosity; my mouth agape, chin on the floor &#8211; cutting and pasting his way through multiple files, using brute force to get it to work.</p>
<p>In the end, the environment was not in line with my principles (easy maintainability, lose coupling, composition over inheritance) or methodology (design, document, THEN code, test, debug, test, load test, debug, update documentation, etc&#8230;.).  There was a chasm between what they do and what I am able to accept &#8211; after all, if the app breaks, I will be the one responsible for a) fixing it and b) defending the code-base.</p>
<p>When questioning the environment, I was even told by a top-level person that this was the way they did things &#8211; no formal code design or standards implementation &#8211; just get it to work any way possible.</p>
<p>An additional problem I saw was PCI compliance.  Credit card info was stored on the servers &#8211; as a session attribute as well as in a third-party application database.  I was &#8220;assured that everything was PCI compliant&#8221; &#8211; however, I was unable to review any documentation on how to maintain that compliance since none existed.  This was too much for me to accept.</p>
<p><span style="background-color: #fdfdfd;"> The lesson I learned were many.  During an interview session:</span></p>
<ul>
<li>Ask to see some of the code that is being produced by the present team.</li>
<li>Request to examine the design and ongoing code documentation.</li>
<li>Find out how they QA and load test the application.</li>
</ul>
<p>If two or more of these questions are not addressed, or, you discover gaps between your standards and those employed at the company, you may want to <em>remove yourself from the situation</em>.  Unless you are going to be the one who implements coding standards, documentation, and testing.  <em>You, as the &#8216;new&#8217; developer, will be responsible for maintaining (extending, debugging) and scaling the code that was already created.</em></p>
<p>Have a GREAT Holiday Season!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/document-your-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyroCMS versus Concrete5</title>
		<link>http://www.randaweb.com/forum/programming/pyrocms-versus-concrete5/</link>
		<comments>http://www.randaweb.com/forum/programming/pyrocms-versus-concrete5/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 21:04:44 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Concrete5]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PyroCMS]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=325</guid>
		<description><![CDATA[We are testing multiple PHP frameworks and CMS platforms for affiliate websites hosted on Host Monster and Go Daddy.  This round, we are testing Concrete 5 and PyroCMS. Both Concrete 5 and PyroCMS are built on top of the Codeigniter framework - a very powerful and simple to learn  MVC framework written in the PHP programming language. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>We are testing multiple PHP frameworks and CMS platforms for affiliate websites hosted on Host Monster and Go Daddy.  This round, we are testing Concrete 5 and PyroCMS.</strong> Both Concrete 5 and PyroCMS are built on top of the Codeigniter framework - a very powerful and simple to learn  MVC framework written in the PHP programming language.</p>
<p><a title="c5 link" href="http://www.concrete5.org/" target="_blank">Concrete5 Link</a> <a title="pyrocms link" href="http://pyrocms.com/" target="_blank">PyroCMS Link</a></p>
<p><em>I am not doing a review of the big frameworks at this time &#8211; Joomla, Mambo, WordPress (blog manager), CakePHP, etc &#8211; there is enough documentation out there that would render my opinion moot.   Besides, I champion the underdogs and fight for their success over established &#8216;big boys&#8217; &#8211; particularly when the underdogs have features and/or performance that exceeds the established players.</em></p>
<p><strong>Concrete5</strong> &#8211; This is an edit-in-place PHP CMS framework with many add-ons (blocks) in the public domain, as well as professional-grade pay-for add-ons <a title="c5 shopping cart module" href="http://www.concrete5.org/marketplace/addons/ecommerce/" target="_blank">like Concrete 5&#8242;s shopping cart module</a>. The main advantage to Concrete5 is the way pages are edited &#8211; they are done so in-place.  You log in, and if you have permissions, you are presented with an admin ribbon menu along the very top of the web page.  Clicking &#8216;Edit this page&#8217; allows you to edit the page!  You can publish your changes immediately, preview them, or hold them for later publication &#8211; an expected feature in any true content management system.  <strong>I give this system 3.5 out of 5.0 &#8211; good docs, excellent add-ons, and the familiar Codeigniter MVC are all pluses. </strong></p>
<p><strong>PyroCMS </strong>is wicked fast.  However, the file structure is complex, and creating a custom theme is a challenge since there is about 10% of the documentation needed to be efficient/proficient with this framework.  The one area that isn&#8217;t difficult is the <a title="inner link to pyrocms widget blog on randaweb.com/forum" href="http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/" target="_self">creation of &#8216;widgets&#8217;</a> &#8211; small discrete sections of code (classes) that can be included throughout your site.   There does not seem to be as many &#8216;widgets&#8217; in the public domain as C5, but that will change once more developers get familiar with this true competitor.</p>
<p>After spending many hours attempting to customize PyroCMS, I determined that it is futile to continue down this path since I have sites I need to get up really fast.  I will continue to spend time with PCMS as it matures &#8211; I feel it has excellent potential, and, I like the admin interface style over edit in place (the C5 way).</p>
<p>Time will tell, but I am giving <strong>PyroCMS  an overall rating of 3.0 out of 5.0</strong>.  The main reason it gets such a high mark (before V 1.0)  is it is so darn fast, and, widgets are easy to create and a breeze to integrate &#8211; custom widgets are a core component of any good CMS.</p>
<p>VR</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/pyrocms-versus-concrete5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyroCMS Widget Creation for Affiliate Marketing -Section 3</title>
		<link>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/</link>
		<comments>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 12:37:47 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PyroCMS]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=407</guid>
		<description><![CDATA[Section 1 Section 2 &#8211; form.php Back To Forum Russell &#38; Associates Website Views display.php Now that we have created the affiliate.php class (section 1) and the form.php (section2), we have to write the code to display the widget content.  This is the display.php file within the ./affiliate/views folder. One challenge I had with this was getting [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; position: relative; margin-top: -19px;"><a title="Section 1" href="http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/" target="_top"><br />
<button>Section 1</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/" target="_top"> <button>Section 2 &#8211; form.php</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/" target="_top"><button>Back To Forum</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/" target="_top"><button>Russell &amp; Associates Website</button></a></div>
<div style='clear:both;'></div>
<hr /><strong>Views</strong></p>
<h3>display.php</h3>
<p>Now that we have created the affiliate.php class (section 1) and the form.php (section2), we have to write the code to display the widget content.  This is the display.php file within the ./affiliate/views folder.</p>
<p>One challenge I had with this was getting rid of the the default title that displays above all widgets.  Again, givent he sparse PyroCMS documentation, I had to use jQuery to hide the title &#8211; not the best solution, but it works.</p>
<p><a title="PyroCMS Affiliate Widget Download" href="http://www.randaweb.com/download_files/pyrocms_widget_affiliate/affiliate.zip" target="_blank">Download the affiliate.zip file here</a></p>
<p>Another challenge is the float property when a widget is placed one next to the other.  There seems to be a 22px margin problem somewhere in the PyroCMS widget classes.  This is why there is the &#8216;style&#8217; form element within the widget &#8211; this allows you to manually remove this by adding a negative margin-top (margin-top: -22px).  This is cumulative, so item # 3 is margin-top:-44px;  Item 4 is margin-top:-66px, etc.  Yes, this is a hack, but until familiarity with the core widget class is acquired, I don&#8217;t feel that breaking PyroCMS is a good solution.</p>
<p>Here is the code for the display.php</p>
<pre>&lt;?php</pre>
<pre>/*</pre>
<pre>Affiliate widget - actually affiliate widget</pre>
<pre>@author	Victor Russell</pre>
<pre>@ttd	remove title from this widget</pre>
<pre>--------------------------------------------------------------------------------</pre>
<pre>*/</pre>
<pre>?&gt;</pre>
<pre>&lt;style type='text/css'&gt;</pre>
<pre>.display_none {</pre>
<pre>display: none;</pre>
<pre>}</pre>
<pre>.hspacer-12px {</pre>
<pre>margin: 0px;</pre>
<pre>clear:both;</pre>
<pre>display:block;</pre>
<pre>overflow:hidden;</pre>
<pre>width:100%;</pre>
<pre>height:12px;</pre>
<pre>}</pre>
<pre>&lt;/style&gt;</pre>
<pre>&lt;script type='text/javascript'&gt;</pre>
<pre>// remove affiliate title via jQ</pre>
<pre>$(document).ready(function() {</pre>
<pre>$('.widget h3').addClass('display_none');</pre>
<pre>});</pre>
<pre>&lt;/script&gt;</pre>
<pre>&lt;?php</pre>
<pre>/* remove the default display of the title for the widget */</pre>
<pre>echo "\n&lt;style type='text/css'&gt;\n";</pre>
<pre>echo ".widget affiliate h3 { display: none; }\n";</pre>
<pre>echo "&lt;/style&gt;\n\n";</pre>
<pre>/* Assign _ replaced title to temp variable, replacing spaces with underscores */</pre>
<pre>$temp_str = 'div_' . str_replace(" ","_",$options['aff_title'] );</pre>
<pre>/* Add a blank line IF the aff_''order'' is equal to 1 */</pre>
<pre>if($options['aff_order'] == '1')</pre>
<pre>{</pre>
<pre>echo "\n&lt;div class='hspacer-12px'&gt;&lt;!-- --&gt;&lt;/div&gt;\n";</pre>
<pre>}</pre>
<pre>/* Create div for each affiliate ad, using the css defined in each entry */</pre>
<pre>echo "\n\n&lt;div id='" . $temp_str . "' " .</pre>
<pre>"title='" . $options['aff_title'] . " \n '</pre>
<pre>class='" . $options['aff_class'] . " \n '</pre>
<pre>style='" . $options['aff_style'] . "' &gt;\n ";</pre>
<pre>echo $options['aff_link'];</pre>
<pre>echo "\n&lt;/div&gt;&lt;!-- |&gt;&lt;| Close affiliate div for " . $options['aff_title'] . " --&gt; \n";</pre>
<pre>?&gt;</pre>
<p>This display.php creates a DIV with the attributes of id, title, class, and style.  The content (the affiliate link HTML) is output using $options['aff_link'].</p>
<p>Enjoy!</p>
<p>Vic Russell</p>
<p>Russell and Associates</p>
<p>www.randaweb.com/forum</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PyroCMS Widget Creation for Affiliate Marketing &#8211; Section 2</title>
		<link>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/</link>
		<comments>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 00:40:07 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PyroCMS]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=374</guid>
		<description><![CDATA[Section 1 Section 3 &#8211; form.php Back To Forum Russell &#38; Associates Website Views form.php and display.php This is section 2 of the PyroCMS widget creation example.  As stated before, PCMS is built upon Codeigniter &#8211; a very powerful and easy to learn PHP Framework.  Codeigniter is MVC compliant. You have updated the class file [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; position: relative; margin-top: -19px;"><a title="Section 1" href="http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/" target="_top"><br />
<button>Section 1</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/" target="_top"> <button>Section 3 &#8211; form.php</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/" target="_top"><button>Back To Forum</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/" target="_top"><button>Russell &amp; Associates Website</button></a></div>
<div style="clear: both;">
<hr /></div>
<h2>Views</h2>
<h4>form.php and display.php</h4>
<p>This is section 2 of the PyroCMS widget creation example.  As stated before, PCMS is built upon Codeigniter &#8211; a very powerful and easy to learn PHP Framework.  Codeigniter is MVC compliant.</p>
<p>You have updated the class file &#8211; affiliate.php.  In there, you defined the fields you will use in the admin interface to actually add the content for your affiliate link widget.</p>
<p><a title="PyroCMS Affiliate Widget Download" href="http://www.randaweb.com/download_files/pyrocms_widget_affiliate/affiliate.zip" target="_blank">Download the affiliate.zip file here</a></p>
<p>Next, we edit the files contained in the &#8216;views&#8217; sub-folder.  There will be two &#8211; &#8216;display.php&#8217; and &#8216;form.php&#8217;.  They do exactly what they say they will do &#8211; display the content of the widget and create the form interface to add your content to the widget.</p>
<p><span style="color: #0000ff;"><em>NOTE: I have kept the CSS and JavaScript in the files to ease the understanding of the PyroCMS widget creation.  This is not standard practice, but lets not add confusion to what may be a challenging topic by rigorously adhering to coding standards purity during the learning phase.</em></span></p>
<h3>form.php</h3>
<pre><span style="color: #000080;">&lt;?php</span></pre>
<pre><span style="color: #000080;">/**</span></pre>
<pre><span style="color: #000080;">* form.php for affiliate widget</span></pre>
<pre><span style="color: #000080;">* ==============================</span></pre>
<pre><span style="color: #000080;">* @author	Victor Russell - www.randaweb.com</span></pre>
<pre><span style="color: #000080;">*</span></pre>
<pre><span style="color: #000080;">* Create the form using Codeigniter form_helper and form_validation libraries</span></pre>
<pre><span style="color: #000080;">* form_input() and form_textarea() are used to display the content from the</span></pre>
<pre><span style="color: #000080;">* database.</span></pre>
<pre><span style="color: #000080;">*</span></pre>
<pre><span style="color: #000080;">**/</span></pre>
<pre><span style="color: #000080;">?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;ol&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em; margin-bottom:-1em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate Title (used for onhover - tooltips)&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_title', 'value' =&gt; $options['aff_title'] ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em; margin-bottom:-1em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Row Break - 1 = new line/row&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_order', 'value' =&gt; $options['aff_order'],</span></pre>
<pre><span style="color: #000080;">'size' =&gt; '3', 'maxlength' =&gt; '3' ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em; margin-bottom:-1em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate Link &amp;lt;a&amp;gt; *&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_textarea(array('name'=&gt;'aff_link', 'value' =&gt; $options['aff_link'], 'rows' =&gt; '5' ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em; margin-bottom:-1em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate Alt Text&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_alt', 'value' =&gt; $options['aff_alt'] ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate CSS Class&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_class', 'value' =&gt; $options['aff_class'] ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate CSS Style&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_textarea(array('name'=&gt;'aff_style', 'value' =&gt; $options['aff_style'], 'rows' =&gt; '2' ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate Source (CJ, ClickBank...) *&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_source', 'value' =&gt; $options['aff_source'] ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;li style='margin-top: -2em; margin-bottom:-1em;'&gt;</span></pre>
<pre><span style="color: #000080;">&lt;label&gt;Affiliate Ad Company *&lt;/label&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_company', 'value' =&gt; $options['aff_company'] ) ); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/li&gt;</span></pre>
<pre><span style="color: #000080;">&lt;/ol&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php //echo js('codemirror/codemirror.js'); ?&gt;</span></pre>
<pre><span style="color: #000080;">&lt;?php /*&lt;script type="text/javascript" defer="defer"&gt;</span></pre>
<pre><span style="color: #000080;">html_editor('html_editor', "25em");</span></pre>
<pre><span style="color: #000080;">&lt;/script&gt; */ </span></pre>
<pre><span style="color: #000080;">?&gt;</span></pre>
<p>The form.php is rather simple.  <em>The main hurdle you may have is the syntax used to create the form elements</em> &#8211; this is Codeigniter&#8217;s style and is very powerful.  Once you really understand it, it is very simple.</p>
<p><a title="Codeigniter user guide" href="http://codeigniter.com/user_guide/" target="_blank">Link to the very excellent Codeigniter documentation</a>.  Click on the drop-down menu at the very top of the page and examine all of the classes, helpers, libraries, and other useful information.</p>
<p><a rel="attachment wp-att-510" href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/attachment/ci_user_guide_top_tab/"><img class="alignnone size-medium wp-image-510" title="ci_user_guide_top_tab" src="http://www.randaweb.com/forum/wp-content/uploads/2010/10/ci_user_guide_top_tab-300x69.png" alt="" width="300" height="69" /></a></p>
<p><a title="codeigniter documentation form helper" href="http://codeigniter.com/user_guide/helpers/form_helper.html" target="_blank">Codeigniter form helper</a> and <a title="codeigniter documentation form validation class" href="http://codeigniter.com/user_guide/libraries/form_validation.html" target="_blank">form validation</a> documentation</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;"><span style="color: #000080;">&lt;label&gt;Affiliate Source (CJ, ClickBank...) *&lt;/label&gt;</span></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;"><span style="color: #000080;">&lt;?php echo form_input(array('name'=&gt;'aff_source', 'value' =&gt; $options['aff_source'] ) ); ?&gt;</span></pre>
<p>This code creates a form element label and the CI method of a input type=&#8217;text&#8217; element.</p>
<p>The form_input() method creates the following (using &#8216;view <strong>generated</strong> source&#8217; after rendering the page with an affiliate widget):</p>
<pre><span style="color: #000080;">&lt;input type="text" name="aff_title" value=""&gt;</span></pre>
<p>The <strong>Codeigniter form validation class</strong> then checks the length of the fields, as well as other attributes (numeric, alphanumeric, integer, etc), against the array that you created in the &#8216;affiliate.php&#8217; file.  If an error occurs, you will get a detailed error message near the top of the widget container telling you the field and error.  This occurs after you click &#8216;Save&#8217;.</p>
<p>For the PHP Codeigniter  form_textarea() method,</p>
<pre><span style="color: #000080;">&lt;?php echo </span><strong><span style="color: #000080;">form_textarea(</span></strong><span style="color: #000080;">array('name'=&gt;'aff_style', 'value' =&gt; $options['aff_style'], 'rows' =&gt; '2' ) ); ?&gt;</span></pre>
<p>the resulting form element looks like this:</p>
<pre><span style="color: #000080;">&lt;textarea name="aff_link" cols="90" rows="5" value=""&gt;&lt;/textarea&gt;</span></pre>
<p>The one very important and simplification from standard form handling is the <span style="color: #000080;">&#8216;value&#8217; =&gt; $options['aff_style']</span> attribute.  If there is content in the field, this array value is assigned as the value of the form element, displaying it for viewing and editing.</p>
<div id="attachment_387" class="wp-caption alignright" style="width: 160px"><a href="http://www.randaweb.com/forum/wp-content/uploads/2010/10/randa_pyro_widget_affiliate_form.jpg"><img class="size-thumbnail wp-image-387 " title="randa_pyro_widget_affiliate_form" src="http://www.randaweb.com/forum/wp-content/uploads/2010/10/randa_pyro_widget_affiliate_form-150x150.jpg" alt="pyrocms widget affiliate form preview randaweb.com" width="150" height="150" /></a><p class="wp-caption-text">Widget Form Preview</p></div>
<h2>Affiliate Links</h2>
<p>Because of the issue regarding Javascript inclusion in text areas and input fields, <strong>use only HTML-formated affiliate links</strong> from your provider (ClickBank, Commission Junction, etc).  Do not add any features that some providers have as options &#8211; such as CJ&#8217;s &#8216;Hide tracking code in link?&#8217; and &#8216;Encrypt link?&#8217; options &#8211; <span style="text-decoration: underline;">don&#8217;t use them</span> or your links won&#8217;t work as expected.</p>
<h2>Future</h2>
<p>I am working on an automated affiliate link manager for PyroCMS &#8211; this will be a &#8216;module&#8217; and not a &#8216;widget&#8217;.  This will allow you to program your site to populate a link section or sections with specific categories using your link providers API.</p>
<p>Thanks,</p>
<p>Vic Russell</p>
<p>Russell and Associates</p>
<p>www.randaweb.com/forum</p>
<p>randaweb@gmail.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PyroCMS Widget Creation for Affiliate Marketing &#8211; Section 1</title>
		<link>http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/</link>
		<comments>http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 12:51:35 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PyroCMS]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=331</guid>
		<description><![CDATA[This tutorial should help you understand and create PyroCMS widgets using Codeigniter syntax, jQuery JavaScript library, and the PyroCMS framework.]]></description>
			<content:encoded><![CDATA[<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/" target="_top"> <button>Section 2 &#8211; form.php</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/" target="_top"> <button>Section 3 &#8211; display.php</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/forum/" target="_top"><button>Back To Forum</button></a></div>
<div style="float: left; position: relative;"><a href="http://www.randaweb.com/" target="_top"><button>Russell &amp; Associates Website</button></a></div>
<div style='clear: both'>
<hr /></div>
<p><a title="PyroCMS" href="http://pyrocms.com/" target="_blank">PyroCMS </a>is a very powerful and capable PHP-based CMS.  It is authored on top of the <a title="Codeigniter" href="http://codeigniter.com/" target="_blank">Codeigniter framework</a>.  It is very fast, and scalable and very promising as a powerful PHP framework.</p>
<p><a title="PyroCMS Affiliate Widget Download" href="http://www.randaweb.com/download_files/pyrocms_widget_affiliate/affiliate.zip" target="_blank">Download the affiliate.zip file here</a></p>
<p><em><span style="color: #003366;">Caveat: The documentation for PyroCMS (PCMS) is very sparse.  Any answer to any question can be exceedingly  difficult to find.  Check back often for additional links to developing documentation.</span></em></p>
<p>One of the new and useful features of PyroCMS is the addition of <strong>Widgets</strong>.  Now, we all know what a widget is, right?  Actually, in the PCMS world, the concept of widget is very accurate &#8211; <em>it is a discrete entity (in this case, a class) that can be added to a page, section of a page (right sidebar, left sidebar, header, footer, content, etc) that can access the database as well as execute custom code and present content that you create, in a format you define. </em> You can use this to display images, text, and any other content you decide is needed &#8211; EXCEPT for JavaScript.</p>
<p>Let me clarify the javascript problem: if you want to create a widget that allows you to enter javascript snippets, it will not work &#8211; the &lt;script&gt; tags as well as any document.write() methods are stripped out for security reasons and replaced with <strong>[removed]</strong>.  I am searching for a workaround, but given the above statement regarding documentation, this might take some time.  [ note: The feature within the Codeigniter (CI) form_helper class that sanitizes strings is <kbd><strong>xss_clean and prep_for_form ]</strong>. Until then, I am adding the needed JavaScript in the class and view files.</kbd></p>
<p>There are adequate <strong>installation documentation</strong> and install examples on the web for installing PyroCMS and Codeigniter.  Here are a couple.</p>
<p><a title="PyroCMS Installation" href="http://pyrocms.com/documentation/general/installation" target="_blank">PyroCMS Installation</a></p>
<p><a title="Codeigniter Installation" href="http://codeigniter.com/user_guide/installation/index.html" target="_blank">Installing Codeigniter</a> <em>(this is link is provided only for reference - you do not need to download and install CI as PyroCMS is built on top of CI)</em></p>
<p><em>It is critical that you define your database connection accurately, and remember your default user name and password. </em></p>
<h2>Our Platform</h2>
<p>I am using a Dell laptop with 2 GB of RAM and a dual core Athlon X2 processor (circa 2006) with <a title="WAMP server download" href="http://www.wampserver.com/en/download.php" target="_blank">WAMP (Windows Apache MySQL PHP) </a>installed for development, <a title="PHP Designer 7 link" href="http://www.mpsoftware.dk/downloads.php" target="_blank">PHP Designer 7</a> as the IDE (Eclipse is too heavy, but would work with a more powerful machine).  WAMP is a very easy install.</p>
<p>All of my web files are under <span style="color: #0000ff;">C:\wamp\www\ </span>- which is the default web root for a typical WAMP installation.</p>
<p><strong>Lets create a widget in PyroCMS - 'affiliate'</strong></p>
<p><em>There is no widget named affiliate that comes with your installation.  Therefore, any reference to a file or folder/directory implies you have added it or should add it.</em></p>
<p><strong>Navigate to the widgets directory </strong>under the application directory</p>
<ul>
<li><span style="color: #000080;">(note: I am a Linux developer first - some of my paths will have the forward Unix-style slash ( / ) rather than the backwards Windows-style slash ( \ ).  Make adjustments where needed if I forget to use Windows style slashes)</span></li>
</ul>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; color: #000080; white-space: pre;">C:\wamp\www\pyrocms_directory\application\widgets\<em>affiliate</em></span></p>
<p>First, <strong>create the directory</strong> within the ...\widgets\ path called <em>affiliate</em>.</p>
<div id="attachment_338" class="wp-caption alignright" style="width: 138px"><a rel="attachment wp-att-338" href="http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/attachment/pyrocms_widget_dir_struct/"><img class="size-medium wp-image-338 " title="pyrocms_widget_dir_struct" src="http://www.randaweb.com/forum/wp-content/uploads/2010/10/pyrocms_widget_dir_struct-128x300.gif" alt="PyroCMS Widget Directory Structure - randaweb" width="128" height="300" /></a><p class="wp-caption-text">Widget Directory Structure</p></div>
<p><strong>Copy the code</strong> from this link into a download folder, extract the files, then copy the the files into the above path.  You will copy the 'views' directory and the affiliate.php file into the <em>affiliate </em>directory (see folder screenshot).</p>
<p><a title="PyroCMS Affiliate Widget Download" href="http://www.randaweb.com/download_files/pyrocms_widget_affiliate/affiliate.zip" target="_blank">Download the affiliate.zip file here</a></p>
<p>Within the 'views' directory, you will have <strong>two files:  display.php and form.php.</strong> These files, and the containing 'views' folder, will be  present in every PyroCMS widget you create - <em>these files are required and necessary</em>.</p>
<ul>
<li>The first file you edit (or create, depending on your need) is the class file.  Remember to <strong>capitalize the name of the class - which must be the same name as the file </strong>(less the .php extension <img src='http://www.randaweb.com/forum/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).</li>
</ul>
<p>Here is a bare affiliate.php file after editing to add the fields needed for the new widget:</p>
<pre>&lt;?php</pre>
<pre>if(!defined('BASEPATH')) exit('No direct script access permitted');</pre>
<pre>class Affiliate extends Widgets</pre>
<pre>{</pre>
<pre>// This section will appear when you click on the widget on the 'widgets' page of the admin</pre>
<pre>// interface (aka dashboard).  You access the admin interface using the following URL:</pre>
<pre>// <a href="http://localhost/pyrocms2/pyrocms/admin">http://your-host/your-pyrocms-base-dir/<strong><em>admin</em></strong></a></pre>
<pre>public $title = 'Affiliate Widget';</pre>
<pre>public $description = 'Add Affiliate Links and Images';</pre>
<pre>public $author = 'Vic Russell';</pre>
<pre>public $website = 'http://www.randaweb.com';</pre>
<pre>public $version = '0.3';</pre>
<pre>// Now you define the fields that you will use in your widget.</pre>
<pre>// The widgets class will contain a 'name' field, so it is optional here</pre>
<pre>public $fields = array(</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_title',</pre>
<pre>'label' =&gt; 'Product Title',</pre>
<pre>'rules' =&gt; 'trim|max_length[254]'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_order',</pre>
<pre>'label' =&gt; 'Add Order - 1 = new line',</pre>
<pre>'rules' =&gt; 'trim|max_length[3]|integer'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_link',</pre>
<pre>'label' =&gt; 'Affiliate Link',</pre>
<pre>'rules' =&gt; 'required|trim'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_alt',</pre>
<pre>'label' =&gt; 'Affiliate Alt Text',</pre>
<pre>'rules' =&gt; 'trim|prep_url|max_length[254]'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_class',</pre>
<pre>'label' =&gt; 'CSS Class',</pre>
<pre>'rules' =&gt; 'trim|max_length[254]'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_style',</pre>
<pre>'label' =&gt; 'CSS Style',</pre>
<pre>'rules' =&gt; 'trim'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_source',</pre>
<pre>'label' =&gt; 'Affiliate Source)',</pre>
<pre>'rules' =&gt; 'trim|max_length[254]'</pre>
<pre>),</pre>
<pre>array(</pre>
<pre>'field' =&gt; 'aff_company',</pre>
<pre>'label' =&gt; 'Company Source for add',</pre>
<pre>'rules' =&gt; 'trim|max_length[254]'</pre>
<pre>)</pre>
<pre>);</pre>
<pre>public function <strong>run</strong>($options)</pre>
<pre>{</pre>
<pre>// The requisite 'run()' method that returns the data in the $output[] array //</pre>
<pre>if(empty($options['aff_title']))</pre>
<pre>{</pre>
<pre>return array('output' =&gt; '');</pre>
<pre>}</pre>
<pre>return array('output' =&gt; array($options['aff_title'], $options['aff_link'],</pre>
<pre>$options['aff_alt'], $options['aff_class'], $options['aff_style'],</pre>
<pre>$options['aff_source'], $options['aff_company'] ) );</pre>
<pre>}</pre>
<pre>}</pre>
<pre>/* Close class Affiliate */</pre>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;"><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: small;"><span style="line-height: 18px; white-space: pre;">
<div style="float: left; position: relative;">
<a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-2/" target="_top"> <button>Section 2 - form.php</button></a></div>
<div style="float: left; position: relative;">
<a href="http://www.randaweb.com/forum/programming/pyrocms-widget-creation-for-affiliate-marketing-section-3/" target="_top"> <button>Section 3 - display.php</button></a></div>
<div style="float: left; position: relative;">
<a href="http://www.randaweb.com/forum/" target="_top"><button>Back To Forum</button></a></div>
<div style="float: left; position: relative;">
<a href="http://www.randaweb.com/" target="_top"><button>Russell &amp; Associates Website</button></a></div>

</span></span></span></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/pyrocms-widget-for-affiliate-marketing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Elgg &#8211; social networking platform &#8211; Prankk.com</title>
		<link>http://www.randaweb.com/forum/programming/elgg-social-networking-platform-prankk-com/</link>
		<comments>http://www.randaweb.com/forum/programming/elgg-social-networking-platform-prankk-com/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 15:13:31 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Social Networking]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=260</guid>
		<description><![CDATA[Elgg is a very easy to install and get up and running social networking platform.  It took me about an hour to get a rudimentary site up.  Another 4-6 hours or so to learn the admin, add-on, permissions, etc features. Elgg is Elgg-egant.  I love it.  It is simple in it&#8217;s look and feel.  It [...]]]></description>
			<content:encoded><![CDATA[<p><a title="elgg.com" href="http://www.elgg.org/" target="_blank">Elgg </a>is a very easy to install and get up and running social networking platform.  It took me about an hour to get a rudimentary site up.  Another 4-6 hours or so to learn the admin, add-on, permissions, etc features.</p>
<p>Elgg is Elgg-egant.  I love it.  It is simple in it&#8217;s look and feel.  It just does what it says it will do, out of the box, without much customization.</p>
<p><a title="elgg on dev" href="http://75.118.77.72/elgg-1.7.3/" target="_blank">See my sample site &#8211; Prankk &#8211; here</a>.  This is a prototype site that includes links to YouTube and Hulu videos (streams).  Link / embed and then view like you want to.</p>
<p>In the next week, I am going to migrate this to a live server for go-live use, mixing in some type of reward for the best page compilation, the most friends added, and other such activity.</p>
<p>One of the issues I do have with Elgg is that for the USER of the site, it isn&#8217;t that intuitive.  Before any serious rollout is considered, I would strongly suggest creating the essential help pages and hovers that will otherwise confuse users.</p>
<p>Until then, here is the link:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/elgg-social-networking-platform-prankk-com/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Computers in 5 years</title>
		<link>http://www.randaweb.com/forum/programming/computers-in-5-years/</link>
		<comments>http://www.randaweb.com/forum/programming/computers-in-5-years/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 12:44:24 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=299</guid>
		<description><![CDATA[I have been an avid system builder for the past 12 years.  I started computing with Apple IIe, Commadore64, and Sanyo MBC 550.  These computers were floppy disk units only &#8211; with the exception of the Commadore64 which was a cassette tape-drive.  I purchased a used Leading Edge computer with a 10MB hard drive in [...]]]></description>
			<content:encoded><![CDATA[<p>I have been an avid system builder for the past 12 years.  I started computing with <a title="apple 2e" href="http://retro.ign.com/articles/941/941583p1.html" target="_blank">Apple IIe</a>, <a title="commadore 64" href="http://blog.tmcnet.com/blog/tom-keating/skype/commodore-legend-chuck-peddle-skype-new-jersey-sri-lanka-wifi-voip.asp" target="_blank">Commadore64</a>, and <a title="sanyo mbc 550" href="http://www.qsl.net/k6fv/sanyo.html" target="_blank">Sanyo MBC 550</a>.  These computers were floppy disk units only &#8211; with the exception of the Commadore64 which was a cassette tape-drive.  I purchased a used Leading Edge computer with a 10MB hard drive in the late 80&#8242;s.  That was a tremendous boon since the floppy flip could be stopped, and the speed of program load was tremendous.  Since these were all DOS only machines &#8211; no windowing software so 1 program at a time could be run- that was a significant performance boost.</p>
<p>I spent over $2,000 on a <a title="leading edge" href="http://commons.wikimedia.org/wiki/File:LeadingEdgeModelD.jpg" target="_blank">Leading Edge Intel 486-d</a> 16 MHz system with a 100MB hard drive in the early 90&#8242;s.  This amount of storage and having Windows 3.1 for Workgroups was another performance boost.  A lighting strike killed that computer about 2 years after I purchased it, forcing me to purchase another &#8211; a Packard-Bell 100MHz Pentium with 8MB of RAM and a 1GB Hard drive.  Wow, I would never use all that drive space!</p>
<p>Once I decided to upgrade to Windows 95 (at a very reasonable $95.00), I needed another 8MB of RAM ($120.00) which gave me a total of 16MB of RAM &#8211; adequate for running Win95.  I quickly ran out of hard drive space, so I had to purchase a 2GB hard drive as a slave for $220.00.  That system performed adequately for 6 years &#8211; our kids played educational games, I was on dial-up internet through Netscape and then AOL, and life was good.</p>
<p>Then, we purchased a second computer &#8211; an <a title="hp athalon" href="http://www.google.com/imgres?imgurl=http://images.amazon.com/images/P/B00006IJKX.01.LZZZZZZZ.jpg&amp;imgrefurl=http://www.computers-online-store.com/node/brands/hp-pavilion-notebooks/list_1550133.html&amp;usg=__e37GAQoLTAeZ3wZkWDbzEUK40a4=&amp;h=366&amp;w=500&amp;sz=35&amp;hl=en&amp;start=0&amp;zoom=1&amp;tbnid=_hktM--rNdIIUM:&amp;tbnh=115&amp;tbnw=153&amp;prev=/images%3Fq%3Dhp%2Bcomputer%2B750%2BMHz%2Bathalon%2B30%2Bgb%26hl%3Den%26sa%3DG%26biw%3D1210%26bih%3D518%26gbv%3D2%26tbs%3Disch:10%2C228&amp;itbs=1&amp;iact=hc&amp;vpx=718&amp;vpy=122&amp;dur=467&amp;hovh=172&amp;hovw=235&amp;tx=110&amp;ty=94&amp;ei=dbGcTLcgw52fB7fu3LoN&amp;oei=b7GcTNroBtHpnQftmPmLDQ&amp;esq=3&amp;page=1&amp;ndsp=14&amp;ved=1t:429,r:11,s:0&amp;biw=1210&amp;bih=518" target="_blank">HP 750MHz Athalon XP system</a> with a 30GB hard drive and Windows ME OS with a color monitor for around $850.00.  Now, we had two systems, but only one phone line.  We decided that the primary HP system that the kids had access to was our main system.  I could use the 100MHz system only when the HP was not online, and, we were not using the telephone.  This latter issue was a big deal given the cost of cellular minutes in the late 90&#8242;s and early 2000&#8242;s.  Consequently, I did much computing late in the evening.</p>
<p>Very soon after the purchase of the HP, we began to purchase systems at around 1.5 per year.  This ranged from a 600MHz Citrix chip-based system to 3GHz P4 dual core.   These were Bare Bones systems purchased primarily through Tiger Direct and New Egg, and costing around $200 to fully build.  Eventually, we were up to 6 running systems &#8211; 2 laptops, 1 server, 3 desktops.</p>
<p>In the years between the HP and today, we upgraded to Cable broadband.  We had a 100KBit connection for a couple of years &#8211; which was adequate for 2-3 computers (mid 90&#8242;s), which is what we had at the time.  Now, we have 1.5+ MBit connection that isn&#8217;t effected by any amount of network traffic (unless, we have 4 systems playing Hulu or streaming YouTube videos at the same time).</p>
<h2>Future</h2>
<p>The significance of the<strong> iPad </strong>and the recently talked-about <a title="Motorola Droid 10-in display" href="http://gorumors.com/motorola-droid-android-tablet-review-tech-specs/2753772" target="_blank">Motorolla Droid</a> based pad computer must not be underestimated.  These are the computing platforms of the future &#8211; small, powerful, and transportable.  The issues that will be overcome in the next couple of years include:</p>
<ul>
<li>Increased speed and cores for these mobile chips <a title="Samsung dual core arm processor - orion" href="http://www.maximumpc.com/article/news/samsung_lifts_curtain_dual-core_arm_processor" target="_blank">(see dual core Samsung Orion processor)</a></li>
<li>Smaller form factor and large capacity solid state hard drives <a title="ssd drive roadmap intel" href="http://www.madshrimps.be/vbulletin/f22/intel-reshapes-solid-state-drive-roadmap-25nm-flash-everywhere-72935/" target="_blank">(see Intel SSD roadmap 2010)</a>\</li>
<li>Some form of visualization that will give the user a very large screen &#8211; either
<ul>
<li>projection &#8211; to a wall or via special glasses</li>
<li>direct monitor hookup</li>
<li>wireless external monitor interface (BlueTooth-ish).</li>
<li><a title="thin substrate monitor" href="http://www.pcmonitors.org/articles/oled-monitors" target="_blank">Fabric monitors and very thin substrate monitors</a> are in the works and should be commercially available in two to three years.</li>
</ul>
</li>
</ul>
<p>This increasingly mobile computing platform will be more and more integrated with everything we do.  Work, play, socialization, financial transactions, and most other life-events will become computer-enhanced.</p>
<p>Some theorists are predicting implant technology within the next decade &#8211; something that will merge the human mind with the storage, retrieval, and processing of information in near-real-time.  If we are able to think and receive direct sensory input from a computing device, how much longer before we are fully integrated into the &#8216;web&#8217;.  Thought theft may be a new crime, particularly when some ideas are worth millions of dollars.</p>
<p>That point in time where computers or computer networks become self-aware &#8211; the so called &#8217;singularity&#8217;, may not be as far off as we once thought.  While the human brain may take another 100 years to replicate in a silicon-biological hybrid form factor, that may not be needed if we begin to feed our network with thought, emotion, dreams, and raw information on a regular basis.  All that is required is an algorithm that ties everything together</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/computers-in-5-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Domain &#8211; jqueryform.info</title>
		<link>http://www.randaweb.com/forum/programming/new-domain-jqueryform-info/</link>
		<comments>http://www.randaweb.com/forum/programming/new-domain-jqueryform-info/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 18:43:35 +0000</pubDate>
		<dc:creator>Vic Russell</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryform.info]]></category>

		<guid isPermaLink="false">http://www.randaweb.com/forum/?p=266</guid>
		<description><![CDATA[new domain - jqueryform.info - dedicated to information on jQuery forms...]]></description>
			<content:encoded><![CDATA[<h3>jqueryform.info is a domain I just purchased to use for dedicated jQuery forms blogging.  The jQuery &#8216;forms&#8217; topic is huge, as anyone who uses jQuery knows.</h3>
<h4>Sample topics:</h4>
<ul>
<li>validation (client and server side handling/callbacks/etc)</li>
<li> AJAXifying forms</li>
<li> processing select, checkbox, and radio button tags</li>
<li>presenting error information elegantly</li>
<li>Myriad of plugings related to forms and form processing</li>
</ul>
<p>I am going to try <strong>GoDaddy </strong>for hosting this site round.  I am not being critical of Hostmonster, I just have to test another hosting solution before I pony-up for a dedicated server or VM.</p>
<p><strong><em>If anyone has a suggestion re: a hosting provider &#8211; and I mean direct experience &#8211; feel free to reply to this post. </em></strong>Please include the reason(s) why you like or do not like the provider &#8211; submissions with only a link and sales text will be removed.</p>
<p>Til Tomorrow&#8230;</p>
<p>Vic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randaweb.com/forum/programming/new-domain-jqueryform-info/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

