home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (forum-submitted.tpl.php)

This example Drupal source code file (forum-submitted.tpl.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

author, class, else, endif, php, span, submitted, time

The forum-submitted.tpl.php Drupal example source code

<?php
// $Id: forum-submitted.tpl.php,v 1.5 2009/07/28 10:41:20 dries Exp $

/**
 * @file
 * 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 template_preprocess_forum_submitted()
 * @see theme_forum_submitted()
 */
?>
<?php if ($time): ?>
  <span class="submitted">
  <?php print t('By !author @time ago', array(
    '@time' => $time,
    '!author' => $author,
    )); ?>
  </span>
<?php else: ?>
  <?php print t('n/a'); ?>
<?php endif; ?>

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal forum-submitted.tpl.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.