Wednesday, May 28, 2008

Integrate PHPBB login to your website

PHPBB is one of most widely used forum board system. Build on strength platform of PHP, PHPBB free yet stable and easy to configure. We can aware if a system using PHPBB as its forum board system, by its unique layout and themes.

For some website that doesn't have own member management system can use PHPBB for their user / login based system. PHPBB provide a solid member management system, sign up interface, also nice member profile interface.

For sign up, easiest way is using existing PHPBB signup form. More customization is required to match your website theme. Simply edit profile_add_body.tpl template under your phpbb/template/templatename/ folder. It's all in html + smarty code.

Next is to link a login form (on your main website) to phpbb login verification system. You need to create a form contain 3 main object : user name, password, and Login button

<form name="frmPhpBBLogin" action="your_phpbb_login.php" method="post">

User name : <input name="username" type="text">

Password : <input name="'password'" type="password">

<input value="'Login'" type="'submit'">


To get login info which stored in PHPBB session, simply get it from COOKIE data by
PHP Code snippet
$session_data = isset($_COOKIE['phpbb2_data'])?unserialize(stripslashes($_COOKIE['phpbb2_data'])) : array();
if (isset($session_data['userid'])) GetPHPBBMemberDetail($session_data['userid'])
function GetPHPBBMemberDetail($id) {
$myQR = "SELECT * FROM `phpbbdb`.`phpbbprefix_users` WHERE `user_id`='$id'";
$myRE = mysql_query($myQR);
return mysql_fetch_assoc($myRE);

Note :
- Actual cookie variable name may vary, you can do a var_dump($_COOKIE) to find out.
- Change `phpbbdb` to your actual PHPBB database name
- Chnage `phpbbprefix_` to actual PHPBB table naming prefix
You must have mysql access to get all the data.

To log out simply hit PHPBB's logout url, normally at login.php?logout=true

Saturday, May 10, 2008

Firefox 2 on Ubuntu Hardy Heron

Ubuntu 8.04 Hardy Heron just rolled out from it's beta stage. For those ubuntu-lover, we just can't wait what are new features on this new release, especially that can be seen directly from its fancy desktop.

Firefox is one of among list. Even Firefox 3 offer lot of new browsing features, but unfortunately, I don't like beta softwares. Even it proved stable, but one thing is sure, it slow down my laptop, compare to previous version. Maybe you have same opinion with me.
Also, lot of my favorite plugin does not work with Firefox 3, including Foxmarks.

To roll back using Firefox 2 as Ubuntu Hardy default browser, simply uninstall firefox 3, get firefox 2 and change some shortcut links. Open a terminal session

$ sudo aptitute remove firefox
$ sudo aptitute remove firefox-3
$ sudo apt-get install firefox-2

Next is change default command firefox shell script to firefox-2, by type :
$ cd /usr/bin
$ sudo ln -s firefox-2 firefox

As bonus here is an article for you who love Internet Explorer, and wish to run it on your Ubuntu. Installing Wine, Internet Explorer and Visio 2003

Just like Asus tagline, now you can enjoy rock-solid heart-touching Firefox 2 :) and alternative IE on your Ubuntu.

Sunday, May 4, 2008

Use firefox to open wap site

Firefox is now about to take over the position of most popular browser. Due to lack of customization and security reason, now more and more user are turning using Firefox rather than other browser.

For wap developer like me, everyday involve with hundreds of trial-and-fail page load using all available browser, I found it's very useful for you all to have this plugin. WMLBrowser is essential for firefox to determine the content type text/vnd.wap.wml file.

To install, simply go to Tools -> Add Ons. On extensions tab, click "Get Extensions". Your firefox will open a new tab. Just type wml in the search box. Or you can go to WMLBrowser direct link. Once installed now you can open any WML site as it display on phone browser. All plugins above work for Firefox 1.5, Firefox 2 and Firefox 3 both on Windows or Linux.

Another utility that complementary to this plugin is User Agent Switcher, to let you pretend that you really a mobile handset to wap server. This trick very useful to mask yahoo and gmail site to serve us as mobile user, as well as to download contents that should serve mobile user only.

We are plotted what media says

Information is our daily bread. Most people start their day by consuming information, beside of breakfast. A newspaper on hand, or simply turn on a television news channel. This is global world. Any event happened arround the globe, can be broadcast in seconds. Internet is playing main role, on serving more detail topic of an event.

Media giants, as well as strong government, with intention or not, to deliver information to support their role. Politic issue, economy benefit and personal fame are some of the reason media push biased message. Some country, using local media to keep people's loyalty and maintain government..

That's why, to maintain your personal opinion, it's good to have information on various source. Example, to be clear on what happened in Tibet, we need to heard from China's version as well as Tibetan media. As you read western's capitalism news, it's good to have a second opinion on what socialism said.

But not all people can have more than a version on what's happening. Indonesia, in era of information liberalism, even local election may lead to a social unrest. Sometime, they don't exactly know what they're fighting for. Protester was paid to run to road. That's why internet could be a media to deliver message on different perspective, and sometime not in positive way also.

So keep your perspective, be a neutral person, broaden your view, get information from any sources. Jangan jadi katak dalam tempurung!