| 97 |
if (module_exists('token')) { |
if (module_exists('token')) { |
| 98 |
$message = token_replace($message, 'node', $node); |
$message = token_replace($message, 'node', $node); |
| 99 |
} |
} |
|
else { |
|
|
$tokens = restricted_content_token_values('node', $node); |
|
|
foreach ($tokens as $key => $value) { |
|
|
$message = str_replace("[$key]", $value, $message); |
|
|
} |
|
|
} |
|
| 100 |
|
|
| 101 |
$node->teaser = $message; |
$node->teaser = $message; |
| 102 |
$node->body = $message; |
$node->body = $message; |
| 151 |
*/ |
*/ |
| 152 |
function restricted_content_variables() { |
function restricted_content_variables() { |
| 153 |
return array( |
return array( |
| 154 |
'restricted_content_message' => t('This [type-name-lower] has been restricted to certain users.'), |
'restricted_content_message' => t('This !token-type-name has been restricted to certain users.', array('!token-type-name' => module_exists('token') ? '[type-name-lower]' : t('content'))), |
| 155 |
'restricted_content_message_anon' => t('Please <a href="[site-url-register]">register for a user account</a> to view this [type-name-lower].'), |
'restricted_content_message_anon' => t('Please <a href="!token-register">register for a user account</a> to view this !token-type-name.', array('!token-type-name' => module_exists('token') ? '[type-name-lower]' : t('content'), '!token-register' => module_exists('token') ? '[site-url-register]' : url('user/register'))), |
| 156 |
); |
); |
| 157 |
} |
} |
| 158 |
|
|