[RC7] phpBB Digests

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
starriver
Registered User
Posts: 11
Joined: Sat Feb 28, 2009 1:37 am

Re: [RC5] Email Digests

Post by starriver »

This seems to work fine. Thanks for the quick fix.

As far as I know the only weird character to worry about for the date format in phpbb3 is the pipe character. If I find any others, I'll let you know!

Thanks again for all that you do to provide this vital mod.
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

subsilver2 bugs in version 2.2.4

Post by MarkDHamill »

A thoughtful user noticed some bugs in the archive related to version 2.2.4.

First, the instructions erroneously point to a contrib/style folder that does not exist. Here is the corrected version of subsilver2.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="./modx.prosilver.en.xsl"?>
<!--For security purposes, please check: http
://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.2.xsd">
  <header>
    <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
    <title lang="en">phpBB Digests- subsilver2 Style</title>
    <description lang="en">These are the instructions to install the phpBB Digests template and associated files for the subsilver2 style.</description>
    <author-group>
      <author>
        <realname>Mark D. Hamill</realname>
        <email>mark@phpbbservices.com</email>
        <username>MarkDHamill</username>
		<homepage>http://phpbbservices.com/digests</homepage>
        <contributions />
      </author>
    </author-group>
    <mod-version>2.2.4</mod-version>
    <installation>
      <level>easy</level>
      <time>60</time>
      <target-version>3.0.5</target-version>
    </installation>

		<link-group>
			<link type="parent" href="./install.xml" lang="en">Digests Installation Instructions</link>
		</link-group>

  </header>
	<action-group>
		<copy>
			<file from="contrib/subsilver2/template/mail_digests_html.html" to="styles/subsilver2/template/mail_digests_html.html" />
			<file from="contrib/subsilver2/template/mail_digests_text.html" to="styles/subsilver2/template/mail_digests_text.html" />
			<file from="contrib/subsilver2/template/ucp_digests.html" to="styles/subsilver2/template/ucp_digests.html" />
		</copy>

		<diy-instructions lang="en">Since these are new files, you probably won't need to refresh your templates. If for some reason they do not appear, try refreshing templates through the Administrator Control Panel:

ACP > Styles > Style Components > Templates > subsilver2 > Refresh</diy-instructions>

	</action-group>
</mod>
And here is the correct ucp_digests_body.html template for subsilver2:

Code: Select all

<!-- INCLUDE ucp_header.html -->

<script type="text/javascript">
<!-- Hide from older browsers

function check_uncheck(checkbox_id, radio_button)
{
	var checkbox = document.getElementById(checkbox_id);
	if (radio_button.checked)
	{
		checkbox.disabled = (radio_button.id == 'pms1') ? false : true;
	}
	else
	{
		checkbox.disabled = (radio_button.id == 'pms1') ? true : false;
	}
}

function disable_forums(disabled)
{
	var element_name = new String();
	var digests_id = document.getElementById('digests');
	
	// Assume a HTML 4.0 compatible browser
	var x = document.getElementById('div_0').getElementsByTagName("input");
	for(i=0;i<x.length;i++) {
		thisobject = x[i];
		element_name = thisobject.id;
		if(element_name != null) 
		{
			if(element_name.substr(0,4) == "elt_")
			{
				thisobject.disabled = disabled;
			}
		}
	}
	
	// Also, enable/disable the All Forums checkbox
	var all_forums = document.getElementById('all_forums');
	all_forums.disabled = disabled;
	
	return true;
}

function check_word_size_min (field) 
{
	size = field.value;
	if (size == '')
	{
		return;
	}
	if (isNaN(size))
	{
		alert("{LA_DIGEST_SIZE_ERROR_MIN}");
		field.focus();
	}
	else
	{
		if (size < 1) 
		{
			alert("{LA_DIGEST_SIZE_ERROR_MIN}");
			field.focus();
		}
		else
		{
			field.value = parseInt(size);
		}
	}
}

<!-- IF S_POSTS_SELECTION -->
function unCheckSubscribedForums (checkbox) {
	is_checked = checkbox.checked;
 
	var element_name = new String();
	
	// Assume a HTML 4.0 compatible browser
	var x = document.getElementById('div_0').getElementsByTagName("input");
	for(i=0;i<x.length;i++) {
		thisobject = x[i];
		element_name = thisobject.id;
		if(element_name != null) 
		{
			if(element_name.substr(0,4) == "elt_")
			{
				thisobject.checked = is_checked;
			}
		}
	}
	return true;
}

function unCheckAllForums () {

	// Unchecks or checks the all forums checkbox
	var digests_id = document.getElementById('digests');
	any_unchecked = false;
	
	// Assume a HTML 4.0 compatible browser
	var x = document.getElementById('div_0');
	var y = x.getElementsByTagName("input");
	for(i=0;((i<y.length) && (any_unchecked == false));i++) 
	{
		thisobject = y[i];
		element_name = thisobject.name;
		if(element_name != null) {
			if(element_name.substr(0,4) == "elt_")
			{
				if (thisobject.checked == false)
				{
					digests_id.all_forums.checked = false;
					any_unchecked = true;
				}
			}
		}
	}
	if (any_unchecked == false)
	{
		digests_id.all_forums.checked = true;
	}

	return;
}

<!-- ENDIF -->

<!-- IF POST_FILTERS -->
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function check_word_size (field)
{
	if (isNaN(field.value))
	{
		alert("{LA_DIGEST_SIZE_ERROR}");
		field.focus();
		return;
	}
	size = parseInt(field.value);
	if (field.defaultValue != '')
	{
		max_items = parseInt(field.defaultValue);
	}
	else
	{
		max_items = 0;
	}
	if (size <= 0)
	{
		alert("{LA_DIGEST_SIZE_ERROR}");
		field.focus();
		return;
	}
	if (field.defaultValue != '0')
	{
		if (size > max_items) 
		{
			alert("{LA_DIGEST_SIZE_ERROR}");
			field.focus();
		}
	}
}

<!-- ENDIF -->

function show_warning()
{
	<!-- IF POSTS_SELECTION -->
	// If All Forums is unchecked and there are no checked forums, do not allow the form 
	// to submit and display a message
	var all_forums = document.getElementById('all_forums');
	if (all_forums.checked == true)
	{
		return true;
	}
	
	var x = document.getElementById('div_0').getElementsByTagName("input");
	var element_name = new String();
	var none_checked = true;
	
	for(i=0;i<x.length;i++) {
		thisobject = x[i];
		element_name = thisobject.id;
		if(element_name != null) 
		{
			if(element_name.substr(0,4) == "elt_")
			{
				if (thisobject.checked == true)
				{
					none_checked = false;
					break;
				}
			}
		}					
	}
	
	if (none_checked)
	{
		alert('{DIGEST_NO_FORUMS_CHECKED}');
		return false;
	}

	return true;
	<!-- ELSE -->
	return true;
	<!-- ENDIF -->
}

// End hiding -->  
</script>

<form id="digests" method="post" action="{U_ACTION}" onsubmit="return show_warning();">

<table class="tablebg" width="100%" cellspacing="1">
<tr>
	<th colspan="2" valign="middle">{DIGEST_TITLE}</th>
</tr>
<!-- IF S_BASICS -->
<tr>
	<td colspan="2" class="row3" valign="middle"><span class="genmed">{L_DIGEST_EXPLANATION}</span></td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_FREQUENCY}:</b></label><br /><span class="genmed">{L_DIGEST_FREQUENCY_EXPLAIN}</span></td>
	<td class="row2">
		<label for="none"><input type="radio" name="digest_type" id="none" style="margin-top: 3px;" value="NONE"<!-- IF S_DIGEST_NONE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_NONE}</label><br />  
		<label for="daily"><input type="radio" name="digest_type" id="daily" style="margin-top: 3px;" value="DAY"<!-- IF S_DIGEST_DAY_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_DAILY}</label><br />  
		<label for="week"><input type="radio" name="digest_type" id="week" style="margin-top: 3px;" value="WEEK"<!-- IF S_DIGEST_WEEK_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_WEEKLY}</label><br />  
		<label for="month"><input type="radio" name="digest_type" id="month" style="margin-top: 3px;" value="MNTH"<!-- IF S_DIGEST_MONTH_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_MONTHLY}</label>  
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed"> {L_DIGEST_FORMAT_STYLING}:</b></label><br /><span class="genmed">{L_DIGEST_FORMAT_STYLING_EXPLAIN}</span></td>
	<td class="row2">
		<label for="style1" title="{L_DIGEST_FORMAT_HTML_EXPLAIN}"><input type="radio" name="style" id="style1" style="margin-top: 3px;" value="{L_DIGEST_HTML_VALUE}"<!-- IF S_DIGEST_HTML_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_FORMAT_HTML}</label><br />
		<label for="style4" title="{L_DIGEST_FORMAT_HTML_CLASSIC_EXPLAIN}"><input type="radio" name="style" id="style4" style="margin-top: 3px;" value="{L_DIGEST_HTML_CLASSIC_VALUE}"<!-- IF S_DIGEST_HTML_CLASSIC_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_FORMAT_HTML_CLASSIC}</label><br />
		<label for="style2" title="{L_DIGEST_FORMAT_PLAIN_EXPLAIN}"><input type="radio" name="style" id="style2" style="margin-top: 3px;" value="{L_DIGEST_PLAIN_VALUE}"<!-- IF S_DIGEST_PLAIN_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_FORMAT_PLAIN}</label><br />
		<label for="style5" title="{L_DIGEST_FORMAT_PLAIN_CLASSIC_EXPLAIN}"><input type="radio" name="style" id="style5" style="margin-top: 3px;" value="{L_DIGEST_PLAIN_CLASSIC_VALUE}"<!-- IF S_DIGEST_PLAIN_CLASSIC_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_FORMAT_PLAIN_CLASSIC}</label><br />
		<label for="style3" title="{L_DIGEST_FORMAT_TEXT_EXPLAIN}"><input type="radio" name="style" id="style3" style="margin-top: 3px;" value="{L_DIGEST_TEXT_VALUE}"<!-- IF S_DIGEST_TEXT_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DIGEST_FORMAT_TEXT}</label>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label for="send_hour"><b class="genmed">{L_DIGEST_SEND_HOUR}:</b></label><br /><span class="genmed">{L_DIGEST_SEND_HOUR_EXPLAIN}</span></td>
	<td class="row2">
		<select name="send_hour" id="send_hour"> 
			<option value="0"<!-- IF S_0_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_12AM}</option>
			<option value="1"<!-- IF S_1_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_1AM}</option> 
			<option value="2"<!-- IF S_2_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_2AM}</option>
			<option value="3"<!-- IF S_3_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_3AM}</option> 
			<option value="4"<!-- IF S_4_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_4AM}</option>
			<option value="5"<!-- IF S_5_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_5AM}</option> 
			<option value="6"<!-- IF S_6_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_6AM}</option>
			<option value="7"<!-- IF S_7_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_7AM}</option>
			<option value="8"<!-- IF S_8_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_8AM}</option> 
			<option value="9"<!-- IF S_9_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_9AM}</option> 
			<option value="10"<!-- IF S_10_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_10AM}</option> 
			<option value="11"<!-- IF S_11_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_11AM}</option>
			<option value="12"<!-- IF S_12_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_12PM}</option> 
			<option value="13"<!-- IF S_13_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_1PM}</option> 
			<option value="14"<!-- IF S_14_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_2PM}</option> 
			<option value="15"<!-- IF S_15_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_3PM}</option> 
			<option value="16"<!-- IF S_16_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_4PM}</option> 
			<option value="17"<!-- IF S_17_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_5PM}</option> 
			<option value="18"<!-- IF S_18_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_6PM}</option> 
			<option value="19"<!-- IF S_19_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_7PM}</option> 
			<option value="20"<!-- IF S_20_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_8PM}</option> 
			<option value="21"<!-- IF S_21_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_9PM}</option> 
			<option value="22"<!-- IF S_22_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_10PM}</option> 
			<option value="23"<!-- IF S_23_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_11PM}</option> 
		</select> 
	</td>
</tr>
<!-- ENDIF -->
<!-- IF S_POSTS_SELECTION -->
<tr>
	<td colspan="2" class="row3" valign="middle"><span class="genmed">{DISABLED_MESSAGE}</span></td>
</tr>
<!-- IF S_NO_FORUMS -->
<tr>
	<td colspan="2" class="row3" valign="middle"><span class="genmed">{L_DIGEST_NO_FORUMS_AVAILABLE}</span></td>
</tr>
<!-- ENDIF -->
<!-- IF not S_NO_FORUMS -->
<tr>
<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_FILTER_TYPE}:</b></label></td>
<td class="row2">
		<input type="radio" name="filtertype" id="all" value="ALL" onclick="disable_forums(0);" <!-- IF S_DIGEST_POST_ANY --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /><label for="all"> {L_DIGEST_POSTS_TYPE_ANY}</label>
		<input type="radio" name="filtertype" id="first" value="1ST" onclick="disable_forums(0);" <!-- IF S_DIGEST_POST_FIRST --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /><label for="first"> {L_DIGEST_POSTS_TYPE_FIRST}</label> 
		<input type="radio" name="filtertype" id="bookmarks" value="BM" onclick="disable_forums(1);" <!-- IF S_DIGEST_POST_BM --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /><label for="bookmarks"> {L_DIGEST_USE_BOOKMARKS}</label> 
</td>
</tr>
<tr>
	<td class="row1" width="50%" valign="top"><label for="all_forums"><b class="genmed">{L_DIGEST_SELECT_FORUMS}:</b></label><br /><span class="genmed">{L_DIGEST_SELECT_FORUMS_EXPLAIN}</span></td>
	<td class="row2">
		<input type="checkbox" name="all_forums" id="all_forums" <!-- IF S_ALL_BY_DEFAULT --> checked="checked"<!-- ENDIF --><!-- IF S_ALL_DISABLED --> disabled="disabled"<!-- ENDIF --> onclick="unCheckSubscribedForums(this);"/> <label for="all_forums"><b>{L_DIGEST_ALL_FORUMS}</b></label><br /><br />
		<div id="div_0">
			<!-- BEGIN forums -->
			<!-- IF forums.S_DIV_OPEN -->
			<div id="{forums.CAT_ID}" style="position:relative; left:20px;">
			<!-- ENDIF -->
				<!-- IF forums.S_PRINT -->
				<!-- IF forums.IS_FORUM -->
				<input type="checkbox" name="{forums.FORUM_NAME}" id="{forums.FORUM_NAME}" {forums.FORUM_SUBSCRIBED} {forums.FORUM_DISABLED} onclick="unCheckAllForums();"/> <label for="{forums.FORUM_NAME}">{forums.FORUM_LABEL}</label><br />
				<!-- ENDIF -->
				<!-- IF forums.S_IS_FORUM -->
				<input type="checkbox" name="{forums.FORUM_NAME}" id="{forums.FORUM_NAME}"<!-- IF forums.S_FORUM_SUBSCRIBED --> checked="checked"<!-- ENDIF --><!-- IF forums.S_FORUM_DISABLED --> disabled="disabled"<!-- ENDIF --> onclick="unCheckAllForums();"/> <label for="{forums.FORUM_NAME}">{forums.FORUM_LABEL}</label><br />
				<!-- ENDIF -->
				<!-- ENDIF -->
			<!-- IF forums.S_DIV_CLOSE -->
			</div>
			<!-- ENDIF -->
			<!-- END forums -->
		</div>
	</td>
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_POST_FILTERS -->
<tr>
	<td colspan="2" class="row3" valign="middle"><span class="genmed">{DISABLED_MESSAGE}</span></td>
</tr>
<tr>
	<td class="row1" width="50%"><label for="count_limit"><b class="genmed">{L_DIGEST_COUNT_LIMIT}:</b></label><br /><span class="genmed">{L_DIGEST_COUNT_LIMIT_EXPLAIN}</span></td>
		<td class="row2"><input type="text" class="inputbox autowidth" size="5" maxlength="5" name="count_limit" id="count_limit" value="{S_DIGEST_MAX_ITEMS}"<!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> onblur="check_word_size(this);" />
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label for="min_word_size"><b class="genmed">{L_DIGEST_MIN_SIZE}:</b></label><br /><span class="genmed">{L_DIGEST_MIN_SIZE_EXPLAIN}</span></td>
	<td class="row2">
		<input type="text" class="inputbox autowidth" size="4" maxlength="4" name="min_word_size" id="min_word_size" value="{S_DIGEST_MIN_SIZE}"<!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> onblur="check_word_size_min(this);" />
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_NEW_POSTS_ONLY}:</b></label><br /><span class="genmed">{L_DIGEST_NEW_POSTS_ONLY_EXPLAIN}</span></td>
	<td class="row2">
		<label for="new_posts1"><input type="radio" name="new_posts" id="new_posts1" value="1"<!-- IF S_DIGEST_NEW_POSTS_ONLY_CHECKED_YES --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label> 
		<label for="new_posts2"><input type="radio" name="new_posts" id="new_posts2" value="0"<!-- IF S_DIGEST_NEW_POSTS_ONLY_CHECKED_NO --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_REMOVE_YOURS}:</b></label></td>
	<td class="row2">
		<label for="remove_yours1"><input type="radio" name="show_mine" id="remove_yours1" value="0"<!-- IF S_DIGEST_REMOVE_YOURS_CHECKED_YES --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label> 
		<label for="remove_yours2"><input type="radio" name="show_mine" id="remove_yours2" value="1"<!-- IF S_DIGEST_REMOVE_YOURS_CHECKED_NO --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_FILTER_FOES}:</b></label></td>
	<td class="row2">
		<label for="filter_foes1"><input type="radio" name="filter_foes" id="filter_foes1" value="1"<!-- IF S_DIGEST_FILTER_FOES_CHECKED_YES --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label> 
		<label for="filter_foes2"><input type="radio" name="filter_foes" id="filter_foes2" value="0"<!-- IF S_DIGEST_FILTER_FOES_CHECKED_NO --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_PRIVATE_MESSAGES_IN_DIGEST}:</b></label></td>
	<td class="row2">
		<label for="pms1"><input type="radio" name="pms" id="pms1" value="1"<!-- IF S_DIGEST_PRIVATE_MESSAGES_IN_DIGEST_YES --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> onclick="check_uncheck('mark_read', this);" /> {L_YES}</label> 
		<label for="pms2"><input type="radio" name="pms" id="pms2" value="0"<!-- IF S_DIGEST_PRIVATE_MESSAGES_IN_DIGEST_NO --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> onclick="check_uncheck('mark_read', this);" /> {L_NO}</label>	&nbsp;<input type="checkbox" name="mark_read" id="mark_read"<!-- IF S_DIGEST_MARK_READ_CHECKED --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> <label for="mark_read">{L_DIGEST_MARK_READ}</label>
	</td>
</tr>
<!-- ENDIF -->
<!-- IF S_ADDITIONAL_CRITERIA -->
<tr>
	<td colspan="2" class="row3" valign="middle"><span class="genmed">{DISABLED_MESSAGE}</span></td>
</tr>
<tr>
	<td class="row1" width="50%"><label for="sort_by"><b class="genmed">{L_DIGEST_SORT_BY}:</b></label><br /><span class="genmed">{L_DIGEST_SORT_BY_EXPLAIN}</span></td>
	<td class="row2">
		<select name="sort_by" id="sort_by"<!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF -->>
			<option value="board"<!-- IF S_BOARD_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_SORT_USER_ORDER}</option>
			<option value="standard"<!-- IF S_STANDARD_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_SORT_FORUM_TOPIC}</option>
			<option value="standard_desc"<!-- IF S_STANDARD_DESC_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_SORT_FORUM_TOPIC_DESC}</option>
			<option value="postdate"<!-- IF S_POSTDATE_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_SORT_POST_DATE}</option>
			<option value="postdate_desc"<!-- IF S_POSTDATE_DESC_SELECTED --> selected="selected"<!-- ENDIF -->>{L_DIGEST_SORT_POST_DATE_DESC}</option>
		</select>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label for="max_word_size"><b class="genmed">{L_DIGEST_MAX_SIZE}:</b></label><br /><span class="genmed">{L_DIGEST_MAX_SIZE_EXPLAIN}</span></td>
		<td class="row2"><input type="text" class="inputbox autowidth" size="4" maxlength="4" name="max_word_size" id="max_word_size" value="{DIGEST_MAX_SIZE}"<!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> onblur="check_word_size_min(this);" />

	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_SEND_ON_NO_POSTS}:</b></label></td>
	<td class="row2">
		<label for="send_on_no_posts1"><input type="radio" name="send_on_no_posts" id="send_on_no_posts1"<!-- IF S_DIGEST_SEND_ON_NO_POSTS_YES_CHECKED --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> value="1" /> {L_YES}</label> 
		<label for="send_on_no_posts2"><input type="radio" name="send_on_no_posts" id="send_on_no_posts2"<!-- IF S_DIGEST_SEND_ON_NO_POSTS_NO_CHECKED --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> value="0" /> {L_NO}</label>
	</td>
</tr>
<tr>
	<td class="row1" width="50%"><label><b class="genmed">{L_DIGEST_LASTVISIT_RESET}:</b></label></td>
	<td class="row2">
		<label for="lastvisit1"><input type="radio" name="lastvisit" id="lastvisit1" value="1"<!-- IF S_LASTVISIT_YES_CHECKED --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label> 
		<label for="lastvisit2"><input type="radio" name="lastvisit" id="lastvisit2" value="0"<!-- IF S_LASTVISIT_NO_CHECKED --> checked="checked"<!-- ENDIF --><!-- IF S_CONTROL_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label>
	</td>
</tr>
<!-- ENDIF -->

<!-- IF S_SHOW_BUTTONS -->
<tr>
	<td colspan="2" class="cat" align="center">
		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
	</td>
</tr>
<!-- ENDIF -->

<tr>
	<td colspan="2" class="row1" align="center">
		Powered by <a href="{S_DIGEST_PAGE_URL}" class="postlink" onclick="window.open(this.href);return false;">{S_DIGEST_HOME}</a> {S_DIGEST_VERSION}<br /> 
		<!-- IF S_IS_ADMIN -->	  
		{S_VERSION_INFO}
		<!-- ENDIF -->	  
	</td>
</tr>

</table>

</form>

<!-- INCLUDE ucp_footer.html -->
I guess I need to improve my configuration management practices!
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

4 New Translations

Post by MarkDHamill »

mickeyr was kind enough to provide 4 translations, so I repackaged the archive. The translations are Mandarin Chinese, Spanish, Italian and French. You can download version 2.2.4 here.

I have been waiting more than a month for another phpBB Mod Team review. I am still waiting.
Last edited by MarkDHamill on Mon Aug 24, 2009 8:36 pm, edited 1 time in total.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Email Digests

Post by MarkDHamill »

I also added the code for SQLServer, thoughtfully provided by RedMax, to the archive.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
mickeyr
Registered User
Posts: 76
Joined: Wed Jun 03, 2009 8:55 pm

Re: [RC5] Email Digests

Post by mickeyr »

Hebrew and Korean Language coming soon.
elementi
Registered User
Posts: 1
Joined: Thu Sep 10, 2009 7:13 pm

Re: [RC5] Email Digests

Post by elementi »

hi,
is there planning so the 'Email digest' to be integrated as part of a package, meaning whould it be as part of phpBB 3.06.

i mean, i know how to install a phpbb forum as a fresh Install , but installing a MOD like digest, when i saw the installation instruction, i gave up. i didnt bohter to try at all. add some code here, add some text there find replace.
you've gotta be a hell of a Computer Academic?!?!
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Email Digests

Post by MarkDHamill »

No, I am afraid not. Not that I don't think it's a good idea, but it doesn't seem to be a feature set that the phpBB team is interested in. I am sure if it were to be integrated that it would be much changed, probably for the better.

As it is this mod is still trying for approval. In fact, it's been a couple months in the queue at this point awaiting a review.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
giorgino
Registered User
Posts: 33
Joined: Tue Dec 02, 2008 1:44 pm

Re: [RC5] Email Digests

Post by giorgino »

Hi Mark I love your mod! It's really good for users not in confidence with boards system like mine.

I have a question:

Can I start digests for old users registered before mod install? (The new users are activated from ACP setting)

I have another question: With php debug on I receive this message:
[phpBB Debug] PHP Notice: in file /includes/acp/acp_board.php on line 1046: Undefined variable: index

thank for your support!
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Email Digests

Post by MarkDHamill »

No far there is no feature allowing the Administrator to add digest subscriptions. Sorry, that should come at some point but it is hard to do.

It sounds like you found a small error. I will fix in the next version. You could turn debug off.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
giorgino
Registered User
Posts: 33
Joined: Tue Dec 02, 2008 1:44 pm

Re: [RC5] Email Digests

Post by giorgino »

MarkDHamill wrote:No far there is no feature allowing the Administrator to add digest subscriptions. Sorry, that should come at some point but it is hard to do.

It sounds like you found a small error. I will fix in the next version. You could turn debug off.
Yes of course, I've already done that :)

Can you suggest me the SQL query to change the send value from "nothing" to "daily" for all (old) users?
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Email Digests

Post by MarkDHamill »

Something like

Code: Select all

update phpbb_users
set user_digest_type = 'DAY'
where user_digest_type = 'NONE'
and user_type in (1, 3)
Depending on how many users you have you might want to randomize the digest send hour to even the load.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
giorgino
Registered User
Posts: 33
Joined: Tue Dec 02, 2008 1:44 pm

Re: [RC5] Email Digests

Post by giorgino »

MarkDHamill wrote:Something like

Code: Select all

update phpbb_users
set user_digest_type = 'DAY'
where user_digest_type = 'NONE'
and user_type in (1, 3)
Depending on how many users you have you might want to randomize the digest send hour to even the load.
Thank you Mark. Really :) My PHP & SQL knowledge is really poor (like my english too).

I need to set the hour to 5AM with the default settings changing only the sending option to "daily" and the 5AM send time. For all userse.

For modify the html template I've to change .css path (and create e new .css file) in ACP screen and modify the html.txt file, right?
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Email Digests

Post by MarkDHamill »

Remember that GMT is stored as the digest send hour. Offset from it to your local timezone. To make all users receive a digest at 5 AM GMT, SQL like this should work:

Code: Select all

update phpbb_users
set user_digest_send_hour_gmt = 5
Bear in mind that all this could be rather expensive to send out all digests at the same hour, since each digest is created individually. If you have only a few recipients it is not a big deal.

Please read go to the Link to DIY Instructions for suggestions on making other styles work with the Digests mod.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4366
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Digests 2.2.5 [RC6] Released

Post by MarkDHamill »

After much delay I got a review by the phpBB Mod Team and they offered lots of good suggestions and found some bugs too. I tried to include other bug fixes in this release but somethings I would like to do like make the mod UMIL and AutoMod compatible will have to wait for a while. There is not a whole lot of new functionality.

Download Here

Change log:

Code: Select all

    * subsilver2 files moved out of contrib folder
    * Fixed typo in ACP_DIGEST_USER_DEFAULT_SETTINGS_EXPLAIN language variable.
    * Removed DIGEST_12AM thru DIGEST_11PM language variables. Display hours are now created by a function. In mail_digests.php, the sent hour in the footer of the email rather than show the 24 hour time will show AM/PM if this is consistent with the user's date/time format.
    * Fixed bug that cased digest dates to appear inside a box if a pipe symbol (|) was present in the user's date/time format. phpBB uses this symbol to express relative time, which won't work for in a digest.
    * Added missing $db->sql_freeresults() statements.
    * Removed PHP Notices from write_log_entry function in mail_digests.php
    * Better security practices by typecasting variables in $user, SQL WHERE statemetns and from request_var function.
    * Changed <i> to <em> in affected code and templates.
    * /includes/ucp/ucp_digests.php will use $_SERVER['SCRIPT_NAME'] instead of $_SERVER['PHP_SELF'] when interacting with Microsoft IIS web servers.
    * Fixed bug in mail_digests_html.html template. Wrong boolean logic with S_USE_CLASSIC_TEMPLATE switch.[/quote]
    * Added {S_FORM_TOKEN} to ucp_digests_html.html. Also, made the subsilver2 version consistent with the prosilver version.
    * Removed some language and configuration variables that were unneded related to logging.
    * INSERT statements in these instructions do not carry IS_DYNAMIC values because they are assumed.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
drixie
Registered User
Posts: 76
Joined: Mon Apr 23, 2007 12:12 am

Re: [RC6] Email Digests

Post by drixie »

So, is it UMIL and Automod compatible now?

I didn't quite grab your statement regarding those two.
Locked

Return to “[3.0.x] MODs in Development”