Friday, September 28, 2007

Test story

/**

* Modify score for a node based on the flag and account roles.

*

* @param $nid

* Node id the flag is applied to.

* @param $newflag

* The flag to be applied.

* @param $account

* The user who is flagging.

*/

function flagging_flag_modify_score($nid, $newflag, $account) {

// maps flag type to flagging_node_score column.

$score_table_columns = array(

FLAGGING_BREAKING_NEWS => 'flag_bn_score',

FLAGGING_BREAKING_NEWS_HEAVY => 'flag_bn_score',

FLAGGING_GOOD_STUFF => 'flag_gs_score',

FLAGGING_NEWS_WANTED => 'flag_nw_score',

FLAGGING_NEEDS_IMPROVEMENT => 'flag_ni_score',

FLAGGING_FISHY => 'flag_fishy_score',

FLAGGING_SPAM => 'flag_spam_score',

);


No comments: