Skip navigation
Help

forum-submitted.tpl.php

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

Default theme implementation to format a simple string indicated 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. 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

File

drupal/modules/forum/forum-submitted.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to format a simple string indicated when and
  5. * by whom a topic was submitted.
  6. *
  7. * Available variables:
  8. *
  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. Unsafe, be sure
  12. * to clean this data before printing.
  13. *
  14. * @see template_preprocess_forum_submitted()
  15. * @see theme_forum_submitted()
  16. */
  17. ?>
  18. <?php if ($time): ?>
  19. <span class="submitted">
  20. <?php print t('By !author @time ago', array(
  21. '@time' => $time,
  22. '!author' => $author,
  23. )); ?>
  24. </span>
  25. <?php else: ?>
  26. <?php print t('n/a'); ?>
  27. <?php endif; ?>