| 1 |
<?php |
<?php |
| 2 |
// $Id: flag.inc,v 1.1.2.30.2.14 2009/10/28 00:31:46 quicksketch Exp $ |
// $Id: flag.inc,v 1.1.2.30.2.15 2009/10/28 01:47:33 quicksketch Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1248 |
function options() { |
function options() { |
| 1249 |
$options = parent::options(); |
$options = parent::options(); |
| 1250 |
$options += array( |
$options += array( |
| 1251 |
|
'access_author' => '', |
| 1252 |
'show_on_comment' => TRUE, |
'show_on_comment' => TRUE, |
| 1253 |
); |
); |
| 1254 |
return $options; |
return $options; |
| 1256 |
|
|
| 1257 |
function options_form(&$form) { |
function options_form(&$form) { |
| 1258 |
parent::options_form($form); |
parent::options_form($form); |
| 1259 |
|
|
| 1260 |
|
$form['access']['access_author'] = array( |
| 1261 |
|
'#type' => 'radios', |
| 1262 |
|
'#title' => t('Flag access by content authorship'), |
| 1263 |
|
'#options' => array( |
| 1264 |
|
'' => t('No additional restrictions'), |
| 1265 |
|
'comment_own' => t('Users may only flag own comments'), |
| 1266 |
|
'comment_others' => t('Users may only flag comments by others'), |
| 1267 |
|
'node_own' => t('Users may only flag comments of nodes they own'), |
| 1268 |
|
'node_others' => t('Users may only flag comments of nodes by others'), |
| 1269 |
|
), |
| 1270 |
|
'#default_value' => $this->access_author, |
| 1271 |
|
'#description' => t("Restrict access to this flag based on the user's ownership of the content. Users must also have access to the flag through the role settings."), |
| 1272 |
|
); |
| 1273 |
|
|
| 1274 |
$form['display']['show_on_comment'] = array( |
$form['display']['show_on_comment'] = array( |
| 1275 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 1276 |
'#title' => t('Display link under comment'), |
'#title' => t('Display link under comment'), |