Family problems

Two men met at a bus stop and struck up a conversation; one of them kept complaining of his family problems.

Finally, the other man said, “You think, only you have family problems? Listen to my situation.”.

He continued, “A few years ago, I met a young widow with a grown-up daughter. We got married and got myself a step-daughter. Later, my father married my step-daughter. That made my step-daughter, my step-mother. And my father became my step-son-in-law. Also, my wife, the daughter-in-law of my father, became mother-in-law of her father-in-law”.

After a small pause, “Much later the daughter of my wife, my step-mother, had a son. This boy was my half-brother because he was my father’s son. But he was also the son of my wife’s daughter which made him my wife’s grand-son. That made me the grand-father of my half-brother”.

And, “This was nothing until my wife and I had a baby. Now the half-sister of my son, my step-mother, is also his grand-mother. This makes my father, the brother-in-law of my child, whose step-sister is my father’s wife, I am my step-mother’s brother-in-law, my wife is her own child’s aunt, my son is my father’s nephew and I am my OWN GRANDFATHER!”.

He finalized, “And you think, only you have FAMILY PROBLEMS!!!”.

Yet another Wordpress hack to host virtual users

Hey! After searching and, or reading many solutions on hosting virtual user blogs on single, shared Wordpress installation, I have figured out quite a simple and smart hack.

A few of the things, I have been considering are as follows:

  1. Either use a single database with unique $table_prefix or use unique databases for each user.
  2. Users may use unique blognames and, or descriptions, but I prefer same and, or similar blognames and, or descriptions for consistent look and feel.
  3. Users are not allowed to add and, or remove plugins, themes and, or scripts; but they may use and, or activate any of the available ones.
  4. In case a user direly needs something, one may request and, or convince the sysadmin to do so.

I just needed to change the default wp-config.php file, after installing and, or extracting all the Wordpress 2.1.1 (was working fine with version 2.1 also) files in to /usr/share/wordpress directory.

Here follows a modified and default /usr/share/wordpress/wp-config.php file:

<?php
// Get virtual user's personalized wp-config.php, i.e.
// the $HOME/.wordpress/wp-config.php
$parts = explode('/',$_SERVER['SCRIPT_FILENAME']);
require '/'. $parts[1] .'/'. $parts[2]. '/.wordpress/wp-config.php';

// These lines have been taken from wp-config-sample.php
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>

In step 2, I created a few apache userdir symlinks as root for all those users whom I wanted to blog:

# ln -s /usr/share/wordpress /home/user/public_html

In step 3, I needed to create a sub-directory and user specific wp-config.php file from a slightly modified wp-config-sample.php file:

<?php
// ** MySQL settings ** //
define('DB_NAME', 'wordpress');    // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */
?>

Now create a user specific sub-directory and configuration file:

# mkdir /home/user/.wordpress
# cp /usr/share/wordpress/wp-config-sample.php /home/user/.wordpress/wp-config.php

We may edit these user specific configuration files as per requirements.

In the finishing step, I needed to create user specific empty databases, which you may omitt if you want to use single database for your users.

Finally, you yourself may login as admin for your new users and edit and, or tweak a bit Wordpress options for them, except for changing their default admin password, which shall be or has been mailed to them by wordpress; this and all the above steps can auto-magically be performed with a shell script, if you want to do it for hundreds of thousand users.

Furthermore, you may tweak around a bit the /usr/share/wordpress/wp-admin/upgrade-schema.php file too, but you should know what you are doing ;)

No doubt, the Wordpress rocks!

Thank you

After using and patching Hobix for a few years, I was pondering over to various possibilities and, or alternatives of implementing weblog framework including writing one from scratch based on Django or Ruby on Rails, I finally, looking at the ease of use, versatility, maturity, features, themes, plugins and, or standards, decided to use WordPress with a theme K2 for my needs; and hence would like to extend a big thanks to the WordPress development team and the developers of a splendid theme K2.

I, being a systems admin and programmer can easily understand that these things take a lot of time to learn, research, implement and, or maintain. Although achieving a goal for a dedicated and expert team like as WordPress is and, or was not difficult, but I can feel and appraise their sedulousness — how much more difficult it is and, or can be for them to maintain that level.

I wish WordPress and the WordPress Team a great success :)

Thank you, for making such a nice weblog system available to the public in general and specially making it available for free.

Regards,

PS: Have I mentioned K2 theme for WordPress; too deserves a big thanks!

Acknowledgement Department

Here is one of the nicest mails, I ever have received:

I dreamt that I went to Heaven and an angel was showing me around. We walked side-by-side in to a large workroom filled with many angels.

My angel guide stopped in front of the first section and said, “This is the Receiving Section. Here, all petitions to God said in prayers are received.” I looked around in this area, it was terribly busy with so many angels sorting out petitions written on voluminous paper sheets and scraps from people all over the world.

Then we moved down via a long corridor until we reached the second section. The angel then said to me, “This is the Packaging and Delivery Section. Here, the graces and blessings, the people asked for, are processed and delivered to the living persons who asked for them.”

I noticed again how busy it was there also. There were many angels working hard at that station, since so many blessings had been requested and were being packaged for delivery to Earth.

Finally at the farthest end of the long corridor we stopped at the door of a very small apartment. To my great surprise, only one angel was seated there, idly doing nothing. “This is the Acknowledgment Section”, my angel friend quietly admitted to me. He seemed embarrassed. “How is it that? There’s no work going on here?”, I asked.

“So sad …”, the angel sighed, “After people receive the blessings that they asked for, very few send back acknowledgments.” “How does one acknowledge God’s blessings?”, I asked. “Simple,”, the angel answered.
Just say, “Thank you, God.”

“What blessings should they acknowledge?”, I asked.

“If you have food in the refrigerator, clothes on your back, shoes in your feet, a roof over the head and a place to sleep, you are richer than 75% of this world. If you have money in the bank, in your wallet, and spare change in a dish, you are among the top 8% of the world’s wealthy people. And if you are reading this on your own computer, you are part of the top 1% in the world who has that opportunity.”, seemed he has lot more to tell.

Also …, “If you woke up this morning with more health than illness … you are more blessed than the many who will not even survive this day.” and, “If you have never experienced the fear in battle, the loneliness of imprisonment, the agony of torture, or the pangs of starvation … you are ahead of 700 million people in the world.”

He continued, “If you can attend a prayer meeting without the fear of harassment, arrest, torture or death you are envied by, and more blessed than, three billion people in the world.”

… “If you can hold your head up and smile, you are not the norm, you’re unique to all those in doubt and despair.”

Ok, what now? How can I start?

If you can read this message, you just received a double blessing in that someone was thinking of you as very special and you are more blessed than over two billion people in the world who cannot read at all.

Have a good day, count your blessings, and if you want, pass this along to remind everyone else how blessed we all are :)

Attn: Acknowledgement Dept:
Thank You God! Thank you, for giving me the ability to share this message and for giving me so many wonderful people to share it with.




Close
E-mail It