While building a wordpress theme that has multilingual support, I needed to know what the current language was for fixing some static parts of my template.
After searching a bit on the WPML site, I found a code example where you are shown howto create your own language selector menu:
http://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/
I then wrote this function to get [...]
WPML, what is the current language?
31 May 2010 2 Comments
(php) php-mvc-base project released
12 Apr 2010 1 Comment
Whenever I create a new PHP project I use a certain base structure.
This structure allows me to have pretty URLs and have a nice way of configuring the database connections. Furthermore this structure also allows me to use a form of plugins in my system.
(php) flash-message plugin
9 Feb 2010 Comments Off
For a long time I’ve wanted a way to send messages from my controller to my view, when posting data. The message could be “Your update went well” or some error.
(php) Paginate component
17 Jan 2010 Comments Off
After removing CakePHP from my site, I really missed having pagination on it. So I created a small PHP component I’ve called Paginate and I’ve released it over on github: http://github.com/jimmiw/php-paginate.
It’s designed to be easy to use (only 3 lines of code!), and the output should be easy to style.
I hope you enjoy it
More features
24 Nov 2008 Comments Off
Alrighty then… I finally got around to add some more features to my webpage, and the first thing I added was the comments section! it’s finally up and running, all you need, is an OpenID and you can login and type a comment to the various posts. I also updated my CakePHP backend to version 1.2rc3, just so i’d have all new thingies.
What else… ah yes… I’ve added a syntax highlighter to the code sections as well. It works rather well, but increases the load time on the page slightly… I’ve also included pagenation on the blog! Was actually kinda fast to implement, just a few lines of Cake code and wupti.
CakePHP and the (in)famous Auth component
4 Nov 2008 Comments Off
After struggling for a while with CakePHP (specifically 1.2 rc3, but also in general) and the Auth Component, I finally found out how it works. While working freelance on a site for a customer, I had to make some form of Authentication in order to login the users of the system etc. What better place to start than CakePHP’s own documentation: http://book.cakephp.org/view/172/Authentication…
This didn’t really help me on my quest
New homepage framework!
8 Apr 2008 Comments Off
After a few discussions with the frontend group at work about writing everything yourself, they suggested that I looked at CakePHP. It looks a lot like Ruby On Rails and has most of the features it has, just for php :)
CakePHP is a Rapid development framework, written in php for php. It has a lot of cool features, such as Active Directory objects for databases, “search friendly urls” (almost by default), a good MVC pattern and much more!