<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Austin's Blog</title>
	
	<link>http://www.thetoypolice.co.uk</link>
	<description>Useful technology for the self taught IT person</description>
	<lastBuildDate>Thu, 31 Mar 2011 18:50:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<!-- podcast_generator="Blubrry PowerPress/2.0.2" -->
	<itunes:summary>Useful technology for the self taught IT person</itunes:summary>
	<itunes:author>Austin's Blog</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.thetoypolice.co.uk/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:subtitle>Useful technology for the self taught IT person</itunes:subtitle>
	<image>
		<title>Austin's Blog</title>
		<url>http://www.thetoypolice.co.uk/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://www.thetoypolice.co.uk</link>
	</image>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AustinsBlogFeed" /><feedburner:info uri="austinsblogfeed" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Primepress Theme Nested comments</title>
		<link>http://feedproxy.google.com/~r/AustinsBlogFeed/~3/J9vAQrrOe4k/</link>
		<comments>http://www.thetoypolice.co.uk/primepress-theme-nested-comments/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 20:55:05 +0000</pubDate>
		<dc:creator>Austin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[appearance]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[css file]]></category>
		<category><![CDATA[custom css]]></category>
		<category><![CDATA[meta font]]></category>
		<category><![CDATA[primepress]]></category>

		<guid isPermaLink="false">http://www.thetoypolice.co.uk/?p=72</guid>
		<description><![CDATA[This week I noticed a problem with my wife&#8217;s blog regarding the use of nested comments. As of wordpress 2.7 comments have been treated differently and themes now need to...]]></description>
			<content:encoded><![CDATA[<p>This week I noticed a problem with my wife&#8217;s blog regarding the use of nested comments. As of wordpress 2.7 comments have been treated differently and themes now need to support nested comments. My wife uses nested comments and the <a href="http://www.techtrot.com/primepress" target="_blank">primepress </a>theme.  Using a <a href="http://bavotasan.com/tutorials/how-to-add-nested-comments-to-your-wordpress-theme/" target="_blank">how-to article </a>I copied the code to the custom.css file (Appearance>Editor) and then modified a few things to fit with the primepress theme.  I hope this works for anyone lese with the primepress theme:</p>
<blockquote><p>ol.commentlist { list-style:none; margin:0; padding:0; }   <br />
ol.commentlist li { border:1px solid #d5d5d5; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin:0 0 10px; padding:5px 7px 5px 64px; position:relative; }   <br />
ol.commentlist li.pingback comment-author { padding:0 170px 0 0; }   <br />
ol.commentlist li div.vcard cite.fn { font-style:normal; }   <br />
ol.commentlist li div.vcard cite.fn a.url { color:#cc0000; text-decoration:none; }   <br />
ol.commentlist li div.vcard cite.fn a.url:hover { color:#000; }   <br />
ol.commentlist li div.vcard img.avatar { background: #fff; border:1px solid #aaa; padding: 5px; left:-55px; position:absolute; top:7px; }   <br />
ol.commentlist li div.comment-meta { font-weight:bold; font-size: 10px; line-height: 16px; font-family: helvetica,arial,sans-serif; position:absolute; right:40px; text-align:right; top:5px; }   <br />
ol.commentlist li div.comment-meta a { color:#205B87; text-decoration:none; }   <br />
ol.commentlist li p { font-weight:normal;  margin:5px 0 12px; }   <br />
ol.commentlist li ul { font-weight:normal;  list-style:square; margin:0 0 12px; padding:0; }   <br />
ol.commentlist li div.reply { background:#999; border:1px solid #666; border-radius:2px; -moz-border-radius:2px; -webkit-border-radius:2px; color:#fff; padding:6px 5px 4px;  text-align:center; width:36px; }   <br />
ol.commentlist li div.reply:hover { background:#cc0000; border:1px solid #cc0000; }   <br />
ol.commentlist li div.reply a { color:#fff; text-decoration:none; text-transform:uppercase; }   <br />
ol.commentlist li ul.children { list-style:none; margin:12px 0 0; text-indent:0; }   <br />
ol.commentlist li ul.children li.depth-2 { margin:0 0 3px; }   <br />
ol.commentlist li ul.children li.depth-3 { margin:0 0 3px; }   <br />
ol.commentlist li ul.children li.depth-4 { margin:0 0 3px; }   <br />
ol.commentlist li ul.children li.depth-5 { margin:0 0 3px; }   <br />
ol.commentlist ul.children li.odd { background:#fff; }   <br />
ol.commentlist ul.children li.even { background:#f6f6f6; }   <br />
ol.commentlist li.pingback div.vcard { padding:0 170px 0 0; }</p>
</blockquote>
<p><br class="spacer_" /></p>
<img src="http://feeds.feedburner.com/~r/AustinsBlogFeed/~4/J9vAQrrOe4k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thetoypolice.co.uk/primepress-theme-nested-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thetoypolice.co.uk/primepress-theme-nested-comments/</feedburner:origLink></item>
		<item>
		<title>Editing Text Files in VBA – Part 2 File Editing</title>
		<link>http://feedproxy.google.com/~r/AustinsBlogFeed/~3/R3vAiiufqMk/</link>
		<comments>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-2-file-editing/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 20:44:42 +0000</pubDate>
		<dc:creator>Austin</dc:creator>
				<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[comma delimited file]]></category>
		<category><![CDATA[line input]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.thetoypolice.co.uk/?p=61</guid>
		<description><![CDATA[My previous post showed how to use the file dialogs to get a file name.  Using the file name we can then open the file for reading or writing to. To...]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-1-file-dialogs/" target="_blank">previous post</a> showed how to use the file dialogs to get a file name.  Using the file name we can then open the file for reading or writing to.</p>
<p>To open the file for reading (where openf = full path of the file you want to open):</p>
<blockquote><p>Open openf For Input As 1</p>
</blockquote>
<p>and to open the file for writing to (where savef = full path of the file you want to save to):</p>
<blockquote><p>Open savef For Output As 2</p>
</blockquote>
<p>Once you have the files open you can use a loop to read each line of the file you have opened and write to the output file.  The example shown here reads a comma delimited file, and stores each field in an array called linedata.  The first field of this array is the changed to read &#8220;hello&#8221; befre being written to the output file</p>
<blockquote><p>Do Until EOF(1)<br />
    Line Input #1, newline<br />
    linedata = Split(newline, &#8220;,&#8221;)<br />
    linedata(0) = &#8220;hello&#8221;        <br />
    Print #2, Join(linedata, &#8220;,&#8221;)<br />
    End If<br />
Loop</p>
</blockquote>
<p> Once finished, don&#8217;t forget to close the files you have opened:</p>
<blockquote><p>Close #1<br />
Close #2</p>
</blockquote>
<img src="http://feeds.feedburner.com/~r/AustinsBlogFeed/~4/R3vAiiufqMk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-2-file-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-2-file-editing/</feedburner:origLink></item>
		<item>
		<title>Editing Text files in VBA – Part 1 File Dialogs</title>
		<link>http://feedproxy.google.com/~r/AustinsBlogFeed/~3/Od0TsrS7Jw0/</link>
		<comments>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-1-file-dialogs/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 20:30:10 +0000</pubDate>
		<dc:creator>Austin</dc:creator>
				<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[comdlg32]]></category>
		<category><![CDATA[microsoft dll]]></category>
		<category><![CDATA[multiple files]]></category>
		<category><![CDATA[openfilename]]></category>
		<category><![CDATA[text editors]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.thetoypolice.co.uk/?p=49</guid>
		<description><![CDATA[How to use file dialogs to open a text file for editing]]></description>
			<content:encoded><![CDATA[<p>One of the issues I frequently come across at work is how to manipulate/change large deimited text files.  Importing into excel often casues issues with formatting, and most text editors struggle to manage the large files.  By using a simple VBA progam you can simply chosse the fiel, edit the relavant fields and re-output the file in a simple way.</p>
<p>Firstly you will need to create a file dialog to store the file you are opening, and then use a second to save the file you are outputting.  This can be done by using the activeX file dialog control, but this can casue issues if you want to share this program with other users.  A better approach is to use the microsoft DLL: comdlg32.dll</p>
<p>Start by creating the function, along with a custom type to hold the parameters:</p>
<blockquote><p>Public Declare Function GetOpenFileName Lib &#8220;comdlg32.dll&#8221; Alias _<br />
    &#8220;GetOpenFileNameA&#8221; (pOpenFileName As OPENFILENAME) As Long<br />
    <br />
Public Const OFN_ALLOWMULTISELECT As Long = &amp;H200<br />
Public Const OFN_EXPLORER As Long = &amp;H80000 <br />
Private Type OPENFILENAME<br />
    lStructSize As Long<br />
    hwndOwner As Long<br />
    hInstance As Long<br />
    lpstrFilter As String<br />
    lpstrCustomFilter As String<br />
    nMaxCustFilter As Long<br />
    nFilterIndex As Long<br />
    lpstrFile As String<br />
    nMaxFile As Long<br />
    lpstrFileTitle As String<br />
    nMaxFileTitle As Long<br />
    lpstrInitialDir As String<br />
    lpstrTitle As String<br />
    flags As Long<br />
    nFileOffset As Integer<br />
    nFileExtension As Integer<br />
    lpstrDefExt As String<br />
    lCustData As Long<br />
    lpfnHook As Long<br />
    lpTemplateName As String<br />
    pvReserved        As Long<br />
    dwReserved        As Long<br />
    FlagsEx           As Long<br />
End Type</p>
</blockquote>
<p>I then created 2 further functions in order to populate the open dialog settings, and to manipulate the string if multiple files are selected:</p>
<blockquote><p>Private Function getfiles() As Collection</p>
<p>    Dim OpenFile As OPENFILENAME<br />
    Dim lReturn As Long<br />
    Dim sFilter As String<br />
    Dim buff As String<br />
    Dim coll1 As New Collection<br />
    <br />
    <br />
    OpenFile.lStructSize = Len(OpenFile)<br />
    OpenFile.hwndOwner = 0<br />
    sFilter = &#8220;Html Files (*.html)&#8221; &amp; Chr(0) &amp; &#8220;*.HTML&#8221; &amp; Chr(0)<br />
    OpenFile.lpstrFilter = sFilter<br />
    OpenFile.nFilterIndex = 1<br />
    OpenFile.lpstrFile = String(257, 0)<br />
    OpenFile.nMaxFile = Len(OpenFile.lpstrFile) &#8211; 1<br />
    OpenFile.lpstrFileTitle = OpenFile.lpstrFile<br />
    OpenFile.nMaxFileTitle = OpenFile.nMaxFile<br />
    OpenFile.lpstrInitialDir = &#8220;C:\&#8221;<br />
    OpenFile.lpstrTitle = &#8220;Select HTML file(s) from digital flow (CTRL to multiselect)&#8221;<br />
    OpenFile.flags = OFN_ALLOWMULTISELECT Or OFN_EXPLORER<br />
    OpenFile.FlagsEx = 0<br />
    lReturn = GetOpenFileName(OpenFile)<br />
        If lReturn = 0 Then<br />
            MsgBox &#8220;A file was not selected!&#8221;, vbInformation, _<br />
              &#8220;Select a file using the Common Dialog DLL&#8221;<br />
         Else<br />
            &#8216;Ammended for multiselect<br />
            &#8216;<br />
            &#8216;getfiles = Trim(Left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) &#8211; 1))<br />
            <br />
             buff = Trim$(Left$(OpenFile.lpstrFile, Len(OpenFile.lpstrFile) &#8211; 2))<br />
             <br />
                Do While Len(buff) &gt; 3 And Left(buff, 1) &lt;&gt; vbNullChar<br />
      <br />
                    coll1.Add item:=StripDelimitedItem(buff, vbNullChar)<br />
                    <br />
                Loop<br />
                <br />
        End If<br />
Set getfiles = coll1<br />
End Function</p>
<p>Private Function StripDelimitedItem(startStrg As String, _<br />
                                    delimiter As String) As String</p>
<p>  &#8216;take a string separated by nulls,<br />
  &#8216;split off 1 item, and shorten the string<br />
  &#8216;so the next item is ready for removal.<br />
   Dim pos As Long<br />
   Dim item As String<br />
   <br />
   pos = InStr(1, startStrg, delimiter)<br />
   <br />
   If pos Then</p>
<p>      StripDelimitedItem = Mid$(startStrg, 1, pos &#8211; 1)<br />
      startStrg = Mid$(startStrg, pos + 1, Len(startStrg))<br />
    <br />
   End If</p>
<p>End Function</p>
</blockquote>
<p> The final step is to call the get files function.  You will also note the select case to capture the number of the files selected:</p>
<blockquote><p>Dim myfiles As New Collection</p>
<p>Set myfiles = getfiles()<br />
Select Case myfiles.Count<br />
Case Is &lt; 1<br />
    Exit Sub<br />
Case Is = 1<br />
    ofile = myfiles(1)<br />
    Open ofile for input as #1<br />
Case Is &gt; 1<br />
    For Each myfile In myfiles<br />
        If myfile = myfiles(1) Then<br />
            fdir = myfile<br />
        Else<br />
            If myfile &lt;&gt; &#8220;&#8221; Then<br />
                ofile = fdir &amp; &#8220;\&#8221; &amp; myfile<br />
                &#8221;Call a command to open a file and proess <br />
            Else<br />
                Exit For<br />
            End If<br />
        End If<br />
    Next myfile<br />
End Select</p>
</blockquote>
<p><br class="spacer_" /></p>
<img src="http://feeds.feedburner.com/~r/AustinsBlogFeed/~4/Od0TsrS7Jw0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-1-file-dialogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.thetoypolice.co.uk/editing-text-files-in-vba-part-1-file-dialogs/</feedburner:origLink></item>
		<item>
		<title>Playing with style sheets</title>
		<link>http://feedproxy.google.com/~r/AustinsBlogFeed/~3/7tPL2-9qEHQ/</link>
		<comments>http://www.thetoypolice.co.uk/playing-with-style-sheets/#comments</comments>
		<pubDate>Thu, 21 May 2009 20:28:25 +0000</pubDate>
		<dc:creator>Austin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[style sheet]]></category>

		<guid isPermaLink="false">http://www.thetoypolice.co.uk/?p=29</guid>
		<description><![CDATA[I am going to try looking at all the styles available in my theme via the &#8220;styles.css&#8221;.  This standard type uses the normal paragraph Then I looked at the headings:...]]></description>
			<content:encoded><![CDATA[<p>I am going to try looking at all the styles available in my theme via the &#8220;styles.css&#8221;.  This standard type uses the normal paragraph</p>
<p>Then I looked at the headings:</p>
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<p>I then decided to try and change h6 in the stylesheet to put some things in a box:</p>
<p>h6 { 	border-style: dashed; 	border-width: 3px; 	border-left-width: 10px; 	border-right-width: 10px; 	border-color: red; }</p>
<h6>Here is some stuff in a border.  By referring to h2 and using border-style: dashed</h6>
<p><span id="more-29"></span><br class="spacer_" /></p>
<p>Not having being taught html or stylesheets I need a useful reference for all the things I could add.  The website <a title="HTML Dog" href="http://htmldog.com/guides/cssbeginner/" target="_blank">html dog</a>, had an easy to use reference which I could use to add things to/from my stylesheet.I then looked at how to do this with changing the style in the html:</p>
<p style="border-style:dashed;border-width:3px;border-left-width:10px;border-right-width:10px;border-color:red;">Here was a sample.  By adding &lt;p style=border-style: dashed; border-width: 3px 10px;&gt;and then my text beofre closing with&lt;/p&gt;</p>
<img src="http://feeds.feedburner.com/~r/AustinsBlogFeed/~4/7tPL2-9qEHQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thetoypolice.co.uk/playing-with-style-sheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thetoypolice.co.uk/playing-with-style-sheets/</feedburner:origLink></item>
		<item>
		<title>Managing blank lines in WordPress</title>
		<link>http://feedproxy.google.com/~r/AustinsBlogFeed/~3/5ozmr-eSJdg/</link>
		<comments>http://www.thetoypolice.co.uk/managing-blank-lines-in-wordpress/#comments</comments>
		<pubDate>Mon, 18 May 2009 19:58:08 +0000</pubDate>
		<dc:creator>Austin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[line break]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://www.thetoypolice.co.uk/?p=3</guid>
		<description><![CDATA[My first few blogs on this site are going to be looking at the various techniques and challenges with using wordpress.  My wife&#8217;s blog is a far more visited site,...]]></description>
			<content:encoded><![CDATA[<p>My first few blogs on this site are going to be looking at the various techniques and challenges with using wordpress.  My <a title="Farmlanebooks" href="http://farmlanebooks.co.uk" target="_blank">wife&#8217;s blog</a> is a far more visited site, and rather than test things out there I will use this as my test bed!</p>
<p>The first challenge I have been set is to insert blank lines in my post.</p>
<p>In the visual editor having pressed &#8220;enter&#8221; 3 times I was hopful word press would convert this into the right HTML.  But as you can see this did not work!  Next step was to look at the html:</p>
<p>I started by typing in a line break &#8220;&lt;/br&gt;&#8221;.  At first this worked in the HTML view (after saving as draft), but as soon as I went back to the visual view and saved I was once again thwarted.</p>
<p>A quick search on google revealed the code I might be after: &#8220;&lt;br clear=&#8221;all&#8221;&gt;&#8221; but this also failed. I wanted to understand this a litttle bit more.  Some other searches on Google suggested an issue in the stylesheets and others to the editor (<a href="http://tinymce.moxiecode.com/" target="_blank">TinyMCE</a>).  Finally I found a wordpress plugin: <a href="http://wordpress.org/extend/plugins/tinymce-advanced/" target="_blank">TinyMCE Advanced</a>.  This allows the user to control the editor in a much more flexible way.  Looking at what this offers, I would recommend this plugin to the regular wordpress blogger.</p>
<img src="http://feeds.feedburner.com/~r/AustinsBlogFeed/~4/5ozmr-eSJdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thetoypolice.co.uk/managing-blank-lines-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thetoypolice.co.uk/managing-blank-lines-in-wordpress/</feedburner:origLink></item>
	</channel>
</rss>

