| 2 |
// $Id$ |
// $Id$ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
|
* This function returns true if we should use javascript effects. |
| 6 |
|
* It checkes for the javascript setting in the admin page, |
| 7 |
|
* and for the has_js drupal cookie |
| 8 |
|
*/ |
| 9 |
|
function _nodereferrer_use_js() { |
| 10 |
|
if (empty($_COOKIE['has_js'])) { |
| 11 |
|
return false; |
| 12 |
|
} |
| 13 |
|
|
| 14 |
|
return (boolean)variable_get('nodereferrer_create_javascript', 1); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
/** |
| 18 |
* Helper function : given a node, return the list of fields of type |
* Helper function : given a node, return the list of fields of type |
| 19 |
* nodereference the current user is allowed to edit. |
* nodereference the current user is allowed to edit. |
| 20 |
* Nodereference view fields that use views aren't supported |
* Nodereference view fields that use views aren't supported |