Author Archives: timhaak - Page 2

Google Android to get tethering and wifi hotspot

In an amazing confidence my friend was telling me how he had added wifi hotspot to his unlocked and rooted nexus one running a custom firmware.

I’ve considered unlocking mine and doing the same but always have shied away from it as have killed to many phones and accessories trying things like this. Though it would be really cool to be able to use my phone as a hotspot to provide internet so was once again tempted. Well I just found out on the same day that I don’t have to.  In the next Android update Froyo will be getting tethering and the one that has already made my Iphone favoring friend jealous wifi hotspot capabilities.

If you include the other features and the massive speed improvements I’m getting more and more excited for this release :) .

If you can’t wait go and checkout http://code.google.com/p/android-wifi-tether/ on how to add this right now. Though you will have to unlock your phone.

See http://goo.gl/XJrh the article for more details.

WordPress, Podcasts and Enclosures

WordPressOK we’ve had lots of fun with enclosures and our podcasts at http://ltg.letstalknetwork.tv recently. If you don’t know what enclosures are they basically are elements in the rss feeds for podcasts hold the files to download.

The first problem we had was that incorrect files had been automatically added. This became a problem with Microsoft Zune players that did not go through all the links to find the one that they could not play. Then second problem was adding in the video file for out new video podcast.

To fix the first problem you will need to get into you database and search the postmeta for entries where the meta_key is enclosure. Find the offending ones and delete them. See the example SQL bellow for and example

SELECT  *
FROM  `wp_postmeta`
WHERE  `meta_key`  =  'enclosure'

OK now how to add in missing enclosures. This is a bit more complicated you will need to find out what your post ID, the file size in bytes, the mime type and the url where the file is stored.  For me the the mime type was video/mp4, file size was 241821391, the ID was 203 and the link is http://www.letstalkgeek.co.za/vpodcast/LTG_E003.m4v. Then I used the following SQL to add it to the database.

INSERT  INTO  `wordpress`.`wp_postmeta` (
`meta_id` ,
`post_id` ,
`meta_key` ,
`meta_value`
)
VALUES (
NULL ,  '203',  'enclosure',  'http://www.letstalkgeek.co.za/vpodcast/LTG_E003.m4v
241821391
video/mp4'
);

And if you look here you can see the file has been added http://ltg.letstalknetwork.tv/category/podcastvideo/feed/

Updating Ubuntu Lucid ATI driver to 10.4 driver

Ok just finished upgrading my ATI driver to 10.4 and thought I should jot it down before I forget and in case someone else is trying to work out how.

Step 1: Grab the update file from http://support.amd.com/us/gpudownload/Pages/index.aspx.

Step 2: From the directory that the file is in run the command bellow. This should create a couple .deb files.

./ati-driver-installer-10-4-x86.x86_64.run --buildpkg Ubuntu/lucid

Step 3: Your supposed to just be able to now run “sudo dpkg -i *.deb”. Though in my case I had to uninstall the previously installed drivers. If you get errors during your install you may need to do this. Just go to synaptic and search for fglrx. I think its the modaliases package but am not 100% sure.

Done :)

Some real HTML5 games

Heres a better example of HTML5 games that are supposed to work on the IPhone as well http://www.kesiev.com/akihabara/

First test of using just HTML5 to build a game for my nexus one :)

http://game.letstalkgeek.net/timhaak/test01/index.htm
What I was basically testing here was getting basic movement and user input. As well as testing to see if I could get HTML5 working on my nexus one.

Which it does :) .

Quiet a simple system you use the 2 buttons to control left and right speed of square. Each click increases the speed in a direction.

Not sure how it will render on other phones. My guess would be badly. That I’m going to leave to the future ititrations of the game.

Also the simple 2 button input is very clunky. My idea for the next version is to create a grades input so you can just click on point to get the speed left or right that you need.

I did manage to solve the scaling problem(double clicking no longer scales in and out) using a meta tag. You can look at the source code to see the details.

MediaWiki for Google Analytics

Ok for this simply follow the directions on this page http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration

MediaWiki for Google Webmaster Tools

Google Web Master ToolsFirst patch “/var/vhosts/mediawiki/maintenance/generateSitemap.php” the with the changes from http://www.mediawiki.org/wiki/Manual_talk:GenerateSitemap.php.

This will put the site url into the sitemap.xml file which is need by google.

Once this has been done you can do a trial run by running.

/var/lib/mediawiki/maintenance/generateSitemap.php --server=<server_name>

This should generate your site maps. Now to automate it.
Add the following to your crontab:

* 0 * * * cd /var/lib/mediawiki/;/usr/bin/php /var/lib/mediawiki/maintenance/generateSitemap.php --server=http://wiki.letstalknetwork.tv

You can now add the sitemap to Google Webmaster Tools

Done

Add PhpBB to Google Webmaster Tools

Google Web Master ToolsTo start you will need to install Automod. This is fairly straight forward. Unzip the compressed file that you’ve downloaded. Then copy the contents of the upload directory into the root directory of phpBB.

You’ll need this installed to install modifications to your PhpBB. Once you have this installed you will then need to install Sitemap FX. This seems to be a bit more complicated than it should be. Once you’ve installed it to automod it then gives you a zip file to download. You then upload this back to your server and unzip it. Once you’ve done this copy the files from the “files/” directory into the root of your phpbb directory. You then need to call /install_sitemap_fx.php from a web browser to complete the install. Once this has been done you should be able to get your site map from /sitemap.php. In my case at first it didn’t work for a couple of minutes. You may also need to run “chmod 777 sitemap” then flush your cache. Then open  /sitemap.php.

Once you are able to generate your file add it to https://www.google.com/webmasters.

Done

Adding Google Analytics for PhpBB

This should cover the steps to add Google Analytics to your PhpBB. I’m using the new analytics code that goes into the header instead of the footer as its supposed to catch more. ie The people leave your site before the entire page loads.

First goto your PhpBB directory and edit the following file (In the example I’m editing the prosilver style you will need to do it for all styles your using).

styles/prosilver/template/overall_header.html

Search for </head> and add the following just about it. Replacing UA-XXXXX-X with your code.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

Repeat for all the styles that you have active.

Once you have finished goto the General tab in your ADM setting and Run Purge Cache otherwise Google won’t be able to pick up the changes till your cache expires.

Now in Google Analytics settings hit Edit for the PhpBB3 domain.  From there click on check status. It should tell you that “Analytics has been successfully installed and data is being gathered now” and its waiting for data.

WaitingForData

OK that should be it for Analytics for PhpBB3

Google Analytics and Google Webmaster Tools

The next couple of entries are going to cover setting up Google Analytics and Google Webmaster Tools. The main reason for this is that I’m busy doing it :) and thought it would be good to jot it down incase someone else or myself needs it at a later stage.

First of all why would you want to have Google Analytics and Google Webmaster  tools. Well in a nutshell they firstly allow search engines to find and index your site better. This is benificial only if you are wanting people to find your site :) . Secondly Google Analytics is a nice way to see stats of people going to your site with out having to do to much work.

There order is going to follow more or less how I implemented this stuff. I’ll also cover anything else I may have installed.