PHP Savant templating engine pagination class and plugins

I don't use Smarty templating engine for my PHP web projects. Why? I hate it. Why? I' familiar with PHP and I don't need to learn another markup language that takes away the power from PHP and imposes restrictions all the way. I'm not saying that without spending (non)quality time using Smarty (and loosing valuable time to learn it's unintuitive syntax).

For my web projects I mostly use PHP Savant customized to fulfill needs of the project at hand. What is PHP Savant? It's authors say that PHP Savant is a powerful but lightweight object-oriented template system for PHP. Savant does not compile your templates into PHP like Smarty, instead, it uses PHP itself as its template language. With PHP Savant you can write your page templates in pure PHP and you don't need to learn a new markup system. PHP Savant is great for developers because it is "complex" enough to be extremely useful, but at the same time simple enough to be easily modified without any special knowledge.

SavantPaginate

When it comes to PHP pagination, things can get quite messy. Pagination without templating engine is a nightmare and that's something to avoid at all costs. Even when you're using templating engine like PHP Savant things can get quite complicated without encapsulation of pagination logic in some kind of PHP class. Recently I made PHP Savant pagination class together with PHP Savant plugins for pagination, all for one of my recent projects for college. Today I'm my bringing PHP Savant pagination class and PHP Savant pagination plugins to you, all in a hope that you'll find it useful in your own web projects.

Instructions and download

You'll find instructions and download links by clicking on "SavantPaginate" at the top of TechyTalk.info or by clicking on the following link:

http://www.techytalk.info/other-projects/savantpaginate/

Ubuntu Netbeans and LAMP server with Xdebug as non-root user

In this article I'll show you how to setup Linux Apache Mysql PHP (LAMP) web development environment on Ubuntu Linux with your web site files in your home directory. This way you can easily develop for web as non-root user. If you are trying to install Linux Apache Mysql PHP on Windows, I'll point you to one of my previous articles where I have explained just that:

Apache, MySQL, PHP server on Windows

My goals for this session are to install Apache, MySQL and PHP with Xdebug module for PHP development debugging. We will setup Xdebug and use it with Netbeans, but once Xdebug is properly installed, you can debug your applications with any other application like Eclipse. The most important thing for a web developer or web programmer is to be able to easily modify his web development files without becoming root for everything he is working on. I will show you how to instruct Apache to make virtual host in your home directory. At the end of it all I will install Netbeans and create sample project to work with our new development environment. So lets get started...

Continue reading

Ubuntu latest Wacom tablet driver PPA

Wacom Intuos3 A5I use tablet instead of mouse. Why? It feels more natural when compared to mouse especially after you get used to it. And freehand drawing in Gimp becomes much easier and gives better results when you replace you mouse with tablet device. The only tablet manufacturer with good Linux support (provided by the community) is Wacom. Linux Wacom driver consists of kernel module and Xorg driver. Latest Wacom kernel module and Wacom Xorg driver can be found at Linux Wacom project Sourceforge site. It is very important for me to have my tablet in top shape on my Linux PCs so I often grab latest driver from projects Git repository and go trough process of compiling it. You might have some brand new Wacom tablet without support in your current Ubuntu distribution so you should do the same. Problem is that Git repository can sometimes be in semiusefull state because, after all it is the place where development is taking place.

Continue reading

The mystery of Ubuntu Gnome missing panel applet

Have you ever installed application on your Linux box to discover that its Gnome panel applet is missing from "Add to panel" dialog. Even worse if you application is Gnome panel applet. On my Ubuntu box this usually happens when i install something from the source. What went wrong you might ask? Many things I must say. But there is one thing you should check first. Here it goes...

Continue reading

Change Ubuntu / Debian GDM login screen theme/wallpaper

Notice: Tested for Ubuntu releases up to Ubuntu 10.10 (Maverick Meerkat)

Every Linux distribution now days sets its default theme and wallpaper. That theme and wallpaper is usually login screen theme and wallpaper. What if you don't like it? You can change theme and wallpaper for your user account but login screen theme stays the same. Lets do something about it...

This is the plan. In a way GDM (Gnome Display Manager) is like every other user. It can have theme, wallpaper and programs to be run when it starts. Why not adjusting Gnome appearance properties (gnome-appearance-properties) window to start at login screen? Then we can adjust things like theme, fonts, wallpaper and everything Gnome appearance properties allows us to do. So first step is to enter this at your terminal (following code is single command):

sudo ln -s /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

Next step is to logout. Gnome appearance properties window will start together with GDM login screen and you can adjust everything as you like. The last step is to undo what we have done in the last step. So after next login enter this at your terminal to stop Gnome appearance properties window form showing its face every time you're at GDM login screen:

sudo rm /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

Next time you need to change your login screen appearance you repeat this process. That's it. No more steps.