summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitMailer.php7
-rw-r--r--admin/send.php3
-rw-r--r--templates/edit_newsletter.tpl4
-rw-r--r--templates/list_newsletters.tpl67
-rw-r--r--templates/view_edition.tpl2
5 files changed, 14 insertions, 69 deletions
diff --git a/BitMailer.php b/BitMailer.php
index c5c925c..d8e1580 100644
--- a/BitMailer.php
+++ b/BitMailer.php
@@ -1,12 +1,12 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_newsletters/Attic/BitMailer.php,v 1.12 2005/12/29 18:46:39 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_newsletters/Attic/BitMailer.php,v 1.13 2005/12/29 21:55:55 spiderr Exp $
*
* Copyright (c) 2004 bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitMailer.php,v 1.12 2005/12/29 18:46:39 spiderr Exp $
+ * $Id: BitMailer.php,v 1.13 2005/12/29 21:55:55 spiderr Exp $
*
* Class that handles editions of newsletters
* @package newsletters
@@ -15,7 +15,7 @@
*
* @author spiderr <spider@steelsun.com>
*
- * @version $Revision: 1.12 $ $Date: 2005/12/29 18:46:39 $ $Author: spiderr $
+ * @version $Revision: 1.13 $ $Date: 2005/12/29 21:55:55 $ $Author: spiderr $
*/
/**
@@ -103,6 +103,7 @@ class BitMailer extends phpmailer {
$unsub = '';
if( $body[$pick['content_id']]['object']->mNewsletter->mInfo['unsub_msg'] ) {
$gBitSmarty->assign( 'url_code', $pick['url_code'] );
+ $gBitSmarty->assign( 'sending', TRUE );
$unsub = $gBitSmarty->fetch( 'bitpackage:newsletters/unsubscribe_inc.tpl' );
}
$htmlBody = $unsub . $body[$pick['content_id']]['body'] . $unsub . '<img src="'.NEWSLETTERS_PKG_URI.'track.php?sub='.$pick['url_code'].'" alt="" />';
diff --git a/admin/send.php b/admin/send.php
index cd9ef8a..685ab09 100644
--- a/admin/send.php
+++ b/admin/send.php
@@ -1,6 +1,6 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.10 2005/12/29 18:46:39 spiderr Exp $
+// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.11 2005/12/29 21:55:55 spiderr Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
@@ -31,6 +31,7 @@ $gBitSmarty->assign('emited', 'n');
if( $gContent->isValid() && isset( $_REQUEST['preview'] ) ) {
$recipients = $gContent->getRecipients( $_REQUEST['send_group'] );
$gBitSmarty->assign_by_ref( 'recipientList', $recipients );
+ $gBitSmarty->assign( 'sending', TRUE );
} elseif( $gContent->isValid() && isset( $_REQUEST["send"] ) ) {
if( $emails = $gContent->getRecipients( $_REQUEST['send_group'] ) ) {
global $gBitMailer;
diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl
index affdf5e..2eb4116 100644
--- a/templates/edit_newsletter.tpl
+++ b/templates/edit_newsletter.tpl
@@ -53,7 +53,7 @@
{formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."}
{/forminput}
</div>
-
+{*
<div class="row">
{formlabel label="Validate e-mail Addresses" for="validate_addr"}
{forminput}
@@ -61,7 +61,7 @@
{formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."}
{/forminput}
</div>
-
+*}
<div class="row submit">
<input type="submit" name="cancel" value="{tr}Cancel{/tr}" />
<input type="submit" name="save" value="{tr}Save{/tr}" />
diff --git a/templates/list_newsletters.tpl b/templates/list_newsletters.tpl
index 1287751..be4b750 100644
--- a/templates/list_newsletters.tpl
+++ b/templates/list_newsletters.tpl
@@ -1,3 +1,6 @@
+{if !$newsletters || $gContent->isValid() || $smarty.request.new}
+ {include file="bitpackage:newsletters/edit_newsletter.tpl"}
+{else}
{strip}
<div class="floaticon">{bithelp}</div>
@@ -7,68 +10,6 @@
</div>
<div class="body">
- {if !$newsletters || $gContent->isValid() || $smarty.request.new}
- {form legend="Create / Edit Newsletters"}
- {if $individual eq 'y'}
- <a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$gContent->mInfo.name}&amp;object_type=newsletter&amp;permType=newsletters&amp;object_id={$gContent->mInfo.nl_id}">{tr}There are individual permissions set for this newsletter{/tr}</a><br /><br />
- {/if}
- <input type="hidden" name="nl_id" value="{$gContent->mNewsletterId}" />
-
- <div class="row">
- {formlabel label="Title" for="title"}
- {forminput}
- <input type="text" name="title" id="title" value="{$gContent->mInfo.title|escape}" />
- {formhelp note="Title of the newsletter."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Description" for="description"}
- {forminput}
- <textarea name="edit" rows="4" cols="40" id="description">{$gContent->mInfo.data|escape}</textarea>
- {formhelp note="Description of the newsletter, that users know what they are getting themselves into."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Users can Subscribe" for="allow_user_sub"}
- {forminput}
- <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if $gContent->mInfo.allow_user_sub eq 'y'}checked="checked"{/if} />
- {formhelp note="Users can subscribe to this list. Disabling this options means that you have to manually add users to the list."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Any e-mail Address" for="allow_any_sub"}
- {forminput}
- <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} />
- {formhelp note="Users may subscribe using any email address."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Append Un/Subscribe Instructions" for="unsub_msg"}
- {forminput}
- <input type="checkbox" name="unsub_msg" id="unsub_msg" {if $gContent->mInfo.unsub_msg eq 'y'}checked="checked"{/if} />
- {formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Validate e-mail Addresses" for="validate_addr"}
- {forminput}
- <input type="checkbox" name="validate_addr" id="validate_addr" {if $gContent->mInfo.validate_addr eq 'y'}checked="checked"{/if} />
- {formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."}
- {/forminput}
- </div>
-
- <div class="row submit">
- <input type="submit" name="cancel" value="{tr}Cancel{/tr}" />
- <input type="submit" name="save" value="{tr}Save{/tr}" />
- </div>
- {/form}
-
- {else}
{minifind}
@@ -109,7 +50,7 @@
{/if}
{pagination}
- {/if}
</div><!-- end .body -->
</div><!-- end .___ -->
{/strip}
+{/if}
diff --git a/templates/view_edition.tpl b/templates/view_edition.tpl
index f134159..c9b4aaf 100644
--- a/templates/view_edition.tpl
+++ b/templates/view_edition.tpl
@@ -1,4 +1,5 @@
<div class="display newsletters">
+ {if !$sending}
<div class="floaticon">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon'}
@@ -10,6 +11,7 @@
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$gContent->mEditionId}">{biticon ipackage=liberty iname="mail_send" iexplain="email this post"}</a>
{/if}
</div>
+ {/if}
<div class="header">
<h1>{$gContent->getTitle()}</h1>