first import
This commit is contained in:
54
sites/all/modules/simplenews/theme/simplenews-block.tpl.php
Normal file
54
sites/all/modules/simplenews/theme/simplenews-block.tpl.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display the simplenews block.
|
||||
*
|
||||
* Copy this file in your theme directory to create a custom themed block.
|
||||
* Rename it to simplenews-block--<tid>.tpl.php to override it for a
|
||||
* newsletter using the newsletter term's id.
|
||||
*
|
||||
* Available variables:
|
||||
* - $subscribed: the current user is subscribed to the $tid newsletter
|
||||
* - $user: the current user is authenticated
|
||||
* - $tid: tid of the newsletter
|
||||
* - $message: announcement message (Default: 'Stay informed on our latest news!')
|
||||
* - $form: newsletter subscription form *1
|
||||
* - $subscription_link: link to subscription form at 'newsletter/subscriptions' *1
|
||||
* - $newsletter_link: link to taxonomy list of the newsletter issue *2
|
||||
* - $issue_list: list of newsletter issues (of the $tid newsletter series) *2
|
||||
* - $rssfeed: RSS feed of newsletter (series) *2
|
||||
* Note 1: requires 'subscribe to newsletters' permission
|
||||
* Note 2: requires 'view links in block' or 'administer newsletters' permission
|
||||
*
|
||||
* Simplenews module controls the display of the block content. The following
|
||||
* variables are available for this purpose:
|
||||
* - $use_form : TRUE = display the form; FALSE = display link to example.com/newsletter/subscriptions
|
||||
* - $use_issue_link : TRUE = display link to newsletter issue list
|
||||
* - $use_issue_list : TRUE = display list of the newsletter issue
|
||||
* - $use_rss : TRUE = display RSS feed
|
||||
*
|
||||
* @see template_preprocess_simplenews_block()
|
||||
*/
|
||||
?>
|
||||
<?php if ($message): ?>
|
||||
<p><?php print $message; ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($use_form): ?>
|
||||
<?php print render($form); ?>
|
||||
<?php elseif ($subscription_link): ?>
|
||||
<p><?php print $subscription_link; ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($use_issue_link && $newsletter_link): ?>
|
||||
<div class="issues-link"><?php print $newsletter_link; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($use_issue_list && $issue_list): ?>
|
||||
<div class="issues-list"><?php print $issue_list; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($use_rss): ?>
|
||||
<?php print $rssfeed; ?>
|
||||
<?php endif; ?>
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
// $Id: simplenews-multi-block.tpl.php,v 1.6 2009/01/02 12:01:17 sutharsan Exp $
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display the simplenews block.
|
||||
*
|
||||
* Copy this file in your theme directory to create a custom themed block.
|
||||
*
|
||||
* Available variables:
|
||||
* - $subscribed: the current user is subscribed to the $tid newsletter
|
||||
* - $user: the current user is authenticated
|
||||
* - $message: announcement message (Default: 'Stay informed on our latest news!')
|
||||
* - $form: newsletter subscription form
|
||||
*
|
||||
* @see template_preprocess_simplenews_multi_block()
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($message): ?>
|
||||
<p><?php print $message; ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php print render($form); ?>
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to format the simplenews newsletter body.
|
||||
*
|
||||
* Copy this file in your theme directory to create a custom themed body.
|
||||
* Rename it to override it. Available templates:
|
||||
* simplenews-newsletter-body--[tid].tpl.php
|
||||
* simplenews-newsletter-body--[view mode].tpl.php
|
||||
* simplenews-newsletter-body--[tid]--[view mode].tpl.php
|
||||
* See README.txt for more details.
|
||||
*
|
||||
* Available variables:
|
||||
* - $build: Array as expected by render()
|
||||
* - $build['#node']: The $node object
|
||||
* - $title: Node title
|
||||
* - $language: Language code
|
||||
* - $view_mode: Active view mode
|
||||
* - $simplenews_theme: Contains the path to the configured mail theme.
|
||||
* - $simplenews_subscriber: The subscriber for which the newsletter is built.
|
||||
* Note that depending on the used caching strategy, the generated body might
|
||||
* be used for multiple subscribers. If you created personalized newsletters
|
||||
* and can't use tokens for that, make sure to disable caching or write a
|
||||
* custom caching strategy implemention.
|
||||
*
|
||||
* @see template_preprocess_simplenews_newsletter_body()
|
||||
*/
|
||||
?>
|
||||
<h2><?php print $title; ?></h2>
|
||||
<?php print render($build); ?>
|
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to format the simplenews newsletter footer.
|
||||
*
|
||||
* Copy this file in your theme directory to create a custom themed footer.
|
||||
* Rename it to simplenews-newsletter-footer--[tid].tpl.php to override it for a
|
||||
* newsletter using the newsletter term's id.
|
||||
*
|
||||
* @todo Update the available variables.
|
||||
* Available variables:
|
||||
* - $build: Array as expected by render()
|
||||
* - $build['#node']: The $node object
|
||||
* - $language: language code
|
||||
* - $key: email key [node|test]
|
||||
* - $format: newsletter format [plain|html]
|
||||
* - $unsubscribe_text: unsubscribe text
|
||||
* - $test_message: test message warning message
|
||||
* - $simplenews_theme: path to the configured simplenews theme
|
||||
*
|
||||
* Available tokens:
|
||||
* - [simplenews-subscriber:unsubscribe-url]: unsubscribe url to be used as link
|
||||
*
|
||||
* Other available tokens can be found on the node edit form when token.module
|
||||
* is installed.
|
||||
*
|
||||
* @see template_preprocess_simplenews_newsletter_footer()
|
||||
*/
|
||||
?>
|
||||
<?php if (!$opt_out_hidden): ?>
|
||||
<?php if ($format == 'html'): ?>
|
||||
<p class="newsletter-footer"><a href="[simplenews-subscriber:unsubscribe-url]"><?php print $unsubscribe_text ?></a></p>
|
||||
<?php else: ?>
|
||||
-- <?php print $unsubscribe_text ?>: [simplenews-subscriber:unsubscribe-url]
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($key == 'test'): ?>
|
||||
- - - <?php print $test_message ?> - - -
|
||||
<?php endif ?>
|
Reference in New Issue
Block a user