User:Zhenya

= Identity = Name: Yevhenii Vlasenko University: Chernihiv Technological University (Ukraine) Project title: "Extension: SocialProfile - UserStatus feature" Contact information:
 * IRC: Zheee
 * GTalk/GMail: benjamin22.987[at]gmail.com
 * Skype: Zhenya_987
 * Facebook: www.facebook.com/profile.php?id=1342047659

Project summary
The aim of the project is to create a UserStatus module for the SocialProfile extension at MediaWiki. This module will allow MediaWiki users to write short "status updates" on user profile pages. It will allow Wiki users to share their thoughts, ideas or just the facts of their life. The project will have a history of UserStatuses and will allow everyone of just the user itself (depending on the settings) to look through it. = How it`s going = Today (06.10.2011) I am starting a kind of the development diary, to show how my work is going, my results, and the problems/questions that I meet in the development of the UserStatus feature. Hope that this diary will help people who are going participate in GSoC.

06.10.2011 Friday
Because of the exams I had a lack of time, but anyway some things I have already done.

The SQL script for the database of Mediawiki:

CREATE TABLE /*_*/`user_status` ( `us_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,  `us_user_id` int(11) NOT NULL default '0',  `us_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,  `us_status` varchar(140) NOT NULL default '' )/*$wgDBTableOptions*/;

The JavaScript that implements the interface of UserStatus (ofc it will be reworked, but when the time will come for 'History' development): function toEditMode(elem) { document.getElementById(elem).innerHTML =  ' Save Cancel'; } function toShowMode(elem,status) { document.getElementById(elem).innerHTML = status + 'Edit'; } Also i started to write the main class of the UserStatus: class UserStatus { /*    * #@+     * @private */

var $user_id;  # Text form (spaces not underscores) of the main part var $user_name;  # Text form (spaces not underscores) of the main part

/**    * Constructor * @private */   /* private */

function __construct { }

/*    * Fuction that imlements the request for the status to the db     * */   public function getStatus($u_id) { $dbr = wfGetDB(DB_SLAVE); $sql = "SELECT *               FROM `user_status`                WHERE us_user_id=$u_id"; $res = $dbr->query($sql, __METHOD__); $message = array; foreach ($res as $row) { $message = array(               'us_user_id' => $row->us_user_id,                'us_status' => ( $row->us_status ),            ); }       return $message; } } Tried to use this class in UserProfilePage.php, everything seemd to work fine. The links I really needed to read were: http://www.mediawiki.org/wiki/Manual:Database_access http://www.mediawiki.org/wiki/Manual:Global_object_variables

P.S.For future GSoCers: If your exams fall on GSoC time, dont get afraid. You will always be able to talk about it to your mentor and everything will be okay, as different universities have different session time. For example I still have 3 exams to pass.