forum-submitted.tpl.php

  1. 7.x drupal-7.x/modules/forum/forum-submitted.tpl.php
  2. 6.x drupal-6.x/modules/forum/forum-submitted.tpl.php

Formats a forum post submission string.

The submission string indicates when and by whom a topic was submitted.

Available variables:

  • $author: The author of the post.
  • $time: How long ago the post was created.
  • $topic: An object with the raw data of the post. Potentially unsafe. Be sure to clean this data before printing.

See also

template_preprocess_forum_submitted()

theme_forum_submitted()

2 theme calls to forum-submitted.tpl.php
template_preprocess_forum_list in drupal-7.x/modules/forum/forum.module
Preprocesses variables for forum-list.tpl.php.
template_preprocess_forum_topic_list in drupal-7.x/modules/forum/forum.module
Preprocesses variables for forum-topic-list.tpl.php.

File

drupal-7.x/modules/forum/forum-submitted.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Formats a forum post submission string.
  5. *
  6. * The submission string indicates when and by whom a topic was submitted.
  7. *
  8. * Available variables:
  9. * - $author: The author of the post.
  10. * - $time: How long ago the post was created.
  11. * - $topic: An object with the raw data of the post. Potentially unsafe. Be
  12. * sure to clean this data before printing.
  13. *
  14. * @see template_preprocess_forum_submitted()
  15. * @see theme_forum_submitted()
  16. *
  17. * @ingroup themeable
  18. */
  19. ?>
  20. <?php if ($time): ?>
  21. <span class="submitted">
  22. <?php print t('By !author @time ago', array(
  23. '@time' => $time,
  24. '!author' => $author,
  25. )); ?>
  26. </span>
  27. <?php else: ?>
  28. <?php print t('n/a'); ?>
  29. <?php endif; ?>

Related topics