Guest User

Untitled

a guest
Feb 12th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. // in der template.php (Drupal 6)
  2.  
  3. function phptemplate_preprocess_comment(&$variables) {
  4. $comment = $variables['comment'];
  5. $node = $variables['node'];
  6. $variables['author'] = theme('username', $comment);
  7. $variables['content'] = $comment->comment;
  8. $variables['date'] = format_date($comment->timestamp);
  9. $variables['links'] = isset($variables['links']) ? theme('links', $variables['links']) : '';
  10. $variables['new'] = $comment->new ? t('new') : '';
  11. $variables['picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '';
  12. $variables['signature'] = $comment->signature;
  13. $variables['submitted'] = theme('comment_submitted', $comment);
  14. $variables['title'] = l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid"));
  15. $variables['template_files'][] = 'comment-'. $node->type;
  16. // set status to a string representation of comment->status.
  17. if (isset($comment->preview)) {
  18. $variables['status'] = 'comment-preview';
  19. }
  20. else {
  21. $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
  22. }
  23. }
  24.  
  25. // Fehlermeldung in der node Ansicht:
  26. * warning: Invalid argument supplied for foreach() in C:\Localhost\projects\iquarius\de_iquarius_www\includes\theme.inc on line 1145.
  27. * warning: Invalid argument supplied for foreach() in C:\Localhost\projects\iquarius\de_iquarius_www\includes\theme.inc on line 1145.
  28. * warning: Invalid argument supplied for foreach() in C:\Localhost\projects\iquarius\de_iquarius_www\includes\theme.inc on line 1145.
  29.  
  30.  
  31. Wobei es bei der theme_links() irgendwie zu problemen kommt.
Advertisement
Add Comment
Please, Sign In to add comment