<?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>influenced dot net &#187; Programming</title>
	<atom:link href="http://www.influenced.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.influenced.net</link>
	<description>Mark Hutton</description>
	<lastBuildDate>Wed, 14 Jul 2010 10:59:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>mIRC DLL: True Random Card Deck Generator</title>
		<link>http://www.influenced.net/2009/09/10/mirc-dll-true-random-card-deck-generator/</link>
		<comments>http://www.influenced.net/2009/09/10/mirc-dll-true-random-card-deck-generator/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 12:58:50 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[cards]]></category>
		<category><![CDATA[deck]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[mirc]]></category>
		<category><![CDATA[poker]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.influenced.net/?p=153</guid>
		<description><![CDATA[I&#8217;ve whipped up a quick dll for mIRC to generate random card decks that are as random as possible via random.org Usage instructions are inside the archive, as is the Delphi source code (requires Indy10 for TIDHttp) Edit: added alternative sourcecode which uses WinINet instead of Indy10.. results in a smaller DLL]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve whipped up a quick <a href="http://www.influenced.net/misc/rndcards.zip">dll for mIRC to generate random card decks</a> that are as random as possible via <a href="http://random.org">random.org</a></p>
<p>Usage instructions are inside the archive, as is the Delphi source code (requires Indy10 for TIDHttp)</p>
<p>Edit: added alternative sourcecode which uses WinINet instead of Indy10.. results in a smaller DLL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2009/09/10/mirc-dll-true-random-card-deck-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Akismet SPAM Filtering in phpBB3</title>
		<link>http://www.influenced.net/2009/06/03/akismet-spam-filtering-in-phpbb3/</link>
		<comments>http://www.influenced.net/2009/06/03/akismet-spam-filtering-in-phpbb3/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 13:15:09 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[bodybuilding]]></category>
		<category><![CDATA[coopersguns]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[phpbb3]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.influenced.net/?p=142</guid>
		<description><![CDATA[Recently I&#8217;ve been seeing a shitload of Spambot signups and actual spam postings on my Coopersguns BodyBuilding forums phpBB 3 had a little spam hiatus whilst the spammers cracked the new captcha system, however it&#8217;s obviously been well and truly broken now I decided to clean the forums up and get rid of the spammers. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been seeing a shitload of Spambot signups and actual spam postings on my <a href="http://www.coopersguns.com/forums/">Coopersguns BodyBuilding forums</a></p>
<p>phpBB 3 had a little spam hiatus whilst the spammers cracked the new captcha system, however it&#8217;s obviously been well and truly broken now</p>
<p>I decided to clean the forums up and get rid of the spammers.  I have employed 2 techniques:</p>
<ol>
<li>A phpBB3 mod called <a href="http://www.phpbb.com/mods/db/download/10115/">daroPL_AntiSpam</a></li>
<li>Some code I quickly conjured up to check with Akismet when a comment is posted</li>
</ol>
<p>I will obviously be talking about the latter here, follows are instructions on how to implement the Akismet check on posts:</p>
<p><strong>If you want to copy &#038; paste the following code snippets, hover over them and click the &#8216;copy&#8217; button</strong></p>
<p>1) Download <a href="http://akismet-php-curl-class.googlecode.com/files/akismet_curl_class.zip">akismet-php-curl-class</a><br />
2) Copy the akismet.curl.class.php from the archive to your phpBB3 forum&#8217;s &#8216;includes&#8217; folder (e.g. ~/public_html/forums/includes)<br />
3) Edit message_parser.php in the &#8216;includes&#8217; folder and make the following changes:</p>
<p>Find:</p>
<pre class="brush: php;">
if (!class_exists('bbcode'))
{
        include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}
</pre>
<p>After it, insert the following</p>
<pre class="brush: php;">
if (!class_exists('akismet')) {
        include($phpbb_root_path . 'includes/akismet.curl.class.' . $phpEx);
}
</pre>
<p>Find: </p>
<pre class="brush: php;">
// Check number of links
if ($config['max_' . $mode . '_urls'] &amp;&amp; $num_urls &gt; $config['max_' . $mode . '_urls'])
{
	$this-&gt;warn_msg[] = sprintf($user-&gt;lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
	return (!$update_this_message) ? $return_message : $this-&gt;warn_msg;
}
</pre>
<p>After it, insert the following:</p>
<pre class="brush: php;">
// Akismet SPAM check
if (($user-&gt;data['user_posts']&lt;=6) &amp;&amp; ($user-&gt;data['user_type']==0)) {

	$akismet_comment = array(
	    'comment_type'              =&gt; 'comment',
	    'comment_author'            =&gt; $user-&gt;data['username'],
	    'comment_author_email'      =&gt; $user-&gt;data['user_email'],
	    'comment_author_url'        =&gt; $user-&gt;data['user_website'],
	    'comment_content'           =&gt; $this-&gt;message,
	);

	$akismet = new akismet('YOURAKISMETAPIKEYHERE','http://www.yourforums.com/forums');

	if(!$akismet-&gt;error) {

		if($akismet-&gt;valid_key()) {

			if($akismet-&gt;is_spam($akismet_comment)) {

				$this-&gt;warn_msg[] = $user-&gt;lang['AKISMET_SPAM'];
				$a_to = &quot;you@youraddress.com&quot;;
				$a_subject = &quot;Attempted SPAM Post by &quot;.$user-&gt;data['username'];
				$a_body = $this-&gt;message;
				$a_headers = &quot;From: admin@yourforums.com&quot;;
				mail($a_to, $a_subject, $a_body, $a_headers);

			}

		}

	}

}
</pre>
<p>4) Edit posting.php in the &#8216;language/en/&#8217; folder (obviously you&#8217;ll need to add this to other languages your users use too)</p>
<p>Find:</p>
<pre class="brush: php;">
        'TOO_FEW_CHARS'                         =&gt; 'Your message contains too few characters.',
</pre>
<p>After it, insert the following:</p>
<pre class="brush: php;">
        'AKISMET_SPAM'                  =&gt; 'Your message looks like SPAM.',
</pre>
<p>5) Finished!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2009/06/03/akismet-spam-filtering-in-phpbb3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Secpay, Actinic &amp; SSL lameness</title>
		<link>http://www.influenced.net/2007/10/30/secpay-actinic-ssl-lameness/</link>
		<comments>http://www.influenced.net/2007/10/30/secpay-actinic-ssl-lameness/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 13:56:41 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[actinic]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[secpay]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.influenced.net/2007/10/30/secpay-actinic-ssl-lameness/</guid>
		<description><![CDATA[Currently when enabling SSL on shopping cart pages in Actinic, Actinic will no longer be able to link up Secpay transactions to orders. After numerous hours debugging, I figured out what was going wrong.. when SSL is enabled on shopping cart pages, Actinic provides Secpay with HTTPS callbacks &#8211; as you&#8217;d expect. It also sets [...]]]></description>
			<content:encoded><![CDATA[<p>Currently when enabling SSL on shopping cart pages in Actinic, Actinic will no longer be able to link up Secpay transactions to orders.</p>
<p>After numerous hours debugging, I figured out what was going wrong.. when SSL is enabled on shopping cart pages, Actinic provides Secpay with HTTPS callbacks &#8211; as you&#8217;d expect.  It also sets a parameter which Secpay needs if the callbacks are HTTPS.  However for some reason at this moment in time Secpay won&#8217;t use the HTTPS callbacks &#8211; the request is never sent to the server</p>
<p>I don&#8217;t know why this is happening, I even used the alternative method of informing Secpay that the callback is HTTPS &#8211; via the &#8216;options&#8217; parameter.. no dice</p>
<p>The solution I&#8217;m currently using is to modify the &#8216;OCCSecPayScriptTemplate.pl&#8217; file, inserting a line after the following block of code:</p>
<p># to enable Diners cards, remove the &#8216;#&#8217; from the start of the 2 lines below<br />
#$sOptions .= &#8216;,&#8217; if ($sOptions ne &#8221;);<br />
#$sOptions .= &#8216;diners=true&#8217;;</p>
<p>the line to change the callback URLs back to HTTP is:</p>
<p>$::sCallBackURLAuth =~ s/https/http/;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2007/10/30/secpay-actinic-ssl-lameness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpBB mods: bbcode for ifilm, youtube and google video embedding</title>
		<link>http://www.influenced.net/2006/09/21/phpbb-mods-bbcode-for-ifilm-youtube-and-google-video-embedding/</link>
		<comments>http://www.influenced.net/2006/09/21/phpbb-mods-bbcode-for-ifilm-youtube-and-google-video-embedding/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 07:15:49 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.influenced.net/2006/09/21/phpbb-mods-bbcode-for-ifilm-youtube-and-google-video-embedding/</guid>
		<description><![CDATA[I wanted to be able to embed videos from various services into forum posts on CoopersGuns Health, Fitness &#038; BodyBuilding Forums so I decided to have a play with modifying the bbcode processor and here&#8217;s what I&#8217;ve come up with.. Modification instructions Make the following modifications to forum/includes/bbcode.php Find the bbencode_first_pass function Locate the end [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to be able to embed videos from various services into forum posts on <a href="http://www.coopersguns.com/">CoopersGuns Health, Fitness &#038; BodyBuilding</a> Forums so I decided to have a play with modifying the bbcode processor and here&#8217;s what I&#8217;ve come up with..</p>
<h3>Modification instructions</h3>
<p>Make the following modifications to <strong>forum/includes/bbcode.php</strong></p>
<ul>
<li>Find the bbencode_first_pass function</li>
<li>Locate the end of the function</li>
</ul>
<pre><code>
	// Remove our padding from the string..
	return substr($text, 1);
</code></pre>
<ul>
<li>Add the following just <strong>before</strong> the above:</li>
</ul>
<pre><code>
	// [ifilm] and [/ifilm]
	$text = preg_replace("#\[ifilm=([0-9]+[,][0-9]+[,][0-9]+)\](.*?)\[/ifilm\]#si", "[ifilm=\\1:$uid]\\2[/ifilm:$uid]", $text);

	// [youtube] and [/youtube]
	$text = preg_replace("#\[youtube=([0-9]+[,][0-9]+[,][0-9a-z\-_]+)\](.*?)\[/youtube\]#si", "[youtube=\\1:$uid]\\2[/youtube:$uid]", $text);

	// [gvid] and [/gvid]
	$text = preg_replace("#\[gvid=([0-9]+[,][0-9]+[,][0-9a-z\-_]+)\](.*?)\[/gvid\]#si", "[gvid=\\1:$uid]\\2[/gvid:$uid]", $text);
</code></pre>
<ul>
<li>Find the bbencode_second_pass function</li>
<li>Locate the part that deals with [QUOTE]</li>
</ul>
<pre><code>
	// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
	$text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text);
	$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
</code></pre>
<ul>
<li>Add the following code <strong>after</strong> the above:</li>
</ul>
<pre><code>
	// [ifilm] and [/ifilm]
	$text = preg_replace("#\[ifilm=([0-9]+)[,]([0-9]+)[,]([0-9]+):$uid\](.*?)\[/ifilm:$uid\]#si", "<embed allowScriptAccess=\"never\" width=\"\\1\" height=\"\\2\" src=\"http://www.ifilm.com/efp\" quality=\"high\" bgcolor=\"000000\" name=\"efp\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" flashvars=\"flvBaseClip=\\3\""."[/ifilm:$uid]", $text);
	$text = str_replace("[/ifilm:$uid]", " />", $text); 	

	// [youtube] and [/youtube]
	$text = preg_replace("#\[youtube=([0-9]+)[,]([0-9]+)[,]([0-9a-z\-_]+):$uid\](.*?)\[/youtube:$uid\]#si", "<object width=\"\\1\" height=\"\\2\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\3\"></param><embed src=\"http://www.youtube.com/v/\\3\" type=\"application/x-shockwave-flash\" width=\"\\1\" height=\"\\2\"></embed></object>"."[/youtube:$uid]", $text);
	$text = str_replace("[/youtube:$uid]", "", $text); 		

	// [gvid] and [/gvid]
	$text = preg_replace("#\[gvid=([0-9]+)[,]([0-9]+)[,]([0-9a-z\-_]+):$uid\](.*?)\[/gvid:$uid\]#si", "<embed style=\"width:\\1px; height:\\2px;\" id=\"VideoPlayback\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=\\3&#038;hl=en\"></embed>"."[/gvid:$uid]", $text);
	$text = str_replace("[/gvid:$uid]", "", $text);
</code></pre>
<ul>
<li>Save your changes to bbcode.php and upload the modified file (if you downloaded it to modify)</li>
</ul>
<p>That&#8217;s it.. you can now embed iFilm, YouTube and Google Video videos into your forum posts</p>
<h3>Usage</h3>
<p>The syntax is similar for all three:</p>
<p>[ifilm=width,height,id]description[/ifilm]</p>
<p>[youtube=width,height,id]description[/youtube]</p>
<p>[gvid=width,height,id]description[/gvid]</p>
<p>Example:<br />
<a href="http://www.coopersguns.com/forums/viewtopic.php?t=136">CoopersGuns Health, Fitness &#038; BodyBuilding Forums Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2006/09/21/phpbb-mods-bbcode-for-ifilm-youtube-and-google-video-embedding/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordPress&#8217; TinyMCE Popup Width In Firefox</title>
		<link>http://www.influenced.net/2006/07/13/wordpress-tinymce-popup-width-firefox/</link>
		<comments>http://www.influenced.net/2006/07/13/wordpress-tinymce-popup-width-firefox/#comments</comments>
		<pubDate>Thu, 13 Jul 2006 06:56:46 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://www.influenced.net/2006/07/13/wordpress-tinymce-popup-width-firefox/</guid>
		<description><![CDATA[I&#8217;m surprised there isn&#8217;t much about this online.. although I admit my search wasn&#8217;t very comprehensive Anyway, for a while now I&#8217;ve been a bit annoyed with the TinyMCE editor in WordPress.. for example, when you click the &#8220;Insert/edit link&#8221; button on the toolbar, a popup window is launched which proceeds to resize itself to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m surprised there isn&#8217;t much about this online.. although I admit my search wasn&#8217;t very comprehensive</p>
<p>Anyway, for a while now I&#8217;ve been a bit annoyed with the TinyMCE editor in WordPress.. for example, when you click the &#8220;Insert/edit link&#8221; button on the toolbar, a popup window is launched which proceeds to resize itself to be a less than useful width</p>
<p><img src="http://www.influenced.net/content/wordpress-tinymce-popup-width-firefox/tinymce-popup-width-firefox.png" /></p>
<p>Apparently according to one of the developers of TinyMCE in <a href="http://tinymce.moxiecode.com/punbb/viewtopic.php?id=2866">this thread</a>, it&#8217;s down to Firefox using the status bar width when it shouldn&#8217;t</p>
<p>Anyway, the fix is as follows:</p>
<p>Just after the statements below in tiny_mce_popup.js</p>
<pre>
   // Netscape 7.1 workaround
   if (this.isWindow &#038;&#038; tinyMCE.isNS71) {
      window.resizeBy(0, 10);
      return;
   }
</pre>
<p>Add the following:</p>
<pre>
   // Gecko workaround
   if (this.isWindow &#038;&#038; tinyMCE.isGecko) {
      window.resizeBy(20, 10);
      return;
   }
</pre>
<p>That seems to work alright and resize the window to a useable width!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2006/07/13/wordpress-tinymce-popup-width-firefox/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Google Desktop Sidebar &amp; Delphi</title>
		<link>http://www.influenced.net/2005/10/14/google-desktop-sidebar-delphi/</link>
		<comments>http://www.influenced.net/2005/10/14/google-desktop-sidebar-delphi/#comments</comments>
		<pubDate>Fri, 14 Oct 2005 07:27:34 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Recently I&#8217;ve been trying to produce a plugin using Delphi Win32 for Google Desktop 2 Beta &#8211; a Sidebar plugin. Unfortunately my knowledge of COM isn&#8217;t great and my knowledge of COM in Delphi is even less. However I have learned what I think is enough and cannot seem to solve the problems I&#8217;m experiencing. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been trying to produce a plugin using Delphi Win32 for Google Desktop 2 Beta &#8211; a Sidebar plugin.</p>
<p>Unfortunately my knowledge of COM isn&#8217;t great and my knowledge of COM in Delphi is even less.  However I have learned what I think is enough and cannot seem to solve the problems I&#8217;m experiencing. No amount of posting to the <a href="http://groups.google.com/group/Google-Desktop-Developer?lnk=oa&#038;hl=en">Google Desktop Developer Group</a> seems produce replies on the subject.</p>
<p>This is a plea for anybody who can program in Delphi to produce an example Sidebar plugin!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.influenced.net/2005/10/14/google-desktop-sidebar-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

