Social networking with PHPizabi
November 29th, 2007

All of us nowadays visit and participate in social sites and networks. Practically a social network is a web site where users take action and not just read content. Digg.com and Facebook are perfect examples of such sites.
PHPizabi is an open-source script written in PHP (like the name shows) which is aimed to help developers create their own social site in fiew steps. As most of web apps (like WordPress), PHPizabi requires:
PHP 4.2.x or above
MySQL 3.23.x or above
Apache 1.13.19 or above OR IIS 5.1 or above
GD2 (Image Processor)
PHPizabi is built with security in mind: there are three administrative security layers and internal structure management, coupled with bruteforce protection. The app seems to be fast (though I have not tested it under heavy load). Modules (add ons) are supported, so developers can expand functionality and features with few clicks.
The end user experience seems to be complete, compared to famous social networks: customizable profiles, internal message sending (PMs), online-offline status, friend invitations, private photo gallery, smilies, comments and all the cool stuff used around. You can see a complete list of the features in the official PHPizabi web site. A demo installation can be found here.
In general PHPizabi seems to be a usefull platform for building social sites and is supported by an ongrowing community. If anyone uses PHPizabi and has tested it under heavy load, feel free to leave a comment and share your experience with us
!
Customizing Simpla theme
November 20th, 2007

As you may have noticed, I have changed the Typpz Blog theme. Now I use Simpla theme. I choosed it because its light, clean with pal colors and meets my needs. The drawback of this theme is that it does not support sidebar widgets which means that it does not take advantage of WordPress 2.3 or older versions with the widget plugin installed. Although it is very easy to make it support widgets (widgetize it) and use it as every up-to-date WordPress theme. Lets see how (if you dont like the manual way you can download Simpla Theme widgetized at the end of this post).

Widgetizing the sidebar
Open the sidebar.php file located in simpla theme folder with you favorite editor on in WordPress admin panel, delete everything it has and paste the following code:
<div id="sidebar">
<ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<li id="pages">
<h2>Pages</h2>
<ul>
<li><a href="<?php echo get_settings('home'); ?>/">Home</a></li>
<?php wp_list_pages('title_li='); ?>
</ul>
</li>
<li id="categories">
<h2>Categories</h2>
<ul>
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
</li>
<li id="links">
<ul>
<?php get_links_list(); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
Save sidebar.php and then create a new file, name it functions.php and paste the following code (be carefull, functions.php should contain only the code below):
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>
Your theme is now widgetized which means that in your WordPress admin panel, in presentation tab you can drag & drop widgets in your sidebar.
Widgetizing the sidebar caused a CSS probem with the doted lines used in the sidebar sections (there is an extra nested <ul>). You can easily fix it by modifying the following code in style.css file just after the #sidebar rules: Find the lines
#sidebar ul li{
border-bottom:1px dotted #ddd;
margin-bottom:0.3em;
padding:0.3em;
}
and change them to:
#sidebar ul li{
margin-bottom:0.3em;
padding:0.3em;
}
#sidebar ul ul li{
border-bottom:1px dotted #ddd;
}
Your theme is now ready to run and use every of the WordPress 2.3 features. I do not like the page titles used by Simpla (Typpz Blog>>Blog Archives>>Post Name). I want just the post name. To do that you have to open the header.php file, find the line with the following code:
<title>
<?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> ยป Blog Archive <?php } ?> <?php wp_title(); ?>
</title>
and change it into:
<title><?php if(is_home()) {
echo bloginfo('name'); } else { wp_title(''); } ?></title>
Adding a Header Image
To add a header image (like Typpz.com blog here) instead of the blog title, open header.php file, find the <div=header> section and change the code in it to:
<h1><a href="<?php echo get_settings('home'); ?>/"><img src="URL" alt="logo" border="0" /></a></h1>
<p class="description"><?php bloginfo('description'); ?></p>
where URL put the location of your header image!
Other fixes and addons
If you write long posts you probably need a “goto top” button at the end of your pages. Open index.php file, find the line <?php endif; ?> and paste the following just below that line:
<p align="right">
<a href="<?php the_permalink(); ?>/#">TOP</a>
</p>
As I have posted you can display the WordPress tags under each post.
Download simpla theme widgetized! Simpla is licensed under a Creative Commons Attribution-ShareAlike License, which means that you can use Simpla widgetized for free and just give a link back to Phu and me
!
After you download the theme, you’ll need to extract it to your /wp-content/themes/ directory. Then log into WP and activate the theme from within your presentation panel. Both Simpla and Simpla Widgetized use valid XHTML and CSS!
Download Simpla Widgetized Theme
Tags: blog, css, internet, php, simpla, theme, Web 2.0, web design, wordpress, wordpress theme, wwwHow to choose a web host
September 22nd, 2007

There are thousands of companies around the world that sell hosting services. Most of them charge per month, but price should not be your only criteria when choosing a host for your pages. You should keep in mind the followings and then find the service that provides the quality you look for at the most affordable cost.
- Technical support is one the most important issues when choosing a web host. Do they offer support by phone, email? And if so, how long will it take to get back to you?
- How much disk space is offered to you? Remember that pages uses a very little amount of space, but multimedia files (pictures, videos, sound clips) use much larger quantities.
- Do they offer domain registration and how much will it cost.
- Do their servers support CGI-scripts, PHP, MySQL, PostgreSQL, Front Page extensions, SSH connection and Telnet?
- How fast is their connection to the Internet and do they have multiple connections in case of a problem or damage?
- If you would like to run Java/Java EE applications on your site or build a site with JSP, your host must support Java apps and run a Jakarta/Tomcat, Jboss, Glassfish or other Java server.
- Do they offer a stastistics service to let you have a look on your site traffic and hit?
- How much bandwitch do they offer per month? For example 2GB bandwitch for a site full of videos and images is too low.
- Do they offer one-click installation for commonly used free web apps (like Drupal and WordPress)?
- What site management application is used (for example Plesk or Cpanel)?
Fixed some major issues
April 26th, 2007


We made some changes to our database, as our store needed some input fields for orders (for customers to write their name, email, adress and anything they want to appear on the cards they orders). The changes include some new MySQL tables and some php scipting code to support the tables. Our store now is fully functional and in a few days we will be able to accept orders. Another change we made is to out blog. We modified the .htaccess file, so wordpress can build nice pemalinks for the posts. WordPress is based on php and the permalinks it gives are like this: http://blog.typpz.com/?p=7. With the Apache mod_rewrite modification in the .htaccess file of wordpress, our permalinks now are nicier and look like this: http://blog.typpz.com/year/month/day/post-title which are more user friendly and more robot friendly (for better crawling by search engines). To modify your .htaccess file you should give it a chmod 777 (write and execute permission, so wordpress can change it) with your ftp client (like filezilla) and then change the permalink style via wordpress admin. Do not forget to change the chmod for .htaccess file to 644 for better security after the modificitation.
Tags: database, MySQL, php, typpz






