I should be able to upload a new version of my modified b2 tomorrow sometime. The tarball is ready for uploading, but it needs just a bit more testing.
This one has all the updates seen on this site so it’ll be well worth a look!
Category Archives: b2
Nice looking URLs in b2, part 2
Not ugly URLs, like this one, are now working here. It took quite a bit of hacking and use of mod_rewrite but it appears to be ok now.
The number of mod_rewrite rules in the .htaccess file has gone up, mostly to avoid the problem of css styling disappearing. This line takes care of it:
RewriteRule ^(.*)archives(.*)/templates/(.*) /users/$1/templates/$3 [L]
Nice looking URLs in b2
This is next on my TODO list. I’ll have to seperate some code from redirect.php to share with the “archives” file so it may not be very easy.
How to Log In with Safari ? the Solution
Mark Twomey already mentioned this to me, but here’s a solution I have now implemented so Safari users can login here. Adding “/” to the setcookie() commands is a security risk however as other blogs will have access to your login credentials. Unless you can modify the code on the server it’s impossible to take advantage of that however, another advantage of using Smarty!
b2 Hacks
I added Calendar Plus by Alex King to the site. Simply add {$calendar} to your blog template, and see the b2 readme for info on styling it.
BlogMIDlet
Blog updates
Couple of b2 updates today.
- Enabled image uploads.
- Fixed mod_rewrite so that css and images are delivered directly. Makes them more cacheable.
Rev Jim on b2/Smarty
Someone noticed our work here! Thank you Rev. Jim for the review!
Right now the code is ugly, I simply strapped Smarty on top of b2 in about a week of coding. My initial intention was to make my changes as non-intrusive as possible but that’s not really possible. Michel made a really good job of seperating a large portion of the PHP code from the templates and that made my job so much easier.
I hadn’t thought of the ugly url issue much, but that can be solved reasonably easily through mod_rewrite and/or php.
Making the templates more flexible should be easy too. I was originally going to do so, but I’m wary creating new files on the server so I just listed the ones that could be edited instead. Another requested feature was to go back to the default template, or maybe even offer multiple templates! A version-controlled templating system appeals to the developer in me too!
There’s a few major things to do:
- Make URLs nicer.
- Reintroduce “Team” logins again, and make it a configurable option in the options web page. I need to document the difference between Team logins and creating a new blog. That will confuse people.
- More flexible template system.
- Work out how to handle image uploads nicely. That’ll probably come through using a username/images/ folder or something.
- Finish integrating Smarty into b2.
Cork LUG – b2 and Smarty mod
I finally released the source of this blog. There are always so many small things to do when source code is released. Actually creating the application is simple. Afterwards, you have to write documentation, create a web page or update one, create and upload a tarball, the list goes on.
If there’s bugs, so be it. I’ll get around to fixing those when I can, but right now it’s good enough!
b2 and Smarty source release
I’m busy working away at the first release of the source running this site. As you probably know it’s based on b2 modified to use the Smarty template system.
Right now, the install.sh script works nicely, it copies the files into the destination dir, changes permissions on some files and tells you what url to load to finish installation. The only thing missing now is a server capable of running PHP scripts!
I’m doing an apt-get upgrade and it’s sucking down 23MB of rpms from heanet, and over dialup that takes a while. Should have php support back afterwards though!