Projet

Général

Profil

Paste
Télécharger (1,53 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.submitted.tpl.php @ 13c3c9b4

1
<?php
2

    
3
/**
4
 * @file
5
 * Default theme implementation to format a simple string indicated when and
6
 * by whom a topic was submitted.
7
 *
8
 * Available variables:
9
 *
10
 * - $topic_link: On the forum overview page, this is the title of the last
11
 *   updated topic (node).
12
 * - $author: The author of the post.
13
 * - $time: How long ago the post was created.
14
 * - $topic: An object with the raw data of the thread. Unsafe, be sure
15
 *   to clean this data before printing.
16
 *
17
 * @see template_preprocess_forum_submitted()
18
 * @see advanced_forum_preprocess_forum_submitted()
19
 */
20
?>
21

    
22
<?php if ($time): ?>
23
  <?php if (!empty($topic_link)): ?>
24
    <?php if (isset($date_posted)): ?>
25
      <?php print t(
26
        '!title<br />by !author<br />@date_posted', array(
27
          '!title' => $topic_link,
28
          '@date_posted' => $date_posted,
29
          '!author' => $author,
30
        )); ?>
31
    <?php else: ?>
32
     <?php print t(
33
        '!title<br />by !author<br />@time ago', array(
34
          '!title' => $topic_link,
35
          '@time' => $time,
36
          '!author' => $author,
37
        )); ?>
38
    <?php endif; ?>
39
  <?php else: ?>
40
    <?php if (isset($date_posted)): ?>
41
      <?php print t(
42
        'by !author<br />@date_posted', array(
43
          '@date_posted' => $date_posted,
44
          '!author' => $author,
45
        )); ?>
46
    <?php else: ?>
47
     <?php print t(
48
        'by !author<br />@time ago', array(
49
          '@time' => $time,
50
          '!author' => $author,
51
        )); ?>
52
    <?php endif; ?>
53
  <?php endif; ?>
54
<?php else: ?>
55
  <?php print t('n/a'); ?>
56
<?php endif; ?>