install java SDK:
download jdk-6u18-linux-x64-rpm.bin from

install TOMCAT:
download apache-tomcat-6.0.26.tar.gz from

unpack tar -xvzf

move /apache-tomcat-6.0.26 to decide directory such as /opt/tomcat/

set environment variable:
JAVA_HOME=/usr/java/jdk1.6.0_18 <- path to java sdk

set TOMCAT to run as unix daemon:

tar xvfz jsvc.tar.gz
cd jsvc-src
cp jsvc ..
cd ..

command to run tomcat as daemon:

$CATALINA_HOME/bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \

add user in file $CATALINA_HOME/conf/tomcat-users.xml

download mysql odbc from

install rpm package rpm -Uvh xxx.rpm

insert line to /etc/odbcinst.ini

# Driver from the MyODBC package
# Setup from the unixODBC package
Description = ODBC for MySQL
Driver = /usr/lib64/ <- path to mysql odbc lib
Setup = /usr/lib64/
FileUsage = 1

insert line to /etc/odbc.ini

connector name = MyODBC 5.5 Driver DSN

[connector name]
Description = ODBC for MySQL
Driver = MySQL
SERVER = ip mysql database server
USER = user
PORT = 3306
DATABASE = database name

after using locate_template() to load template with child theme i get error

Warning: Cannot modify header information - headers already sent by (output started at /xxxx/wp-content/themes/bp-default/header.php:3) in /xxxx/wp-includes/pluggable.php on line 868

here a solution:

------------- edit code --------------------
edit the file wp-includes/pluggable.php
in line 863 replace:

if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);

with this:
if( !headers_sent() ).
if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
tatus_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);

not a best solution but it get rid of that error

Hi all :)

I am coding new buddypress badge now, after seeing it on wordpress idea forum.


user can create badge for add in other website or blog to link back to their buddypress profile.

user can select to add own image (from bp) and xprofile data into badge

admin can upload own badge logo for user badge.


have to enable GD Lubrary


create badge tab and fetch xprofile from buddypress.

test to create badge image using GD libray.

this is badge look like after create (you can upload your logo to replace facebook logo)


create badge by fetch xprofile done but have problem with asian language (thai).
no problem in english language.


create badge horizontal (still have asian language problem)

updated - user screen done


buddypress badge done!!!

you can download for testing here download

installation :
upload and activate
change logo in /image/logo.png

== found some bug, if anyone found any please let me know ==


== first version done == (not upload yet)

or temporary host

My first buddypress plugin

This plugin make user can send gifts image to other members in BuddyPress. It use activity stream to keep the gifts sent information.

Sender (buddypress member) can choose a gift from gift box in others member gifts tab and type a message to receiver member.

Receiver member can delete or reply message using activity stream function in own profile.

Administrator can upload delete and edit gifts item in backend admin dashboard

Screen Shot: