<?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>Twenty3design &#124; T3D - Web Design and Development &#187; Wordpress</title>
	<atom:link href="http://www.twenty3design.co.uk/category/blog/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twenty3design.co.uk</link>
	<description>Twenty3design &#124; T3D is a multi-disciplined design team specialising in creating great online places.</description>
	<lastBuildDate>Sat, 28 Jan 2012 21:11:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Not such a Happy New Year?</title>
		<link>http://www.twenty3design.co.uk/blog/not-such-a-happy-new-year/</link>
		<comments>http://www.twenty3design.co.uk/blog/not-such-a-happy-new-year/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 15:55:09 +0000</pubDate>
		<dc:creator>t3dphil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cybercrime]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[O2]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[wikipedia]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.twenty3design.co.uk/?p=1774</guid>
		<description><![CDATA[A few big cheeses haven&#8217;t had the best start to the year! We are less than a month into the new year and it hasn&#8217;t been such a happy one for quite a few of the world&#8217;s big tech names. I shall try and do this chronologically so that I don&#8217;t get accused of favoritism. Or, [...]]]></description>
			<content:encoded><![CDATA[<h3>A few big cheeses haven&#8217;t had the best start to the year!<span id="more-1774"></span></h3>
<p>We are less than a month into the new year and it hasn&#8217;t been such a happy one for quite a few of the world&#8217;s big tech names. I shall try and do this chronologically so that I don&#8217;t get accused of favoritism. Or, more likely, unfavoritism.</p>
<h4>14th January &#8211; Google: Don&#8217;t (get caught) be(ing) Evil!</h4>
<p>So 2 weeks into the 2012 and we get the first hit: reports from Kenya accused Google of some very bad business practices. The company involved, <a title="Seem like a nice bunch" href="http://www.mocality.co.ke/" target="_blank">Mocality</a>, who are a business directory for local Kenyan companies, had been getting some strange calls from  some of their customers who had been contacted by Mocality&#8217;s partner and wanting to help out with their website projects. This was strange because Mocality a) Mocality don&#8217;t have a partner, and b) they don&#8217;t make websites, they&#8217;re just a business directory. They managed to trace the calls from the &#8220;partner company&#8221; back to a company in Kenya who said they were Google. I can tell you are smelling the suspiciousness already. &#8220;Hmmmm&#8221; you&#8217;re thinking &#8220;someone is calling themselves google and trying to use another business directory to poach customers&#8221; and you would be thinking the same thing Mocality did. So, in a fit of ingenuity, they set up a stig operation: they set up some false companies on their directory which had phone numbers back at their HQ. When these phones rang, low and behold, it was &#8220;Google&#8221;, saying that they were working with Mocality and trying to sell some web based services! &#8220;Haha!&#8221; said Mocality, &#8220;we&#8217;ve caught you!&#8221;. So they contacted Google and said their was some company impersonating them and trying to poach Mocality customers. Google looked into it and&#8230;. nope, it turns out it <strong><em>was</em></strong> Google&#8217;s Kenyan company GKBO being pretty underhanded.</p>
<div id="attachment_1778" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/google-evil.jpg"><img class="size-medium wp-image-1778" title="google-evil" src="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/google-evil-300x203.jpg" alt="" width="300" height="203" /></a><p class="wp-caption-text">(via gadgetcrave.com)</p></div>
<p>Mocality&#8217;s CEO, Stefan Magdalinski, blogged &#8220;Since October, Google&#8217;s GKBO appears to have been systematically accessing Mocality&#8217;s database and attempting to sell their competing product to our business owners. They have been telling untruths about their relationship with us, and about our business practices, in order to do so. As of January 11th, nearly 30% of our database has apparently been contacted.&#8221;</p>
<p>So, what did Google have to say? Nelson Mattos, their head of Emerging Markets wrote an abject apology &#8220;We were mortified to learn that a team of people working on a Google project improperly used Mocality&#8217;s data and misrepresented our relationship with Mocality to encourage customers to create new websites. We&#8217;ve already unreservedly apologised to Mocality. We&#8217;re still investigating exactly how this happened, and as soon as we have all the facts, we&#8217;ll be taking the appropriate action with the people involved.&#8221;</p>
<p>I don&#8217;t think this story is over yet. I&#8217;ll keep you posted!</p>
<h4>18th January &#8211; Don&#8217;t drop the SOPA!</h4>
<p>Admittedly, this story isn&#8217;t so much about a tech company failure as it is about the US government failing tech companies. So, <a href="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/wikipedia-blackout-imagine.jpg"><img class="alignright size-medium wp-image-1779" title="wikipedia-blackout-imagine" src="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/wikipedia-blackout-imagine-300x166.jpg" alt="" width="300" height="166" /></a>Wednesday the 18th Jan was an international protest day against the Stop Online Piracy Act that the US government was trying to pass into law. I&#8217;m not going to go into exactly how SOPA would work and all its bad points &#8211; you can look that up on wikipedia for yourself &#8211; I&#8217;m going to concentrate on the dramatic blackout day it caused. As a protest against the act anyone visiting <a title="Back to normal" href="http://www.wikipedia.org/" target="_blank">wikipedia</a> would have found and black page telling them it was unavailable as a protest against SOPA. This must have annoyed thousands of students and journalist who were trying to &#8220;research&#8221; their work. Alas, if you went to <a title="Looks like a site form '95, its confusing, its weird but its also AWESOME!" href="http://www.reddit.com/" target="_blank">Reddit</a> you would have got a similar black page. So to with twitpic, <a title="Fun. Like Sonic." href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Mozilla</a> and <a title="Who builds the internet? We do!" href="http://wordpress.org/" target="_blank">WordPress</a>. With <a title="If you don't know the address you don't deserve to be here." href="www.google.co.uk" target="_blank">Google</a> and others their logos were blacked out in protest. All pretty affective stuff. Wikipedia sayd that some 162 million people tried to access their site and failed, all of whom would have read the reason why. Thats a lot of people unhappy with SOPA. And it seemed to work. For now. Every country has their own version which will try and do similar things to stop online piracy. None of them are particularly effective or accuarte. No doubt the US will come back with another, similar bill soon. Lets hope someone explains to them how the internet works, sooner.</p>
<h4>20th January &#8211; Megaupload implode</h4>
<p>SOPA might not have been effective but that didn&#8217;t stop the FBI throwing the toys out of the pam and shutting down <a title="Whipping boy?" href="http://www.megaupload.com/" target="_blank">Megaupload </a>a few days later. They say that the site was being used to share media illegally and so seized the domain. Any visitors going now are greeted with:</p>
<div id="attachment_1775" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/Screen-shot-2012-01-26-at-14.58.30.png"><img class="size-medium wp-image-1775" title="Screen shot 2012-01-26 at 14.58.30" src="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/Screen-shot-2012-01-26-at-14.58.30-300x225.png" alt="" width="300" height="225" /></a><p class="wp-caption-text">The FBI: Subtlety since 1908</p></div>
<p>Megaupload&#8217;s CEO Kim Dotcom (I&#8217;m going to pretend that&#8217;s his real name and he has one of the best cases of nominative determinism EVER!) has been arrested in New Zealand and has not been granted bail. Its expected he&#8217;ll be extradited to the US in a month or two. It&#8217;s a real shame because he had already proposed a great way of providing revenue for artists even from pirated and freely available media. But because that doesn&#8217;t provide the music and film companies with money then they are not interested.</p>
<h4>25th January &#8211; O2 shmo2 (ok, I&#8217;m running out of pun-filled headers)</h4>
<div id="attachment_1780" class="wp-caption alignleft" style="width: 310px"><a href="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/o2-fixes-phone-number-leak.jpg"><img class="size-medium wp-image-1780" title="o2-fixes-phone-number-leak" src="http://www.twenty3design.co.uk/wp-content/uploads/2012/01/o2-fixes-phone-number-leak-300x179.jpg" alt="" width="300" height="179" /></a><p class="wp-caption-text">(via crave.cnet.co.uk)</p></div>
<p>And finally, yesterday was a bad day for the british service provider O2, who had been sending every website you visit your phone number! To be fair, it was only if you visited the site on your mobile and through a non-wifi connection, but its still pretty bad. Apparently the &#8220;mistake&#8221;came about because they had altered some setting somewhere and the info was automatically sent to every webpage between the 16th and 25th Jan. This was all spotted but a rather clever and nice guy called <a title="Nice guy" href="https://twitter.com/#!/lewispeckover" target="_blank">Lewis Peckover</a> who came up with a simple bit of code on a <a title="CLEVER and USEFUL! Give this man a payrise!" href="http://lew.io/headers.php" target="_blank">website</a> that showed you if O2 were sending everyone your mobile number. O2 were quick to respond and have now fixed the problem, although they do admit that some &#8220;preferred partners&#8221; do still get sent your number. Hmmmm&#8230;. And apparently it might not be just O2, there are some reports that Orange have been doing the same thing.</p>
<p>Oh well, lets hope things get better from here. Have a great week!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twenty3design.co.uk/blog/not-such-a-happy-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting page Grandparent in WordPress</title>
		<link>http://www.twenty3design.co.uk/blog/getting-page-grandparent-in-wordpress/</link>
		<comments>http://www.twenty3design.co.uk/blog/getting-page-grandparent-in-wordpress/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:54:07 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.twenty3design.co.uk/?p=926</guid>
		<description><![CDATA[Ok, just a quick wordpress blog incase anyone has ever had this problem and I found solutions a little on the thin side. On a site I&#8217;m making for a client they have various menu levels and in one place they needed to return the links from the second level no matter what level below [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, just a quick wordpress blog incase anyone has ever had this problem and I found solutions a little on the thin side.<span id="more-926"></span></p>
<p>On a site I&#8217;m making for a client they have various menu levels and in one place they needed to return the links from the second level no matter what level below that in the tree you were on.  Basically treating the second level as if it were the top level.  If it <em>was</em> the top level then WordPress has a nice handy function built in for us, but for this there is a bit more coding involved.</p>
<p>Getting your page parent id is fairly simple:</p>
<p><code>if($post-&gt;post_parent) {<br />
$parent_id = $post-&gt;post_parent;<br />
}</code></p>
<p>so to take this a step further and find out if this parent had a parent you need to place the following function in your &#8220;functions.php&#8221; file in your theme:</p>
<p><code>function is_third_level($parent_id) {<br />
global $wpdb;<br />
$grand_parent = $wpdb-&gt;get_var("SELECT post_parent FROM $wpdb-&gt;posts WHERE ID = '".$parent_id."' AND post_type = 'page'");<br />
if ($grand_parent) {<br />
return true;<br />
} else {<br />
return false;<br />
}<br />
}</code></p>
<p>Here we are checking the database for the parent of the ID we&#8217;ve passed in and returning if there is anything, thus letting us know if there is another parent or not. (I&#8217;m just returning true/false, but you could return the ID of the parent if you wanted.)</p>
<p><code>if($post-&gt;post_parent) {<br />
$parent_id = $post-&gt;post_parent;<br />
if (!is_third_level($parent_id)) {<br />
$pages = get_pages("sort_order=asc&amp;sort_column=menu_order&amp;child_of=".$post-&gt;ID);<br />
echo "&lt;h2&gt;".get_the_title($post-&gt;ID)."&lt;/h2&gt;";<br />
} else {<br />
$pages = get_pages("sort_order=asc&amp;sort_column=menu_order&amp;child_of=".$parent_id);<br />
echo "&lt;h2&gt;".get_the_title($parent_id)."&lt;/h2&gt;";<br />
}<br />
}</code></p>
<p>Once I get my response from the database I can then either print the title of the current page, or the one above.</p>
<p>Hope this helps anyone who has been stuck in a similar situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twenty3design.co.uk/blog/getting-page-grandparent-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

