Minimum version: Midgard 1.2
Sets the score field of an article. The score field is used in functions like mgd_list_topic_articles() to control the order of the returned articles. Only owners of an article are allowed to modify the score.
Returns TRUE on success, FALSE on failure.
<?php $id = 123; $score = 13; $update = mgd_update_article_score( $id, $score ); if(! $update ) { echo "Update score of article $id failed.<br>\n"; echo "reason: " . mgd_errstr(); } else { echo "Updated score of article $id."; } ?> |