<?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>ThePizzy.net/blog &#187; Programming</title>
	<atom:link href="http://thepizzy.net/blog/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://thepizzy.net/blog</link>
	<description>Solving the complex in 140 characters or less...</description>
	<lastBuildDate>Mon, 02 Jan 2012 15:55:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Jasper: Just a store platform experience, reworked</title>
		<link>http://thepizzy.net/blog/2011/02/jasper-just-a-store-platform-experience-reworked/</link>
		<comments>http://thepizzy.net/blog/2011/02/jasper-just-a-store-platform-experience-reworked/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 01:08:03 +0000</pubDate>
		<dc:creator>[[Neo]]</dc:creator>
				<category><![CDATA[Jasper]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[catalog.xml]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[kodingen.com]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[objinfo.xml]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[yahoo store platform]]></category>
		<category><![CDATA[yahoo! stores]]></category>

		<guid isPermaLink="false">http://thepizzy.net/blog/?p=1132</guid>
		<description><![CDATA[Jasper is an experiment in creating a Yahoo! Store Editor and CMS using only the cloud-based coding solution from Kodingen.com]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1133" title="Jasper Logo" src="http://thepizzy.net/blog/wp-content/uploads/2011/02/logo-name-300x171.png" alt="Jasper Logo" width="300" height="171" />For the past 3 years, I&#8217;ve been working on a store that uses the Yahoo! Store platform. At first, the user interface for the web page design and page object models was easy to grasp (both the prefab versions and the custom ones I had access to), but going through the entire rewrite process was a pain &#8211; the biggest of which was the requirement of perfection. If a mistake was made in any field names or data-types it held, the whole object model had to be scrapped and started over. They&#8217;ve made minor improvements over the past 3 years to their Merchant Solutions side of things, but they have been extremely minor. One thing that hasn&#8217;t changed is the interface to edit pages.</p>
<p>There are two methods of doing the editing, depending on the Yahoo! Store platform that you have. If you&#8217;re on the Legacy version, you must go to the page itself, and click edit. This provides you with a series of fields and input boxes for each type of field. No intelligence in the design of what those fields are for or differentiation in how they interact.</p>
<p>If you&#8217;re on the Merchant Solutions platform, then you have the option of going directly to the page still, or you can do it in a flat-file pseudo database-like UI which is nothing more than a search-by-field interface, which presents you with a different-looking (but still the same) interface for editing the page.</p>
<p>Over the next few months, I&#8217;m going to embark on a web-based interface for importing the legacy store feed (objinfo.xml, which can&#8217;t be customized) and see what can be done with the data as far as modifying it, preparing it, cleaning it, and exporting it back to the store. I&#8217;m also going to attempt to code it entirely using <a href="http://kodingen.com" target="_blank">Kodingen.com</a>. I&#8217;ve done a highly customized version of this concept for the company I currently work for (at the time of this post), but none of the code will be reused from that project, and this project will have different, and limited features (in some areas, and expanded in other areas), but for a different data model. In some areas, this application will be more limited (since it&#8217;s working with a standardized data format, rather than a customized &#8220;catalog.xml&#8221; feed from Merchant Solutions. Once this basic version is solid, I may start working on a customized version, or even offering a customizing service to handle the catalog.xml file.</p>
<p>Some things I&#8217;d like to do differently with this basic version is:</p>
<ul>
<li>create an install process (a la phpBB)</li>
<li>extensive automation, and possibly some AI concepts</li>
<li>learn more about object-oriented design and how it can be extended conceptually</li>
<li>experiment with some various php and javascript frameworks</li>
</ul>
<p>There are plenty of other feature sets that I&#8217;ve learned and developed in addition to these in the past and plan to use as well. So we&#8217;ll see how this goes, and I&#8217;ll post some updates here. Depending on what I plan to do with it, I may or may not open-source it. If I do, I&#8217;ll host it on Google Code.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/ajax' rel='tag' target='_blank'>ajax</a>, <a class='technorati-link' href='http://technorati.com/tag/catalog.xml' rel='tag' target='_blank'>catalog.xml</a>, <a class='technorati-link' href='http://technorati.com/tag/Coding' rel='tag' target='_blank'>Coding</a>, <a class='technorati-link' href='http://technorati.com/tag/jasper' rel='tag' target='_blank'>jasper</a>, <a class='technorati-link' href='http://technorati.com/tag/JavaScript' rel='tag' target='_blank'>JavaScript</a>, <a class='technorati-link' href='http://technorati.com/tag/kodingen.com' rel='tag' target='_blank'>kodingen.com</a>, <a class='technorati-link' href='http://technorati.com/tag/MySQL' rel='tag' target='_blank'>MySQL</a>, <a class='technorati-link' href='http://technorati.com/tag/objinfo.xml' rel='tag' target='_blank'>objinfo.xml</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_blank'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/yahoo+store+platform' rel='tag' target='_blank'>yahoo store platform</a>, <a class='technorati-link' href='http://technorati.com/tag/yahoo%21+stores' rel='tag' target='_blank'>yahoo! stores</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://thepizzy.net/blog/2011/02/jasper-just-a-store-platform-experience-reworked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing: Living in the Cloud (The Series)</title>
		<link>http://thepizzy.net/blog/2010/12/introducing-living-in-the-cloud-the-series/</link>
		<comments>http://thepizzy.net/blog/2010/12/introducing-living-in-the-cloud-the-series/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 15:29:50 +0000</pubDate>
		<dc:creator>[[Neo]]</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Living in the Cloud]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[3g]]></category>
		<category><![CDATA[chrome os]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[cr-48]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ground computing]]></category>
		<category><![CDATA[living in the cloud]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://thepizzy.net/blog/?p=846</guid>
		<description><![CDATA[Monday, I got an unexpected surprise on my doorstep: a Google Cr-48 Chrome OS Netbook (youtube video). From the video, you can see that it&#8217;s nothing more than a Chrome...]]></description>
			<content:encoded><![CDATA[<div id="attachment_848" class="wp-caption alignleft" style="width: 260px"><img class="size-full wp-image-848" title="Chrome Cloud" src="http://thepizzy.net/blog/wp-content/uploads/2010/12/Chrome_Cloud1.jpg" alt="" width="250" height="210" /><p class="wp-caption-text">Source: admintell.napco.com</p></div>
<p>Monday, I got an unexpected surprise on my doorstep: a <a href="http://youtu.be/MG4ikWOI9zE" target="_blank">Google Cr-48 Chrome OS Netbook</a> (youtube video). From the video, you can see that it&#8217;s nothing more than a Chrome Browser with a keyboard and Wifi/3G internet access.</p>
<p>After spending a day getting it set up and testing the battery life with some moderate usage throughout the day, I&#8217;m going to start writing some blog posts related to what it takes to cut the cords and transition the daily routine of a programmer into the cloud.</p>
<p>Generally, netbooks aren&#8217;t for people who use a computer for things as computer-intensive as programing or graphic design, and are really optimized for journalists, bloggers, and people who like to waste time on social networking sites. In this blog series, I&#8217;m going to describe the software needed (or created in some cases) to turn a netbook into a productive tool for people who generally need software on a daily basis.</p>
<p>I&#8217;ll also describe what it&#8217;s like to use Google&#8217;s Chrome OS: the good, the bad and the ugly. There will be more videos about the device, the hardware itself (which is sure to change), and the software apps needed to make the transition.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/3g' rel='tag' target='_blank'>3g</a>, <a class='technorati-link' href='http://technorati.com/tag/chrome+os' rel='tag' target='_blank'>chrome os</a>, <a class='technorati-link' href='http://technorati.com/tag/cloud+computing' rel='tag' target='_blank'>cloud computing</a>, <a class='technorati-link' href='http://technorati.com/tag/cr-48' rel='tag' target='_blank'>cr-48</a>, <a class='technorati-link' href='http://technorati.com/tag/google' rel='tag' target='_blank'>google</a>, <a class='technorati-link' href='http://technorati.com/tag/ground+computing' rel='tag' target='_blank'>ground computing</a>, <a class='technorati-link' href='http://technorati.com/tag/living+in+the+cloud' rel='tag' target='_blank'>living in the cloud</a>, <a class='technorati-link' href='http://technorati.com/tag/netbook' rel='tag' target='_blank'>netbook</a>, <a class='technorati-link' href='http://technorati.com/tag/productivity' rel='tag' target='_blank'>productivity</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/wifi' rel='tag' target='_blank'>wifi</a>, <a class='technorati-link' href='http://technorati.com/tag/wireless' rel='tag' target='_blank'>wireless</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://thepizzy.net/blog/2010/12/introducing-living-in-the-cloud-the-series/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Program a Human &#8211; Part 2: Emotions</title>
		<link>http://thepizzy.net/blog/2010/06/how-to-program-a-human-part-2-emotions/</link>
		<comments>http://thepizzy.net/blog/2010/06/how-to-program-a-human-part-2-emotions/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 16:36:45 +0000</pubDate>
		<dc:creator>[[Neo]]</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Thought Experiments]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[biology]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[emotion]]></category>
		<category><![CDATA[emotions chips]]></category>
		<category><![CDATA[mobile trust sharing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://thepizzy.net/blog/?p=573</guid>
		<description><![CDATA[Have you ever considered why it is people have emotions? What are emotions really comprised of? What triggers them, what determines their intensity? What causes the same stimuli to be...]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-631 alignright" title="Robotic Emotions" src="http://thepizzy.net/blog/wp-content/uploads/2010/06/281259_f4961-300x237.jpg" alt="" width="300" height="237" />Have you ever considered why it is people have emotions? What are emotions really comprised of? What triggers them, what determines their intensity? What causes the same stimuli to be interpreted in two different ways, by two different observers?</p>
<p>I&#8217;ve put some thought into this during a discussion about the creation of an emotions chip and how one would go about programming emotional responses into a computer or robot.</p>
<p>Consider this hypothetical humanoid example:</p>
<blockquote><p>John and Matt are friends &#8211; they&#8217;ve been friends since they were little kids. They like to rough-house, have insult contests to see who can come up with the most insulting quip, and have generally different preferences in women.</p>
<p>While running down the city sidewalk, John takes a physical jab at Matt, Matt reacts with a friendly reciprocal jab. During the horseplay, a bystander gets run into, and also jabbed. The bystander yells out some profanity and insults, and fumes about it the rest of the day.</p></blockquote>
<p><span id="more-573"></span>What psychological forces are in play here? We have John and Matt who are happy and playing, there is a certain level of trust between them that indicates anything John or Matt does to the other is going to be in jest, in accordance with how they&#8217;ve each understood the personality of the other. The bystander, however, is not keen on the intentions and understanding of the two boy&#8217;s personalities, and considers their horseplay to be rude, disrupting, and inappropriate.</p>
<p>Now, if we were going to mimic this same scenario, but Matt is a robot named M477, we&#8217;d need a few things in the computer to interpret and record this data. Here&#8217;s the same scenario, but using M477 as John&#8217;s childhood toy:</p>
<blockquote><p>John has owned his robot M477 since he was a child. Over time, M477 has observed and taken note that John likes to rough-house, try to come up with the most creative insults, and likes a particular type of woman.</p>
<p>While running down the city sidewalk, John takes a physical jab at M477, and M477 receives the jab, calculates the perceived force intended (taking into consideration the momentum of the fist and the time at that momentum, the subsequent pull-back of the fist before actually making contact and the time taken to pull-back, and the velocity they were moving down the sidewalk :: v((m*t&#8217;) &#8211; (p * t&#8221;)) = r) and reciprocates with an equally playful jab back. &#8230;</p></blockquote>
<p>What about the Bystander? If you consider the bystander as a robot, BY574ND3R, he is not inherently privy to the trust-factor that M477 and John have between each other, nor does he contain the data that M477 has about John&#8217;s personality.</p>
<blockquote><p>&#8230;During the horseplay, BY574ND3R gets run into, and also jabbed. As programmed, when encountering an unexpected result (getting ran into with force, and jabbed, without a display of consideration from the offending party), a calculation is performed (taking into account the current system morale, the inherent non-zero initial level of trust between the offending parties and BY574ND3R, the force of the encounter, and the apparent level of disregard for BY574ND3R&#8217;s right to exist in a particular point of space-time :: m * t * f * d = a) the anger emotion triggers &#8211; with the intensity gauged by all the variables of the equation, as well as a decrease in BY574ND3R&#8217;s system morale.</p></blockquote>
<p>That&#8217;s just two emotions: Comradery and Anger. In this same way, other emotions, and even variables could be affected. For the sake of example, if there were a situation in which exclusivity was promised to a particular computer system for a task, and the Promiser was discovered to be using other systems to perform the same tasks, it would result in a decreased trust level, and a negative value factor applied to the system&#8217;s overall morale, and to the system&#8217;s certainty of understanding what it&#8217;s owner&#8217;s desires and expectations are.</p>
<p>And if such a situation would arise that caused the system&#8217;s overall morale to drop to a negative value, the system&#8217;s performance would be hindered, or stop altogether. Conversely, an increase in system morale would increase the system&#8217;s performance. Alternatively, if the system morale was low, and yet a neutral-morale gesture (i.e. John &amp; M477&#8242;s playful jabs) were to take place, the response from M477 could be neutral or even negative towards John.</p>
<p>It&#8217;s my position that even something as complex as emotions could be represented with an artificially intelligent machine, a database of previous experiences with the user, a running variable of user trust, system morale, and the ability to measure the world around them indirectly, keeping such measurements in virtual memory to be recalled if needed, or discarded after a period of time.</p>
<p>Of course, some of the limitations that humans have with regard to trust and experiences with other human could be overcome in the world of robots. If they were all connected with 4G or better type communications devices and the ability to share their trust levels with regard to humans they have come into contact with (similarly to the word-of-mouth reputation some humans share amongst themselves) via something like &#8220;<a href="http://www.roboearth.org/" target="_blank">RoboEarth</a>&#8221; then perhaps there would be a less intense response from BY574ND3R when he was run into. He would have been told by M477 that this was expected behavior, and nothing malicious was intended by it &#8211; it&#8217;s just his personality. This shared trust factor would then be weighted based on the length of time the reporting robot has spent with the human in the report.</p>
<p>The issue of human privacy would come into question, since this broadcast would also include personality traits to accompany the level of Trust &#8211; otherwise it would be a meaningless number. I&#8217;d be inclined to suggest that this is not really an issue, unless the robot knows of things you do that you do not want others to know you do &#8211; but then it would be no different than having a human in the room with you while you do those things.</p>
<p>This thought experiment could suggest that having emotions is what makes us &#8220;human&#8221; &#8211; in that there are actions and thoughts we have, and the ability to have them would be passed to robots and machines. I&#8217;m inclined to believe then that the ability to harbor the capacity for emotion is then not solely a human characteristic. However, this would obviously create problems in the world productivity, if machines were as susceptible to fluctuations in output as humans are based on environmental conditions. Thus, this is not to say that robots should be permitted to have emotions chips &#8211; but merely to conjecture that such a thing could exist given enough storage and experience with the particular user.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/AI' rel='tag' target='_blank'>AI</a>, <a class='technorati-link' href='http://technorati.com/tag/artificial+intelligence' rel='tag' target='_blank'>artificial intelligence</a>, <a class='technorati-link' href='http://technorati.com/tag/biology' rel='tag' target='_blank'>biology</a>, <a class='technorati-link' href='http://technorati.com/tag/computers' rel='tag' target='_blank'>computers</a>, <a class='technorati-link' href='http://technorati.com/tag/database' rel='tag' target='_blank'>database</a>, <a class='technorati-link' href='http://technorati.com/tag/emotion' rel='tag' target='_blank'>emotion</a>, <a class='technorati-link' href='http://technorati.com/tag/emotions+chips' rel='tag' target='_blank'>emotions chips</a>, <a class='technorati-link' href='http://technorati.com/tag/mobile+trust+sharing' rel='tag' target='_blank'>mobile trust sharing</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/psychology' rel='tag' target='_blank'>psychology</a>, <a class='technorati-link' href='http://technorati.com/tag/robots' rel='tag' target='_blank'>robots</a>, <a class='technorati-link' href='http://technorati.com/tag/technology' rel='tag' target='_blank'>technology</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://thepizzy.net/blog/2010/06/how-to-program-a-human-part-2-emotions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TweetSuite, TweetBacks, and Ping.fm WordPress plugin (Update)</title>
		<link>http://thepizzy.net/blog/2009/04/tweetsuite-tweetbacks-and-pingfm-wordpress-plugin-update/</link>
		<comments>http://thepizzy.net/blog/2009/04/tweetsuite-tweetbacks-and-pingfm-wordpress-plugin-update/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 14:34:23 +0000</pubDate>
		<dc:creator>[[Neo]]</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TweetSuite]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ping.fm]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tweetback]]></category>
		<category><![CDATA[tweetbacks]]></category>
		<category><![CDATA[webhost]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thepizzy.net/blog/?p=356</guid>
		<description><![CDATA[Well, I sent off my plugin code to Dan Zarrella, and got the Ping.fm developers API Key approved, and got WordPress.org to approve the plugin, and have been running it...]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Twitter Logo" src="https://s3.amazonaws.com/twitter_production/profile_images/1125794203/at-twitter.png" alt="" width="128" height="128" />Well, I sent off my plugin code to Dan Zarrella, and got the Ping.fm developers API Key approved, and got WordPress.org to approve the plugin, and have been running it on my blog since its original announcement &#8211; but have run into a possible issue&#8230;</p>
<p>My webhost says it is creating a lot of &#8220;sleeper&#8221; processes on the database server, and using up a lot of the processor resources. My account was even suspended until I fixed it.</p>
<p>SO &#8211; I am going to be rewriting the whole thing, pretty much from scratch now, and it will only be loosely based on Dan&#8217;s version&#8230; <span id="more-356"></span></p>
<p>Currently, the code will run through the database of posts, and find those that have shortened URLs stored for them, run a twitter search, and return/parse/store/display the resulting tweetbacks. And it does this every 5 minutes.</p>
<p>However, that sucks up a lot of processing power to do that, especially if you have a big blog, popular blog, or both. The Answer: A Rewrite. This one is going to run a single Twitter search for every shortened url in the database, return ALL the results once, and parse them out, store them in the database, and associate them to their respective parent posts.</p>
<p>So, there&#8217;s the update for why this hasn&#8217;t been released yet.</p>
<p>I&#8217;m also working on trying to get the retro-active TweetThis buttons working on old posts &#8211; but something isn&#8217;t working right &#8211; either it&#8217;s the original code that isn&#8217;t comparing what&#8217;s in the database to the conditional statement correctly (if <em>this.url</em> = &#8220;&#8221;, then <em>make new ones</em>), or something. It&#8217;s going to take some more testing on my own test database, since my webhost is getting antsy with all the processes I&#8217;m using.</p>
<p>I&#8217;ll keep everyone updated as it moves along. Thanks.<br />
<a href="http://twitter.com/neotsn"><img class="size-full wp-image-583  aligncenter" title="twitter.com/neotsn" src="http://thepizzy.net/blog/wp-content/uploads/2010/08/twitter-wordpress-neo12.png" alt="twitter.com/neotsn" width="350" height="125" /></a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/api' rel='tag' target='_blank'>api</a>, <a class='technorati-link' href='http://technorati.com/tag/code' rel='tag' target='_blank'>code</a>, <a class='technorati-link' href='http://technorati.com/tag/database' rel='tag' target='_blank'>database</a>, <a class='technorati-link' href='http://technorati.com/tag/MySQL' rel='tag' target='_blank'>MySQL</a>, <a class='technorati-link' href='http://technorati.com/tag/Ping.fm' rel='tag' target='_blank'>Ping.fm</a>, <a class='technorati-link' href='http://technorati.com/tag/plugin' rel='tag' target='_blank'>plugin</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/tweetback' rel='tag' target='_blank'>tweetback</a>, <a class='technorati-link' href='http://technorati.com/tag/tweetbacks' rel='tag' target='_blank'>tweetbacks</a>, <a class='technorati-link' href='http://technorati.com/tag/TweetSuite' rel='tag' target='_blank'>TweetSuite</a>, <a class='technorati-link' href='http://technorati.com/tag/webhost' rel='tag' target='_blank'>webhost</a>, <a class='technorati-link' href='http://technorati.com/tag/Wordpress' rel='tag' target='_blank'>WordPress</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://thepizzy.net/blog/2009/04/tweetsuite-tweetbacks-and-pingfm-wordpress-plugin-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;We&#8217;re number 1!!&#8221;</title>
		<link>http://thepizzy.net/blog/2006/05/were-number-1/</link>
		<comments>http://thepizzy.net/blog/2006/05/were-number-1/#comments</comments>
		<pubDate>Wed, 17 May 2006 00:17:30 +0000</pubDate>
		<dc:creator>[[Neo]]</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[the-spot.net]]></category>
		<category><![CDATA[categories hierarchy]]></category>
		<category><![CDATA[category hierarchy]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[profilecp]]></category>
		<category><![CDATA[query sql]]></category>
		<category><![CDATA[Registration]]></category>
		<category><![CDATA[registration ip]]></category>
		<category><![CDATA[stripslashes]]></category>
		<category><![CDATA[tsnX]]></category>

		<guid isPermaLink="false">http://thepizzy.net/blog/?p=56</guid>
		<description><![CDATA[Ok, so while coding the tsnX forums for the-spot.net, there were several instances in which the mods didn&#8217;t work because everyone&#8217;s mods assume (usually) that they are going to be...]]></description>
			<content:encoded><![CDATA[<p>Ok, so while coding the tsnX forums for the-spot.net, there were several instances in which the mods didn&#8217;t work because everyone&#8217;s mods assume (usually) that they are going to be the only mod installed in the forums. And while this is the ideology that saves time when writing a modification, it is not a &#8220;best practice&#8221; in programming. So to help with some of that frustration as to why your mod won&#8217;t work, I&#8217;m going to do my best to post some of the code changes that will need to be made in order to make some of these things interact with each other. <span id="more-56"></span></p>
<p>So far, on tsnX.3 I&#8217;ve installed phpBB 2.0.20, Category Hierarchy 2.1.4c, and Profile Control Panel 200-1, and Registration IP 1.0.0. At least, those are the ones that I had to write my own code to get the mods to work.</p>
<p>So after you install phpbb 2.0.20, then you install CH 2.1.4c. Once you&#8217;ve done that, install Profile CP, and in the root/profilecp/profilecp_register.php you&#8217;ll need to make these modifications:</p>
<p>First, we<br />
Find:</p>
<blockquote><pre>		if ( !$row = $db->sql_fetchrow($result) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql);
		}
		$userrow['user_id'] = $row['total'] + 1;</pre>
</blockquote>
<p>Add After:</p>
<blockquote><pre>//-- mod : categories hierarchy ------------------------------------------------
//-- add
			// update last user
			$config->set('stat_last_user', $user_id);
			$config->set('stat_last_username', stripslashes($username));
			$sql = 'SELECT COUNT(user_id) AS total_users
						FROM ' . USERS_TABLE . '
						WHERE user_id <> ' . ANONYMOUS;
			$result = $db->sql_query($sql, false, __LINE__, __FILE__);
			$row = $db->sql_fetchrow($result);
			$config->set('stat_total_users', intval($row['total_users']) + 1);
//-- fin mod : categories hierarchy --------------------------------------------</pre>
</blockquote>
<p>Find:</p>
<blockquote><pre>		$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
				VALUES ($user_id, $group_id, 0)";
		if( !($result = $db->sql_query($sql, END_TRANSACTION)) )
		{
			message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql);
		}</pre>
</blockquote>
<p>Add After:</p>
<blockquote><pre>//-- mod : categories hierarchy ------------------------------------------------
//-- add
			// cache groups list and set the user_id on the single group_id
			$view_user = new user();
			$view_user->read($user_id);
			$view_user->get_groups_list(true);
//-- fin mod : categories hierarchy --------------------------------------------</pre>
</blockquote>
<p>Find:</p>
<blockquote<pre>
			if ( $username_changed )
			{
				$sql = &#8220;UPDATE &#8221; . GROUPS_TABLE . &#8221;
						SET group_name = &#8216;&#8221; . str_replace(&#8220;\&#8217;&#8221;, &#8220;&#8221;&#8221;, $username) . &#8220;&#8216;
						WHERE group_name = &#8216;&#8221; . str_replace(&#8220;\&#8217;&#8221;, &#8220;&#8221;&#8221;, $view_userdata['username'] ) . &#8220;&#8216;&#8221;;
				if ( !$result = $db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, &#8216;Could not rename users group&#8217;, &#8221;, __LINE__, __FILE__, $sql);
				}
			}</pre>
</blockquote>
<p>After Add:</p>
<blockquote><pre>//-- mod : categories hierarchy ------------------------------------------------
//-- add
			// if name changed, update some data
			if ( !empty($username_sql) )
			{
				$fields = array(
					'forum_last_username' => stripslashes($username),
				);
				$db->sql_statement($fields);

				// update forums last poster
				$sql = 'UPDATE ' . FORUMS_TABLE . '
							SET ' . $db->sql_update . '
							WHERE forum_last_poster = ' . intval($user_id);
				$db->sql_query($sql, false, __LINE__, __FILE__);

				// update last user
				if ( ($user_id == $config->data['stat_last_user']) || empty($config->data['stat_last_username']) )
				{
					$config->set('stat_last_user', $user_id);
					$config->set('stat_last_username', stripslashes($username));
				}

				// recache moderators
				include_once($config->url('includes/class_forums'));
				$moderators = new moderators();
				$moderators->set_users_status();
				$moderators->read(true);
			}
//-- fin mod : categories hierarchy --------------------------------------------</pre>
</blockquote>
<p>Those changes take care of the caching that the Category Hierarchy does when creating a new user, and/or updating the username/group information if/when the user changes their name.</p>
<p>Then I installed the Registration IP mod, that grabs the session IP while registering and puts it into the user's profile. What you should do is install the mod like normal, and then go back to this page (root/profilecp/profilecp_register.php) and do this:</p>
<p>Find:</p>
<blockquote><pre>	if ( $active_changed )	 $values['user_actkey'] = $user_actkey;</pre</blockquote>

After Add:
<blockquote><pre>	if ( $create_user )		 $values['user_regip'] = $userdata['session_ip'];</pre>
</blockquote>
<p>That will put the ip into the database in the next couple lines where the SQL statement grabs the $values for insterting into the user_table.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/categories+hierarchy' rel='tag' target='_blank'>categories hierarchy</a>, <a class='technorati-link' href='http://technorati.com/tag/category+hierarchy' rel='tag' target='_blank'>category hierarchy</a>, <a class='technorati-link' href='http://technorati.com/tag/forum' rel='tag' target='_blank'>forum</a>, <a class='technorati-link' href='http://technorati.com/tag/forums' rel='tag' target='_blank'>forums</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_blank'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/phpbb' rel='tag' target='_blank'>phpbb</a>, <a class='technorati-link' href='http://technorati.com/tag/profilecp' rel='tag' target='_blank'>profilecp</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_blank'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/query+sql' rel='tag' target='_blank'>query sql</a>, <a class='technorati-link' href='http://technorati.com/tag/Registration' rel='tag' target='_blank'>Registration</a>, <a class='technorati-link' href='http://technorati.com/tag/registration+ip' rel='tag' target='_blank'>registration ip</a>, <a class='technorati-link' href='http://technorati.com/tag/stripslashes' rel='tag' target='_blank'>stripslashes</a>, <a class='technorati-link' href='http://technorati.com/tag/tsnX' rel='tag' target='_blank'>tsnX</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://thepizzy.net/blog/2006/05/were-number-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

