| 1 |
<?php
|
| 2 |
// $Id: simplenews-block.tpl.php,v 1.5 2008/12/28 16:21:20 sutharsan Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Default theme implementation to display the simplenews block.
|
| 7 |
*
|
| 8 |
* Copy this file in your theme directory to create a custom themed block.
|
| 9 |
* Rename it to simplenews-block--<tid>.tpl.php to override it for a
|
| 10 |
* newsletter using the newsletter term's id.
|
| 11 |
*
|
| 12 |
* Available variables:
|
| 13 |
* - $subscribed: the current user is subscribed to the $tid newsletter
|
| 14 |
* - $user: the current user is authenticated
|
| 15 |
* - $tid: tid of the newsletter
|
| 16 |
* - $message: announcement message (Default: 'Stay informed on our latest news!')
|
| 17 |
* - $form: newsletter subscription form *1
|
| 18 |
* - $subscription_link: link to subscription form at 'newsletter/subscriptions' *1
|
| 19 |
* - $newsletter_link: link to taxonomy list of the newsletter issue *2
|
| 20 |
* - $issuelist: list of newsletters (of the $tid newsletter series) *2
|
| 21 |
* - $rssfeed: RSS feed of newsletter (series) *2
|
| 22 |
* Note 1: requires 'subscribe to newsletters' permission
|
| 23 |
* Note 2: requires 'view links in block' or 'administer newsletters' permission
|
| 24 |
*
|
| 25 |
* Simplenews module controls the display of the block content. The following
|
| 26 |
* variables are available for this purpose:
|
| 27 |
* - $use_form : TRUE = display the form; FALSE = display link to example.com/newsletter/subscriptions
|
| 28 |
* - $use_issue_link : TRUE = display link to newsletter issue list
|
| 29 |
* - $use_issue_list : TRUE = display list of the newsletter issue
|
| 30 |
* - $use_rss : TRUE = display RSS feed
|
| 31 |
*
|
| 32 |
* @see template_preprocess_simplenews_block()
|
| 33 |
*/
|
| 34 |
?>
|
| 35 |
<?php if ($message): ?>
|
| 36 |
<p><?php print $message; ?></p>
|
| 37 |
<?php endif; ?>
|
| 38 |
|
| 39 |
<?php if ($use_form): ?>
|
| 40 |
<?php print $form; ?>
|
| 41 |
<?php elseif ($subscription_link): ?>
|
| 42 |
<p><?php print $subscription_link; ?></p>
|
| 43 |
<?php endif; ?>
|
| 44 |
|
| 45 |
<?php if ($use_issue_link && $newsletter_link): ?>
|
| 46 |
<div class="issues-link"><?php print $newsletter_link; ?></div>
|
| 47 |
<?php endif; ?>
|
| 48 |
|
| 49 |
<?php if ($use_issue_list && $issue_list): ?>
|
| 50 |
<div class="issues-list"><?php print $issue_list; ?></div>
|
| 51 |
<?php endif; ?>
|
| 52 |
|
| 53 |
<?php if ($use_rss): ?>
|
| 54 |
<?php print $rssfeed; ?>
|
| 55 |
<?php endif; ?>
|