b2++ updates

Several updates should be mentioned:

  1. When I introduce new templates (say for the blogroll, or the new archives format) I’ll make sure that template exists in the user’s template directory. If it doesn’t I copy it in from the default template
  2. Redirection is now more like a normal site. Instead of redirecting to blog/index.php you can load “blog/” or if you access “blog” then it’ll redirect you to “blog/” like a normal webserver would. Try /xeer to see for yourself.
  3. Mike Little has a new version of b2links coming out so I’ll try an integrate that when I can.
  4. Tim and I are wracking our brains trying to come up with a new name for b2++, one that isn’t quite so awkward. He thought of “Diolog” (Dio is Greek for 2, as in b2..), I thought of “BioDio” (Biography 2..), or Biolog. Suggestions welcome please! Leave a comment here if you have any ideas!

I want to put this code on sourceforge and make the development of it more accessible. I’d like to have a new name before I put it online though.
I need help with this project, there’s plenty to do. Writing docs, designing new templates/importing existing ones, writing plugins, rewriting b2 basically. Please leave a comment if you can help..

b2++ blurb

I added some “What is b2++?” blurb to the front page. Is there anything missing? What should I change to make it better? I’m targetting users and developers here (eh? yeah, that’s hard!), but I fear I’ve probably gone and confused any potential user!

Quicktime to Divx Conversion.

mencoder -ovc divx4 -oac mp3lame -noskip detect_640_dl.mov -o detect_640_dl.avi

Great! My machine doesn’t play Quicktime movies very well – it’s under powered. It does play Divx files fine though.
The above command will convert a Quicktime file into a Divx file. Not sure yet how the filesize of the new avi will compare to the .mov file. There are options to set the bit rate and other Divx parameters so it’ll take some experimentation to get right if past experience with Windows encoders is anything to go by.
Update! Audio sync is way off. This pagepage has some more info that might come in handy for further experimentation.

Referers in b2++

I’ve integrated part of the Nathan’s referer code into b2++. It’s in the form of a prefunction as it creates a global referers tag you can put into your site templates.
Currently it creates a different tag if you’re viewing a single post or a whole blog/category. This allows the template designer to use the postreferers tag when listing referers to a single post, or use refererlinks to list the site referers list. Add this code to your index.tpl to enable it:

{if $refererlinks != “”}
<blockquote>
Referers:
<ol>
{foreach from=$refererlinks item=link}
<li> <a href=”{$link.referingURL}”>{$link.baseDomain}</a> ({$link.visitTimes})
{/foreach}
</ol>
</blockquote>
{/if}

Flavour it to suit your own blog design. Substitute $postreferers for $refererlinks and put the same code into post.tpl to see single post refererers. The final b2++ 0.6 will have this in place, and all you’ll need to do is update your templates from the Template Chooser.

Update!
Because of the caching on this site many referers were lost, I changed the referer plugin into a Smarty insert plugin.
Insert functions are executed every time a page is loaded and because of the way they operate, I’ve had to hard-code the html it outputs for the time being.
Anyway, ignore the instructions above. If you want to record and display referers on your blog on this site, then add the following code to index.tpl (anywhere will do, but make sure there’s enough space for it!)

{insert name=”getreferer” mode=”index”}

Add the following to post.tpl if you want to show referers to individual posts too:

{insert name=”getreferer” mode=”post”}

There’s some problem with it as is though, sometimes the insert function doesn’t execute. I’ll have a look at why tomorrow.

Update 2
I still don’t know why insert functions didn’t work, that’s something I’ll have to bring up on the Smarty mailing list tomorrow. I reverted to recording every referer on each request, but the list of referers for any page is only updated when the page cache is updated.

Linux to Symbian File Transfer – HOWTO

I finally got to see my phone’s filesystem from Linux this morning! I used p3nfs to connect my Nokia 7650 and Red Hat 9 Linux box. Here’s how.

  • Login to your Linux box as root.
  • Make sure you have the following rpms installed: bluez-libs-devel, bluez-libs, bluez-utils. They’re available from your local apt-rpm repository (just apt-get install them!) or from http://bluez.sf.net
  • Copy the following lines to your /etc/modules.conf

    # bluetooth stuff
    alias net-pf-31 bluez
    alias bt-proto-0 l2cap
    alias bt-proto-2 sco
    alias bt-proto-3 rfcomm

  • Start Bluetooth services: /etc/init.d/bluetooth start
  • Create the bluetooth device if it doesn’t exist: mknod /dev/rfcomm0 c 216 0
  • Create a directory for the mobile to be mounted on: mkdir /mnt/psion
  • Download p3nfs from the site above. Copy the nfsapp for your phone to your phone (you’ll have to mail it to your phone, wap, or bluetooth in Windows.)
  • p3nfsd doesn’t compile on Red Hat 9, but it’s simple to fix that. cd into the nfsd directory, edit “mp_mount.c” and remove any mention of extern int errno from it and add #include <errno.h> at the top of the file. Do the same in “mp_xmit.c” and compile using make clean;make
  • Follow the instructions in README.bluetooth.linux (find the BDADDR, bind to the device, and start the nfs app and servers.
  • cd into /mnt/psion and look around your phone!

This is in fact more useful than the Windows tools I have. I couldn’t send images from my phone to my desktop software, and there’s quite a few of them. Using this, I simply went into /mnt/psion/C:/Nokia/Images/ and “mv”ed the files onto my PC!
There’s an “Installs” directory there too so I presume that’s where the .sis and .jar files go to install applications. Will test later. /me’s happy!
This howto wouldn’t have been possible without the invaluable page Tom wrote about his own experiences. Thanks! And of course Google helped me compile p3nfsd!

$2 trillion fine for Microsoft security snafu?

Doubtful it’ll happen..

Microsoft’s latest security lapse with its Passport information service could trigger a $2.2 trillion fine on the company courtesy of the US government.

Microsoft on Thursday admitted that a flaw in the password reset tool of its Passport service could compromise the information stored on all 200 million users. It scampered to post a fix and is looking into potential exploits, but the damage to Microsoft may already have been done.