/[drupal]/contributions/modules/restricted_content/restricted_content.module
ViewVC logotype

Diff of /contributions/modules/restricted_content/restricted_content.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Sat Jan 3 07:05:20 2009 UTC revision 1.6, Sat Jan 3 07:31:25 2009 UTC
# Line 97  function restricted_content_nodeapi(&$no Line 97  function restricted_content_nodeapi(&$no
97        if (module_exists('token')) {        if (module_exists('token')) {
98          $message = token_replace($message, 'node', $node);          $message = token_replace($message, 'node', $node);
99        }        }
100          else {
101            $tokens = restricted_content_token_values('node', $node);
102            foreach ($tokens as $key => $value) {
103              $message = str_replace("[$key]", $value, $message);
104            }
105          }
106    
107        $node->teaser = $message;        $node->teaser = $message;
108        $node->body = $message;        $node->body = $message;
# Line 151  function restricted_content_token_values Line 157  function restricted_content_token_values
157   */   */
158  function restricted_content_variables() {  function restricted_content_variables() {
159    return array(    return array(
160      'restricted_content_message' => t('This !token1 has been restricted to certain users.', array('!token1' => module_exists('token') ? '[type-name-lower]' : t('content'))),      'restricted_content_message' => t('This [type-name-lower] has been restricted to certain users.'),
161      'restricted_content_message_anon' => t('Please <a href="!token1">register for a user account</a> to view this !token2.', array('!token1' => module_exists('token') ? '[site-register-url]' : url('user/register'), '!token2' => module_exists('token') ? '[type-name-lower]' : t('content'))),      'restricted_content_message_anon' => t('Please <a href="[site-url-register]">register for a user account</a> to view this [type-name-lower].'),
162    );    );
163  }  }
164    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2