##############################################################################################################
## MOD Title: Email Digests
## MOD Author: MarkDHamill < mhamill@computer.org > (Mark D. Hamill) http://www.potomactavern.org
## MOD Author, Secondary: Indemmity83 < Indemnity83@dormlife.us > (Kyle D. Klaus) http://www.dormlife.us
## MOD Author, Secondary: david63 < david.wood@pear-tree.org.uk > (David Wood) n/a
## MOD Description: Sends customized email digests of forum messages to subscribers
## MOD Version: 1.3.4
##
## Installation Level: Advanced
## Installation Time: 60 Minutes to several days, depending on whether you need to set up SSH and
##                    your skills at the server operating system command line.
##
## Files To Edit:	bbcode.php,	
##			constants.php,
##			admin_db_utilities.php,
##			admin_forums.php,
##			admin_groups.php,
##			admin_user_ban.php,
##			admin_users.php,
##			login.php,
##			page_header.php,
##			posting.php,
##			functions.php,
##			functions_post.php,
##			groupcp.php,
##			lang_main.php,
##			lang_faq.php,
##			usercp_register.php,
##			profile_add_body.tpl,
##			posting_body.tpl,
##			forum_edit_body.tpl,
##			group_edit_body.tpl,
##			groupcp_info_body.tpl,
##			overall_header.tpl,
##
## Included Files:	digests.php,
##			digests_common.php,
##			digests_user_cp.php,
##			install_digests.php,
##			mail_digests.php,
##			admin_digests_management.php,
##			admin_digests_add_users.php,
##			admin_digests_add_groups.php,
##			admin_digests_config.php,
##			admin_digests_confirm.php,
##			admin_digests_dump.php,
##			admin_digests_log.php,
##			admin_digests_mail.php,
##			admin_digests_verify.php,
##			digest_times.php,
##			functions_digests.php,
##			lang_digests.php,
##			mail_digests_confirm.tpl,
##			mail_digests_html.tpl,
##			mail_digests_text.tpl,
##			digests.tpl,
##			digests_management.tpl,
##			digests_config_body.tpl,
##			digests_confirm.tpl,
##			digests_dump.tpl,
##			digests_dump_body.tpl,
##			digests_log.tpl,
##			digests_mail.tpl,
##			digest_times.tpl,
##			digests_user_cp.tpl,
##			digests_verify.tpl,
##			digests_verify_body.tpl,
##			mail_digests.tpl,
##			digest_user_select_body.tpl,
##			icon_mini_digest.gif,
##			logo_digests.gif,
##			batch_scheduling.txt
##
############################################################################################################# 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the latest version of this MOD.
## Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such,
## phpBB will not offer support for MOD's not offered in our MOD-Database, located at: http://www.phpbb.com/mods/ 
#############################################################################################################
## Author Notes:
##
## PLEASE FOLLOW THESE STEPS TO INSTALL. Do not rely solely on the instructions at the end.
##
## 1. First READ but DO NOT IMPLEMENT the instructions in batch_scheduling.txt. If this is something
## beyond what you can do do not bother to install the mod, or seek help.
##
## 2.  Create the tables needed by running install_digests.php from your phpBB root directory.
## Warning: this has been tested only with MySQL. If you are using any other database you may need
## to change the SQL to make it work AND potentially change the SQL itself in the other scripts. If anybody
## is using a diffrent database than MySQL and would like to aid in testing, please contact Indemnity83.
##
## 3. If you are upgrading from a previous version make a backup of your tables right now, before doing
## anything. Because of changes to the database structure new tables need to be created and existing data
## imported. As with the MOD itself, the importer is BETA too. For more on upgrading see upgrade.txt
##
## 4. Test to see if the digest user interface is working correctly. Via URL invoke digests.php in 
## your phpBB root folder. Set it up so you receive a digest every hour.
##
## 5. Next, test to see if you can receive an email digest. Via ACP, run the "Mail Digests". You should see
## a text output indicating who received a digest, how many messages were sent and other information, that
## may or may not be usefull, along with a total count of the digests sent and some server date and time
## information. This will help in testing and resolving potential issues. Since this program is normally
## run automatically this information is not seen seen, but you can redirect output to a file if you wish
## (depending on how your server is configured). It may be an idea to turn logging on at this stage so that
## you have a record of what has been happening. If the digest was successfully sent it should appear in
## your email. 
##
## 6. Next enable the batch scheduling feature. Follow in instructions in batch_scheduling.txt and 
## test it. Schedule yourself to receive a digest every hour. Hopefully it will pop into your mailbox
## in an hour of setting up your digest.
##
## 7. If you get errors when you run mail_digests.php you may need to change line 40 to show the absolute
## path to phpBB on your server (e.g. '/subfolder/local/home/mysite/mysite.com/') It is dependant on how
## the server is configured. On some servers it will work with the relative path set but on others it
## needs the absolute path (not sure why!)
##
## Usage notes: 
##
## Most users who receive HTML digests using web based email programs like Yahoo! Mail will likely not 
## see cascading style sheets applied to the HTML email unless frames are enabled, with a frame for the 
## content of the email message. In the case of Yahoo! Mail, the message is displayed inside of a table 
## <td> tag. Yahoo! Mail strips out <link> and related tags and appears to shove whatever content is 
## between the <body> and the </body> tags of the email into the cell where the message appears. It
## all still works, just may not look as fancy (but still better than text).
##
## You can use any theme you have installed on your board to theme the digest. By default it will use
## whatever theme the user has set (unless you have an overriding theme set in the ACP). If you want 
## to overide both the board default and the user default (say you always want it to use subSilver, and 
## your boards default is someething else) then you can set OVERIDE_THEME to true, and then set DIGEST_THEME
## to the theme (from the database) of the theme you want to use. Any images will be striped out of the 
## theme, but colors sill stick and if the theme is well put together the colors will be at least close to the
## images that should be covering them. Note that the digest pulls the theme data from the database, NOT a css 
## file. 
##
## Currently the MOD is authored by Indemnity83, but it would definetly not be what it is now without 
## Mark D. Hamill's work to get it going. So my personal thanks go to Mark for the idea, and the oportunity
## to take the MOD even further. 
##
## Some of the code for the User magagement has been taken from the "Admin Userlist" mod by
## wGEric < eric@best-dev.com > (Eric Faerber) http://mods.best-dev.com/ 
##
## A Note From Mark:
## I would like to thank gregentin, dkklein, rabecasis, pengrus, m_longland, PeteBest and many others for
## Beta testing, their suggestions and improving the code. Without them this software would be much less
## useful AND professional.
##
## A Note From David:
## I would like to thank leecovuk for testing version 1.3.x so well, crazyass for putting me right with mssql
## and ChrissySkyking for the code used in "Urgent Digests" and the idea of "Test Mode"
##
############################################################################################################# 
## MOD History: 
## 
##   2003-09-28 - Version 1.0.0 
##      - Initial Release  
##   2003-10-03 - Version 1.0.1
##      - Cleaned up bug in mail_digests.php that incorrectly reported last access time if user
##        wants to filter out messages since they last touched the board.
##      - Added code provided by M Longland that allows users to set the maximum size of each message
##        to be included in the digest. WAS the value set in digest_constants.php. Now the user can 
##        select 50, 100, 150, 300, 600 or Maximum (32,000) characters.
##      - Enhanced message in digests.php so if someone is not logged in and wants a digest they are
##        reminded they have to register with the board first before they can enroll to receive 
##        a digest.
##      - batch_scheduling.txt provides good guidance for running scheduled tasks on a Windows 2000/XP
##        server.
##      - digest_tables.php adds a new column, text_length int(11) NOT NULL default '0' to the 
##        subscriptions table. If using a previous version you will need to manually add this
##        column to the subscriptions table. In addition you should update all rows in your 
##        subscriptions table so that existing users have a text_length value of 150, so as not 
##        to confuse them. Assuming the table is named phpbb_mod_subscriptions this SQL should work:
##        update phpbb_mod_subscriptions set text_length=150
##   2003-10-04 - Version 1.0.2
##      - Should now meet phpBB coding guidelines. No logic changes.
##   2003-10-15 - Version 1.0.3
##      - Minor changes to mail_digests.php to improve presentation of message text. BBcode is 
##        removed and in the HTML version any \n is converted to a <br /> tag. No other changes.
##   2003-10-31 - Version 1.0.4
##      - Now handles time zones correctly. User asks for digests to arrive based on their local time
##        (assumed to be the time zone set in their profile). If this is different from the server 
##        time zone, the server takes this into account. Note that the subscriptions table will
##        store the time zone based on server time. So 7 PM PST (hour 19) is stored as 22 if the 
##        server is hosted in EST. Changed: digests.php and two lines of code in digest_constants.php.
##        Note: if user changes their time zone in their profile, the hour to send the digest does NOT
##        change. To correct this would involve a hack to profile.php, that I considered unwise.
##   2003-11-06 - Version 1.0.5
##      - Time zone logic improved to use actual server time zone instead of board time zone, since 
##        board time zone may be set to a time different than the server time zone. This logic affects
##        digests.php. Also added helpful information to mail_digests.php that shows who received digests
##        for a given hour and how many digests were sent. This will only be seen if run manually such
##        as by URL, but if run from command line or batch output can be captured to a file in Unix or
##        Linux systems by piping.
##   2003-11-08 - Version 1.0.6
##      - Responding to MOD Team requests:
##        -- digests.php uses append_sid for the form URL
##        -- digests.tpl form action template variable name changed to {S_POST_ACTION}
##        -- These instructions changed to use a template variable for the digests URL in overall_header.tpl
##           and to indicate how page_header.php needs to be modified to pass the digests.php URL to  
##           overall_header.tpl
##        -- Cleaned up a few minor coding problems at variance with the coding standards
##      - Modified digest_constants.php to have two disclaimer messages, one for HTML formatted email and
##        one for text formatted email. This will keep the URLs from appearing in the disclaimer by 
##        default for text digests. Also fixed bug that was not displaying page title by adding the
##        language variable.
##      - Modified mail_digests.php to show toggle the disclaimer message depending on whether the digest
##        is html or text.
##      - Modified mail_digests_html.tpl so digest options and disclaimer show inside <p> tags, so styles
##        are applied.
##      - Added suggested_faq_text.txt file. Copy and paste into your lang_faq.php file if you want to 
##        provide answers to basic questions about the digest. Location in the FAQ is up to you depending
##        on how important you think it is.
##   2003-11-20 - Version 1.0.7
##      - digests.tpl modified to apply styles (work done by zocalo, thanks!) so interface presents
##        better. I also added a cell spacing of five pixels to make it easier to read.
##      - digest_constants.php changed to add digest explanation variable so it will be XHMTL 
##        compatible with modified digests.tpl. Removed digest_not_logged_in message.
##      - digests.php redirects users not logged in to login in page. Thanks to zocalo again for this
##        suggestion. There was a redundant call to use the template digests.tpl. The first call was 
##        removed.
##      - Slight changes in wording to suggested_faq_text.txt.
##      - These instructions to make changes to page_header.php have been changed. Now includes a 
##        line of code referencing digest_constants.php and uses a label variable I neglected to 
##        include in the last version
##   2003-12-30 - Version 1.0.8
##      - batch_scheduling.txt instructions changed to correct $phpbb_root_path for the URL-less approach
##      - digest_constants.php corrects problem many are experiencing with $siteURL, to add a / after the site
##        name if it is not there. This should reduce many installation problems.
##      - digest_tables.php modified to fix a tab problem in source code
##      - digests.php. Fixed some serious problems noted by the MOD team. POST variables are now wrapped with
##        function to eliminate potential SQL injection hacks. In addition incorporated their suggestions for
##        using variables to set $user_timezone, changed all occurrences of $userdata['session_user_id'] to
##        $userdata['$user_id'], and fixed some tab problems in the source code
##      - digests.tpl now has <span> tags to fix the "big print" problem many were complaining about
##      - mail_digests.php has time zone logic in it that was missing from the last release and fixed some tab 
##        problems in the source code
##      - suggested_faq_text.txt file removed from archive since it is now included in these installation 
##        instructions below
##   2004-04-06 - Version 1.0.9
##      - SQL commands are upper cased at the request of the mod team. Affects digests.php and
##	  mail_digests.php.
##        Please note that the programs are functionally identical so if it works in 1.0.8 you really do not
##	  need to upgrade to 1.0.9.
##      - Installation instructions below modified to use IN LINE AFTER, ADD per request from mod team.
##      - Updated comments in each program to say it is designed to work with phpBB 2.0.8 (works for me).
##	  However it should work fine in versions 2.0.6 and 2.0.7 too since they were used otherwise
##	  unmodified in these environments.
##   2004-04-20 - Version 1.1.0
##	- MOD Taken over by Indemnity83
##	- Changed confirmation message after modifying a digest to use message_die() to match standard phpBB
##	  ways. 
##	- Changed the way the list of user authorized forums are gathered, added a function auth_read() that
##	  returns an arry of all the forums, with a key to distinguish if its a readable forum for that user.
##	  Affected both digests.php, and mail_digests.php.
##	- Completely re-wrote mail_digests.php almost from scatch to acomplish two things. (1) to allow for a 
##	  themed digest message (when using HTML) and (2) to fix security holes and blemishes. 
##	- Part of mail_digests.php re-write involved the new ability for the digest to use the board/user
##	  default
##	  theme (from the database, not stylesheet). And allows for an override (see constants.php) to set
##	  a specific theme to be used.
##	- Revised code to build the $siteURL to fix problems with null strings, also moved to mail_digests.php 
##	- Renamed digest_emailer.php to functions_digests.php, as the auth_read() funciton was placed in that
##	  file
##	  along with the emailer class.
##	- Disbanded digests_constants.php, all the lang files went to lang_main.php, and the few constants left
##	  went to constants.php.
##	- Removed digests_post.tpl from the archive, and install instructions as it is no longer used.
##	- Revised the install instructions below for the new changes in file names, lang and constant
##	  declarations.
##	- Revised batch_scheduing.txt to include more batch scheduling options, including some for people
##	  without 
##	  Cron access. 
##   2004-04-22 - Version 1.1.1
##	- Corrected some spelling mistakes in install.txt and batch_scheduling.txt
##	- Fixed an incorrect include path in digest_tables.php
##	- Fixed breaking error in mail_digests.php that caused the main loop to not be reliable.
##   2004-09-04 - version 1.2.0
##	- Revised table installer, added support for multiple database structure (MySQL is still the only
##	  suppported and tested version).
##	- Created a table importer, for migrating data from previous versions into the new table structure
##	  (still 
##	  MySQL only at this point).
##	- Mail_digests.php now decides to send a digest or not based on the time since the last digest sent. 
##	  This makes for a much more reliable system, if the cron job fails, and a digest that should have 
##	  been sent wasn't, it will simply try again the next time the cron job executes.
##	- Increased, and formatted the output of mail_digests.php to hopefully help resolve bugs and
##	  installation
##	  issues.
##	- Removed the 32000 char send option, and replaced it with a "Full Post" option for clarity.
##	- Implemented the BBCode parser from search.php to show messages in digest exactly as they show on the 
##	  board.
##   2005-05-30 - version 1.3.0
##	- ACP options added.
##	- Digests have their own configuration table with data being moved from the constants file into this
##	  table.
##	- Additional frequencies added which can be configured from the ACP - an admin is able to set any
##	  frequency for a user.
##	- Digests can now be created for a usergroup with the group moderator having control of the digest
##	  settings. There is also the option for the moderator to receive/not receive copies of the digest.
##	- Added ability to have multiple digests but a forum can only appear in one digest - this means that
##	  you can have an hourly digest with forum A, a weekly digest with forum B and a daily with forum C
##	  but not a daily with forums A & B and a weekly with forums B & C.
##	- Digests now has its own language file instead of being in lang_main.
##	- Included digest common file.
##	- Modified database tables layout and new tables added for configuration and logging.
##	- Option for Admin to control send time - the time can be either pre determined by the admin (which
##	  gives the ability to control how many messages are sent at one time if there should be a problem
##	  with mail server overload) or to use the system time (which means that the time for the digest
##	  will start from the time that the digest record is created)
##	- Revised install file which will automatically detect a previous version and convert the data.
##	- Checked to be compliant with version 2.0.15 of phpBB.
##	- Digest text length is now either none (no text included in the digest), full (all of the text
##	  included in the digest) or short which a value set by the Admin.
##	- Included digest sign up option after successful registration - this means that you can direct a
##	  new user to the digest options upon their first login after registration. The minimum that they
##	  would have to do would be to click on the "Make Digest Changes" button. By doing this there is no
##	  spamming taking place as the user is accepting the digest.
##	- Ability to have option for auto subscribing to a specified usergroup - this will automatically add
##	  a user into a specified usergroup upon logging in for the first time after registration. It would
##	  probably be an idea to modify the regisration agreement to say that they will be added to the group
##	  and will receive digests - again an anti spam measure.
##	- Digest logging added.
##	- There is an added facility to verify the database tables to ensure that all the users in the
##	  digest tables are valid users.
##	- When a user is deleted, via the ACP, their digest data will also be deleted.
##	- email_digests.php now checks that a user is active and if not does not send the digest.
##	- Digests can be made non active either at digest level or globally (either by user digests
##	  and/or group digests)
##	- There is the facility to have users confirm that they still want to receive digests.
##	- Checked to work with Easymod 0.1.13.
##	- The Digest tables are included in the standard phpbb database backup.
##	- mail_digests.php is now language compliant.
##	- mail_digests_html.tpl now uses a stylesheet.
##	- mail_digests.php moved to the admin folder and uses standard phpbb security - no need to password
##	  protect a special folder.
##	- mail_digests.php now uses template.
##	- mail_digests now uses standard phpbb error reporting.
##	- mail_digests can now only be run by either a Cron job or from the ACP (this is for added security)
##	- Banning a user will stop the mailing of user digests (unbanning will restore digests)
##	- mail_digests.php will check if an SMTP entry is in the config file and if so will then check that
##	  it is accessible before sending the digests. If the server is not available then the digests will
##	  not be sent at this time but will wait until the next run for processing.
##	- The date format can be selected from the ACP.
##	- Forums can be included/excluded from the list in digests - amended by Forum Management in ACP.
##	- Digests can be run in Test Mode - this means that digests will not be mailed out.
##	- There is the facility to have "Urgent" digests where a post can be marked as "Urgent" and sent out
##	  before the normal run. In order for a user to utilise this facility they must be subscribed to
##	  that forum (this is to prevent maluse of this facility), the Admin will need to activate the
##	  facility via the ACP and another Cron job will need to be set up. This second Cron job will be
##	  almost identical to the first except that the timing will need to be set to, say, every two minutes
##	  and after mail_digests.php leave a space and the enter the word urgent.
##	- Regular output from the Cron job can be supressed - errors will still be output.
##   2005-07-01 - version 1.3.1
##	- admin_digests_config.php made phpbb compliant.
##	- mail_digests.php now uses the standard phpbb mailer class.
##	- Removed bug caused by having "include('./page_header_admin.'.$phpEx);" in some admin scripts twice.
##	  Only became a problem if "GZip Compression" was enabled. (sparker)
##	- Fault with site URL in admin_digests_confirm.php fixed. (Richard)
##	- New function added for site URL - affects mail_digests.php and admin_digests_confirm.php.
##	- Minor changes in lang_digests.php file.
##	- Option to allow include/exclude forums added (Admin configurable).
##	- Fixed invalid use of mysql_insert_id() in digests.php. (crazyass)
##	- Sql for MSSQL database by crazyass.
##	- Removed auth_read function - digests now uses the standard phpbb auth function - idea suggested
##	  by kernon.
##	- Removed digest_smilies_pass function - digests now uses the standard phpbb smilies_pass function.
##	- Removed init_digest_userprefs function - digests now uses the standard phpbb init_userprefs function.
##	- Removed setup_digest_style function - digests now uses the standard phpbb setup_style function.
##	- Amended to use an official PAGE_constant.
##	- Restricted access to "Email Digests" if user not logged in.
##	- Checked to be compliant with version 2.0.16 of phpBB.
##	- Added an Admin option to allow mail_digests.php to be run directly with a password - required where
##	  it is run by a scheduler other than Cron. (See batch_scheduling.txt for details)
##	- Amended to use either .css file or themes table in mail_digest.php.
##	- Deleting a forum will remove the forum from the digest forums table.
##	- Some code corrections in several files.
##   2005-08-03 - version 1.3.2
##	- Amended to allow an additional choice of using style from overall_header.tpl.
##	- Corrected a fault in the install_digests.php script that prevented previous users being copied
##	  over to this version.
##   2005-08-07 - version 1.3.3
##	- Included option to show poster's IP address on the digest (wkdwich).
##	- Amended digests.php to show a forum that does not contain any posts - this was being ommitted
##	  from the list of forums (Indemnity83)
##	- Fixed problem with admin_digests_config.php - it had not been amended to use the phpBB emailer
##	  function (leecovuk)
##	- Fixed bug in mail_digests.php where an error occurred if there were no authorised forums for a
##	  user (Indemnity83)
##	- Checked to work with Easymod 0.2.0a.
##	- Fixed bug where empty drop-down list was being created for digest group. (leecovuk)
##	- Corrected table definition for group_digest in phpbb_groups table. (leecovuk)
##   2005-07-22 - version 1.3.4
##	- Corrected fault with default frequency in Digests Configuration (Neticus)
##	- Fixed bug where a group digest could be created when there were no valid groups (Indemnity83)
##	- Fixed bug whereby the correct forums were not being displayed in mail_digests.php - problem
##	  with auth access. (leecovuk)
##	- Fixed sql error in admin_confirm_digests.php (leecovuk)
##	- Added option to show forum description when moving the mouse over the forum title on the
##	  digests form (Neticus)
##	- Fixed problem with ' in Digest Name when using mssql (crazyass)
##	- Fixed incompatability problem with mail2forum mod (leecovuk)
##	- Added count of posts to digest log.
##	- Fixed error generated when post contained bbcode.
##	- Fixed redirect in Confirm Digests (leecovuk)
##	- Extended Admin digests Verify to check digest groups.
##	- Dropped the subscribed_id field from the digest_forums table as it may cause problems in the future.
##	- Added filtering in Digest Log (knigthshade)
##	- Checked to be compliant with version 2.0.17 of phpBB.
## 
############################################################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#############################################################################################################
# 
#-----[ COPY ]------------------------------------------
#
copy digests.php to digests.php
copy digests_common.php to digests_common.php
copy digests_user_cp.php to digests_user_cp.php
copy install_digests.php to install_digests.php
copy admin/admin_digests_management.php to admin/admin_digests_management.php
copy admin/admin_digests_add_users.php to admin/admin_digests_add_users.php
copy admin/admin_digests_add_groups.php to admin/admin_digests_add_groups.php
copy admin/admin_digests_config.php to admin/admin_digests_config.php
copy admin/admin_digests_confirm.php to admin/admin_digests_confirm.php
copy admin/admin_digests_dump.php to admin/admin_digests_dump.php
copy admin/admin_digests_log.php to admin/admin_digests_log.php
copy admin/admin_digests_mail.php to admin/admin_digests_mail.php
copy admin/admin_digests_verify.php to admin/admin_digests_verify.php
copy admin/digest_times.php to admin/digest_times.php
copy admin/mail_digests.php to admin/mail_digests.php
copy includes/functions_digests.php to includes/functions_digests.php
copy language/lang_english/lang_digests.php to language/lang_english/lang_digests.php
copy language/lang_english/email/mail_digests_confirm.tpl to language/lang_english/email/mail_digests_confirm.tpl
copy language/lang_english/email/mail_digests_html.tpl to language/lang_english/email/mail_digests_html.tpl
copy language/lang_english/email/mail_digests_text.tpl to language/lang_english/email/mail_digests_text.tpl
copy templates/subSilver/digests.tpl to templates/subSilver/digests.tpl
copy templates/subSilver/digests_user_cp.tpl to templates/subSilver/digests_user_cp.tpl
copy templates/subSilver/admin/digests_management.tpl to templates/subSilver/admin/digests_management.tpl
copy templates/subSilver/admin/digests_config_body.tpl to templates/subSilver/admin/digests_config_body.tpl
copy templates/subSilver/admin/digests_confirm.tpl to templates/subSilver/admin/digests_confirm.tpl
copy templates/subSilver/admin/digests_dump.tpl to templates/subSilver/admin/digests_dump.tpl
copy templates/subSilver/admin/digests_dump_body.tpl to templates/subSilver/admin/digests_dump_body.tpl
copy templates/subSilver/admin/digests_log.tpl to templates/subSilver/admin/digests_log.tpl
copy templates/subSilver/admin/digests_mail.tpl to templates/subSilver/admin/digests_mail.tpl
copy templates/subSilver/admin/digest_times.tpl to templates/subSilver/admin/digest_times.tpl
copy templates/subSilver/admin/digests_verify.tpl to templates/subSilver/admin/digests_verify.tpl
copy templates/subSilver/admin/digests_verify_body.tpl to templates/subSilver/admin/digests_verify_body.tpl
copy templates/subSilver/admin/digests_user_select_body.tpl to templates/subSilver/admin/digests_user_select_body.tpl
copy templates/subSilver/admin/digests_user_lookup_body.tpl to templates/subSilver/admin/digests_user_lookup_body.tpl
copy templates/subSilver/admin/mail_digests.tpl to templates/subSilver/admin/mail_digests.tpl
copy templates/subSilver/images/icon_mini_digest.gif to templates/subSilver/images/icon_mini_digest.gif
copy templates/subSilver/images/logo_digests.gif to templates/subSilver/images/logo_digests.gif
#
#-----[ SQL ]--------
#
CREATE TABLE phpbb_digests (
	digest_id int(6) NOT NULL auto_increment,
	digest_name varchar(25) NULL default '',
	user_id mediumint(8) NOT NULL default '0',
	digest_type tinyint(1) NOT NULL default '0',
	digest_activity tinyint(1) NOT NULL default '1',
	digest_frequency mediumint(8) NOT NULL default '0',
	last_digest int(11) NOT NULL default '0',
	digest_format smallint(4) NOT NULL default '0',
	digest_show_text smallint(4) NOT NULL default '0',
	digest_show_mine smallint(4) NOT NULL default '0',
	digest_new_only smallint(4) NOT NULL default '0',
	digest_send_on_no_messages smallint(4) NOT NULL default '1',
	digest_moderator tinyint(1) NOT NULL default '0',
	digest_include_forum tinyint(1) NOT NULL default '1',
	PRIMARY KEY  (digest_id),
	KEY user_id (user_id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

CREATE TABLE phpbb_digests_forums (
	user_id mediumint(8) NOT NULL default '0',
	forum_id smallint(5) NOT NULL default '0',
	digest_id int(11) NOT NULL default '0',
	KEY user_id (user_id),
	KEY forum_id (forum_id)
) TYPE=MyISAM;

CREATE TABLE phpbb_digests_log (
	log_time int(11) NOT NULL default '0',
	run_type tinyint(1) NOT NULL default '0',
	user_id mediumint(8) NOT NULL default '0',
	digest_frequency mediumint(8) NOT NULL default '0',
	digest_type tinyint(1) NOT NULL default '0',
	group_id mediumint(8) NOT NULL default '1',
	log_status mediumint(2) NOT NULL default '0',
	log_posts int(11) NULL default 0;
	KEY user_id (user_id)
) TYPE=MyISAM;

CREATE TABLE phpbb_digests_config (
	config_name varchar(255) NOT NULL default '',
	config_value varchar(255) NOT NULL default '0',
	PRIMARY KEY  (config_name)
) TYPE=MyISAM;

INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('activity_threshold', '90');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_daily', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_direct_run', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_exclude', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours1', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours2', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours4', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours6', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours8', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_hours12', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_monthly', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_urgent', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('allow_weekly', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('auto_subscribe', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('auto_subscribe_group', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('check_user_activity', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_format', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_frequency', '24');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_new_only', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_send_on_no_messages', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_show_mine', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_show_text', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('default_text_length_type', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_date_format', 'D d-M-Y \a\t H:i:s');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_disable_group', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_disable_user', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_logging', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_subject', '');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_theme', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('digest_version', '1.3.4');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('direct_password', '');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('home_page', 'index');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('log_days', '8');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('monthly_day', '28');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('new_sign_up', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('override_theme', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('pm_notify', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('pm_display', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('run_urgent_only', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('run_time', '18');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('short_text_length', '150');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('show_forum_description', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('show_ip', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('show_stats', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('supress_cron_output', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('test_mode', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('theme_type', '0');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('urgent_run_required', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('use_system_time', '1');
INSERT INTO phpbb_digests_config (config_name, config_value) VALUES ('weekly_day', '0');

ALTER TABLE phpbb_users ADD user_digest_status tinyint(1) default '0' NOT NULL;

ALTER TABLE phpbb_user_group ADD digest_confirm_date int(11) default '0' NOT NULL;

ALTER TABLE phpbb_forums ADD forum_digest tinyint(1) default '1' NOT NULL;

ALTER TABLE phpbb_groups ADD group_digest tinyint(1) default '0' NOT NULL;

ALTER TABLE phpbb_posts ADD urgent_post tinyint(1) default '0' NOT NULL;
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('confirm');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
else if (isset($HTTP_POST_VARS['digest_confirm']) && $group_id)
{
	$sql = "UPDATE " . USER_GROUP_TABLE . " 
		SET digest_confirm_date = 0 
		WHERE user_id = ". $userdata['user_id'] . "
		AND group_id = $group_id";

	if (!($result = $db->sql_query($sql)))
	{
		message_die(GENERAL_ERROR, 'Could not update digest confirmation', '', __LINE__, __FILE__, $sql);
	}

	redirect(append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id"));
}
else if (isset($HTTP_POST_VARS['digest_options']) && $group_id)
{
		redirect(append_sid($phpbb_root_path . "digests.$phpEx?user_id=$group_id&mode=group&digest_type=1"));

}
#
#-----[ FIND ]------------------------------------------
#
if ( !($group_info = $db->sql_fetchrow($result)) )
	{
		message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); 
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#

	$group_digest = $group_info['group_digest'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending
#
#-----[ IN-LINE FIND ]------------------------------------------
#
ug.user_pending
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, ug.digest_confirm_date
#
#-----[ FIND ]------------------------------------------
#
				$is_group_member = TRUE;
#
#-----[ AFTER, ADD ]------------------------------------------
#

				if ( $group_members[$i]['digest_confirm_date'] != 0 )
				{
					$confirm_outstanding = TRUE;
				}
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_unsubscribe_group_input', array());
#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( $confirm_outstanding )
		{
			$template->assign_block_vars('digest_confirm_input', array());
		}
#
#-----[ FIND ]------------------------------------------
#
'L_UPDATE' => $lang['Update'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'L_GROUP_DIGEST' => $lang['Group_digest'],
		'L_DIGEST_OPTIONS' => $lang['Digest_options'],
		'L_DIGEST_CONFIRM' => $lang['Digest_confirm_title'],
#
#-----[ FIND ]------------------------------------------
#
if ( $is_moderator )
	{
		$template->assign_block_vars('switch_mod_option', array());
		$template->assign_block_vars('switch_add_member', array());
#
#-----[ AFTER, ADD ]------------------------------------------
#

		if ($group_digest == TRUE)
		{
			$template->assign_block_vars('switch_digest_option', array());
		}
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'digests_common.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT user_id, username, user_password, user_active, user_level
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_level
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,user_digest_status
#
#-----[ FIND ]------------------------------------------
#
if( $session_id )
					{
						$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
#
#-----[ AFTER, ADD ]------------------------------------------
#

						if ($row['user_digest_status'] > 0)
						{
							if (($row['user_digest_status'] == 1) || ($row['user_digest_status'] == 3))
							{
								$sql = "INSERT INTO " . USER_GROUP_TABLE . "
									(group_id, user_id, user_pending)
									VALUES (".$digest_config['auto_subscribe_group'].", ".$row['user_id'].", 0)";

								if (!($result = $db->sql_query($sql)))
								{
									message_die(GENERAL_ERROR, 'Could not insert data into user groups table', '', __LINE__, __FILE__, $sql);
								}
							}

							if (($row['user_digest_status'] == 2) || ($row['user_digest_status'] == 3))
							{
								$url = 'digests.php';
							}

							$sql = "UPDATE " . USERS_TABLE . "
								SET user_digest_status = '0'
								WHERE user_id = ".$row['user_id']."";

							$result = $db->sql_query($sql);
						}
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'digests_common.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] );
#
#-----[ AFTER, ADD ]------------------------------------------
#
$urgent_post = ( !empty($HTTP_POST_VARS['urgent_post']) ) ? TRUE : 0;
#
#-----[ FIND ]------------------------------------------
#
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$attach_sig,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 $urgent_post,
#
#-----[ FIND ]------------------------------------------
#
if( $user_sig != '' )
{
	$template->assign_block_vars('switch_signature_checkbox', array());
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($userdata['session_logged_in'] && $is_auth['auth_read']) 
{ 
	if (($mode != 'editpost') || (($mode == 'editpost') && ($post_info['poster_id'] != ANONYMOUS))) 
	{ 
		$urgent_run = get_urgent_run($userdata['user_id'], $forum_id, $digest_config['allow_urgent']);
		if ($urgent_run == TRUE)
		{
			$template->assign_block_vars('switch_urgent_checkbox', array());
		}
	} 
}

#
#-----[ FIND ]------------------------------------------
#
	'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
	'L_URGENT_POST' => $lang['Urgent_post'],
#
#-----[ FIND ]------------------------------------------
#
	'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '', 
#
#-----[ AFTER, ADD ]------------------------------------------
#
	'S_URGENT_CHECKED' => ( $urgent_post ) ? 'checked="checked"' : '',
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_db_utilities.php
#
#-----[ FIND ]------------------------------------------
#
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'confirm'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'digests', 'digests_config', 'digests_forums'
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php
#
#-----[ FIND ]------------------------------------------
#
				$forumstatus = $row['forum_status'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
				$forum_digest = $row['forum_digest'];
#
#-----[ FIND ]------------------------------------------
#
				$forum_id = ''; 
				$prune_enabled = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#				
				$forum_digest = 1; 
#
#-----[ FIND ]------------------------------------------
#
				'L_FORUM_STATUS' => $lang['Forum_status'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
				'L_DIGEST' => $lang['Allow_forum_digest'],
#
#-----[ FIND ]------------------------------------------
#
				'L_DAYS' => $lang['Days'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
				'L_YES' => $lang['Yes'],
				'L_NO' => $lang['No'],

				'FORUM_DIGEST_CHECKED_YES' => ($forum_digest == true) ? 'checked="checked"' : '',			
				'FORUM_DIGEST_CHECKED_NO' => ($forum_digest == false) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
#
#-----[ IN-LINE FIND ]------------------------------------------
#
forum_status,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 forum_digest,
#
#-----[ FIND ]------------------------------------------
#
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
intval($HTTP_POST_VARS['forumstatus']) . ",
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 " . intval($HTTP_POST_VARS['forum_digest']) . ",
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ",
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 forum_digest = " . intval($HTTP_POST_VARS['forum_digest']) . ",
#
#-----[ FIND ]------------------------------------------
#
$sql = "DELETE FROM " . PRUNE_TABLE . "
				WHERE forum_id = $from_id";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't delete forum prune information!", "", __LINE__, __FILE__, $sql);
			}
#
#-----[ AFTER, ADD ]------------------------------------------
#

			$sql = "DELETE FROM " . DIGEST_FORUMS_TABLE . "
				WHERE forum_id = $from_id";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't delete digest forum data", "", __LINE__, __FILE__, $sql);
			}
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_groups.php
#
#-----[ FIND ]------------------------------------------
#
$group_info = array (
			'group_name' => '',
			'group_description' => '',
			'group_moderator' => '',
			'group_type' => GROUP_OPEN
#
#-----[ IN-LINE FIND ]------------------------------------------
#
GROUP_OPEN
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,
			'group_digest' => 0
#
#-----[ FIND ]------------------------------------------
#
		'L_YES' => $lang['Yes'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'L_NO' => $lang['No'],
		'L_GROUP_DIGESTS' => $lang['Group_digests'],
		'L_GROUP_DIGESTS_EXPLAIN' => $lang['Group_digest_explain'],
#
#-----[ FIND ]------------------------------------------
#
		'S_GROUP_HIDDEN_CHECKED' => $group_hidden,
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'S_GROUP_DIGEST_YES' => ($group_info['group_digest']) ? 'checked="checked"' : '',
		'S_GROUP_DIGEST_NO' => (!$group_info['group_digest']) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
		$group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
		$group_digest = isset($HTTP_POST_VARS['group_digest']) ? $HTTP_POST_VARS['group_digest'] : '';
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . GROUPS_TABLE . "
				SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator
#
#-----[ IN-LINE FIND ]------------------------------------------
#
group_moderator = $group_moderator
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, group_digest = $group_digest
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user
#
#-----[ IN-LINE FIND ]------------------------------------------
#
group_single_user
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, group_digest
#
#-----[ FIND ]------------------------------------------
#
VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator,	'0'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'0'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $group_digest
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_user_ban.php
#
#-----[ FIND ]------------------------------------------
#
require('./pagestart.' . $phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'digests_common.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
if ( !$in_banlist )
		{
			$kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . "session_user_id = " . $user_list[$i];

			$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid)
				VALUES (" . $user_list[$i] . ")";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
			}
#
#-----[ AFTER, ADD ]------------------------------------------
#
			digest_ban($user_list[$i], 0);
#
#-----[ FIND ]------------------------------------------
#
if ( isset($HTTP_POST_VARS['unban_user']) )
	{
		$user_list = $HTTP_POST_VARS['unban_user'];

		for($i = 0; $i < count($user_list); $i++)
		{
			if ( $user_list[$i] != -1 )
			{
				$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
			}
#
#-----[ AFTER, ADD ]------------------------------------------
#
			digest_ban($user_list[$i], 1);
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
			$sql = "DELETE FROM " . BANLIST_TABLE . "
				WHERE ban_userid = $user_id";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql);
			}
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "DELETE FROM " . DIGEST_TABLE . "
				WHERE user_id = $user_id";
			if (!$db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not delete user from digests table', '', __LINE__, __FILE__, $sql);
			}

			$sql = "DELETE FROM " . DIGEST_FORUMS_TABLE . "
				WHERE user_id = $user_id";
			if (!$db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not delete user from digest forums table', '', __LINE__, __FILE__, $sql);
			}
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
define("BBCODE_UID_LEN", 10);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path . 'includes/functions_digests.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
function smilies_pass($message)
{
	static $orig, $repl;
#
#-----[ AFTER, ADD ]------------------------------------------
#
	$siteURL = get_site_url();
#
#-----[ FIND ]------------------------------------------
#
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$repl[] = '<img src="' . $siteURL . '/' . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('PAGE_TOPIC_OFFSET', 5000);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
define('PAGE_DIGEST', -2025);
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Digests MOD
define('DIGEST_TABLE', $table_prefix.'digests');
define('DIGEST_FORUMS_TABLE', $table_prefix.'digests_forums');
define('DIGEST_CONFIG_TABLE', $table_prefix.'digests_config');
define('DIGEST_LOG_TABLE', $table_prefix.'digests_log');
#
#-----[ OPEN ]------------------------------------------
#
includes/emailer.php
#
#-----[ FIND ]------------------------------------------
#
function send()
#
#-----[ REPLACE WITH ]------------------------------------------
#
function send($is_html = '')
#
#-----[ FIND ]------------------------------------------
#
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '')  . (($bcc != '') ? "Bcc: $bcc\n" : '');
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($is_html)
		{
 			$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '')  . (($bcc != '') ? "Bcc: $bcc\n" : '');
		}
		else 
		{
			$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '')  . (($bcc != '') ? "Bcc: $bcc\n" : '');
		}
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
function init_userprefs($userdata)
{
	global $board_config, $theme, $images;
	global $template, $lang, $phpEx, $phpbb_root_path;
	global $nav_links;
#
#-----[ REPLACE WITH ]------------------------------------------
#
function init_userprefs($userdata, $mode = '')
{
	global $board_config, $theme, $images;
	global $lang, $phpEx, $phpbb_root_path;
	global $nav_links;

	if ($mode != 'digest')
	{
		global $template;
	}
#
#-----[ FIND ]------------------------------------------
#
if ( $theme = setup_style($userdata['user_style']) )
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $theme = setup_style($userdata['user_style'], $mode) )
#
#-----[ FIND ]------------------------------------------
#
$theme = setup_style($board_config['default_style']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
$theme = setup_style($board_config['default_style'], $mode);
#
#-----[ FIND ]------------------------------------------
#
function setup_style($style)
{
	global $db, $board_config, $template, $images, $phpbb_root_path;
#
#-----[ REPLACE WITH ]------------------------------------------
#
function setup_style($style, $mode = '')
{
	global $db, $board_config, $images, $phpbb_root_path;

	if ($mode != 'digest')
	{
		global $template;
	}
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$attach_sig,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 &$urgent_post,
#
#-----[ FIND ]------------------------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, urgent_post) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $urgent_post)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
#
#-----[ FIND ]------------------------------------------
#
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
#
#-----[ AFTER, ADD ]------------------------------------------
#
if($urgent_post) 
    { 
		$sql = "UPDATE " . DIGEST_CONFIG_TABLE . "
			SET config_value = 1
			WHERE config_name = 'urgent_run_required'";

		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error updating digest config table', '', __LINE__, __FILE__, $sql);
		}
		  
        $message = $lang['Urgent_stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>'); 
   }    
   else 
   { 
#
#-----[ FIND ]------------------------------------------
#
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
	'L_MEMBERLIST' => $lang['Memberlist'], 
#
#-----[ AFTER, ADD ]------------------------------------------
#
	'L_DIGESTS' => $lang['Digests'], 
#
#-----[ FIND ]------------------------------------------
#
	'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx), 
#
#-----[ AFTER, ADD ]------------------------------------------
#
	'U_DIGESTS' => append_sid('digests_user_cp.'.$phpEx),	
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
//
// Check and initialize some variables if needed
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'digests_common.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
	if ( $mode == 'register' )
	{
		$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : $board_config['allow_sig'];

		$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $board_config['allow_html'];
		$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $board_config['allow_bbcode'];
		$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$digest_auto = (isset($HTTP_POST_VARS['digest_auto'])) ? (($HTTP_POST_VARS['digest_auto']) ? 1 : 0) : $digest_config['auto_subscribe'];
		$digest_new = (isset($HTTP_POST_VARS['digest_new'])) ? (($HTTP_POST_VARS['digest_new']) ? 2 : 0) :  $digest_config['new_sign_up'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allow_pm
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_digest_status
#
#-----[ FIND ]------------------------------------------
#
 $user_lang) . "', $user_style, 0, 1
#
#-----[ IN-LINE FIND ]------------------------------------------
#
 1
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, ".($digest_auto + $digest_new)." 
#
#-----[ FIND ]------------------------------------------
#
	if ( $mode == 'editprofile' )
	{
		$template->assign_block_vars('switch_edit_profile', array());
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	if ($mode == 'register')
	{
		if ($digest_config['auto_subscribe'] == 1)
		{
			$template->assign_block_vars('switch_auto_subscribe_digest', array());
		}

		if ($digest_config['new_sign_up'] == 1)
		{
			$template->assign_block_vars('switch_new_sign_up', array());
		}
	}
#
#-----[ FIND ]------------------------------------------
#
'SMILIES_STATUS' => $smilies_status,
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'DIGEST_AUTO_YES' => ( $digest_auto ) ? 'checked="checked"' : '',
		'DIGEST_AUTO_NO' => ( !$digest_auto ) ? 'checked="checked"' : '',
		'DIGEST_NEW_YES' => ( $digest_new ) ? 'checked="checked"' : '',
		'DIGEST_NEW_NO' => ( !$digest_new ) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'L_DIGEST_AUTO' => sprintf($lang['Digest_user_auto'], get_group_name($digest_config['auto_subscribe_group'])),
		'L_DIGEST_NEW' => $lang['Digest_user_new'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_faq.php
#
#-----[ FIND ]------------------------------------------
#
//
// This ends the FAQ entries
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$faq[] = array("--","Email Digests");
$faq[] = array("What are Digests?", "Digests are email messages sent to you periodically with a summary of the postings made here.");
$faq[] = array("Why would I want a digest?", "It makes your life easier. You do not have to explicitly visit this site to see what conversations are going on around here. Just read your digest and if there is a topic that seems of interest, click on it in your email program and start participating! Unsubscribe at any time.");
$faq[] = array("How often are digests sent?", "You pick how often they are sent. You can select the frequency between digests when you set them up. So if its a busy forum, and you always want to be on top setup the digest to be sent every hour. If its a slow forum, and you just want to keep a lazy eye, use something like daily or weekly.");
$faq[] = array("Suppose I do not want summaries of every message here. Can I be selective?", "Yes. You can pick the forum or forums that interest you. By default you will get messages for all forums that you are allowed to access.");
$faq[] = array("Can I have more than one digest?", "Yes, you can have several digests, each with their own frequency - but a forum can only be in one digest. For example you can Forum A & Forum D every hour, you can have Forum G daily, you can have Forum C weekly and you can have Forum B, Forum E & Forum F monthly. This way you will only be notified of postings once.");
$faq[] = array("What email message formats are available?", "We can send you HTML or text. Unless your email program cannot handle HTML (very unusual these days) we suggest HTML. Frankly, text digests look pretty plain and are harder to use. That is the nature of plain text.");
$faq[] = array("Do I get the whole message text in the digest?", "By default you get the first 150 characters of the text, or you can elect to see either all of the message text or just see the topic subject instead. We recommend keeping the default message length because otherwise your digests may get so big as to be unusable. We have also heard that very large digests may be rejected by your ISP or put you over your server storage quota. An excerpt reduces bandwidth and is usually all that is needed. Why? Because each message has a convenient link that will take you to the topic or message of interest.");
$faq[] = array("How do I get started?", "Just click on the Digests link near the top right part of any page. Or if you prefer <a href=\"./digests_user_cp.php\">click here</a>.");
$faq[] = array("Can I unsubscribe?", "Of course! Just go to the same page and check the  \"Delete this digest\" box. Then submit the form. Your subscription, to that digest, will end immediately.");
$faq[] = array("Are digests commercial free?", "Of course. There are no annoying ads nor will there ever be any on our site.");
$faq[] = array("Is my privacy protected?", "Yes, your digest is sent to you at the email address you gave us in your profile. Think of the digest as a special edition newspaper customized just for you. Someone else is likely getting a completely different digest."); 
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#

//
// Digest Mod
//
$lang['Digests'] = 'Email Digests';
$lang['Digest_options'] = 'Digest Options';
$lang['Digest_confirm_title'] = 'Confirm Digest Subscription';
$lang['Digest_user_auto'] = 'Upon successful registration automatically subscribe me into the %s digest group';
$lang['Digest_user_new'] = 'Upon successful registration let me select my digest options';
$lang['Group_digests'] = 'Allow group digests';
$lang['Group_digest_explain'] = 'Set to Yes if you want the group moderator to be able to setup a digest for the members of this group. If set to No then the moderator will not be able to configure a digest.';
$lang['Group_digest'] = 'Group digest';
$lang['Urgent_post'] = 'Check this box if this is an URGENT message (to initiate an immediate Digest mailing). Do NOT abuse this feature.  It could take 30 seconds or more for the confirmation page to appear!  Do not click the SUBMIT button more than once!'; 
$lang['Urgent_stored'] = 'Your Urgent message has been entered successfully and the Urgent Digests will be sent out shortly.'; 
$lang['Allow_forum_digest'] = 'Allow digests for this forum';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/groupcp_info_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END switch_unsubscribe_group_input -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN digest_confirm_input -->
		<input class="mainoption" type="submit" name="digest_confirm" value="{L_DIGEST_CONFIRM}" />
		<!-- END digest_confirm_input -->
#
#-----[ FIND ]------------------------------------------
#
<!-- END switch_mod_option -->
#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- BEGIN switch_digest_option -->
	<tr>
		<td class="row1" width="20%"><span class="gen">{L_GROUP_DIGEST}:</span></td>
		<td class="row2"><span class="gen"><input class="mainoption" type="submit" name="digest_options" value="{L_DIGEST_OPTIONS}" /></span></td>
	</tr>
	<!-- END switch_digest_option -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_user_logged_out -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#

<!-- BEGIN switch_user_logged_in -->
&nbsp;<a href="{U_DIGESTS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_digest.gif" width="12" height="13" border="0" alt="{L_DIGESTS}" hspace="3" />{L_DIGESTS}</a>&nbsp;
<!-- END switch_user_logged_in -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_notify_checkbox -->
		  <tr> 
			<td> 
			  <input type="checkbox" name="notify" {S_NOTIFY_CHECKED} />
			</td>
			<td><span class="gen">{L_NOTIFY_ON_REPLY}</span></td>
		  </tr>
		  <!-- END switch_notify_checkbox -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_urgent_checkbox --> 
		 <tr> 
			<td> 
				<input type="checkbox" name="urgent_post" {S_URGENT_CHECKED}/> 
			</td> 
			<td><span class="gen">{L_URGENT_POST}</span></td> 
		 </tr> 
		  <!-- END switch_urgent_checkbox --> 
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2"> 
	<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
	<span class="gen">{L_YES}</span>&nbsp;&nbsp; 
	<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
	<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	<!-- BEGIN switch_auto_subscribe_digest -->
	<tr> 
	  <td class="row1"><span class="gen">{L_DIGEST_AUTO}:</span></td>
	  <td class="row2">
		<input type="radio" name="digest_auto" value="1" {DIGEST_AUTO_YES} /><span class="gen">&nbsp;{L_YES}</span>&nbsp;&nbsp;
		<input type="radio" name="digest_auto" value="0" {DIGEST_AUTO_NO} /><span class="gen">&nbsp;{L_NO}</span></td>
	</tr>
	<!-- END switch_auto_subscribe_digest -->
	
	<!-- BEGIN switch_new_sign_up -->
	<tr> 
	  <td class="row1"><span class="gen">{L_DIGEST_NEW}:</span></td>
	  <td class="row2">
		<input type="radio" name="digest_new" value="2" {DIGEST_NEW_YES} /><span class="gen">&nbsp;{L_YES}</span>&nbsp;&nbsp;
		<input type="radio" name="digest_new" value="0" {DIGEST_NEW_NO} /><span class="gen">&nbsp;{L_NO}</span></td>
	</tr>
	<!-- END switch_new_sign_up -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
	<tr> 
	  <td class="row1">{L_FORUM_STATUS}</td>
	  <td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
	</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#

	<tr> 
      		<td class="row1">{L_DIGEST}</td> 
      		<td valign="top" class="row2"><input type="radio" name="forum_digest" value="1" {FORUM_DIGEST_CHECKED_YES} />{L_YES}&nbsp;&nbsp;<input type="radio" name="forum_digest" value="0" {FORUM_DIGEST_CHECKED_NO} />{L_NO}</td> 
   	</tr>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/group_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row2" width="62%"> 
		<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} />	{L_GROUP_CLOSED} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />	{L_GROUP_HIDDEN}</td> 
	</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#

<tr>
		 <td class="row1" width="38%"><span class="gen">{L_GROUP_DIGESTS}:</span><br /><span class="gensmall">{L_GROUP_DIGESTS_EXPLAIN}</span></td>
		 <td class="row2" width="62%"><input type="radio" name="group_digest" value="0" {S_GROUP_DIGEST_NO} />{L_NO}&nbsp;&nbsp;<input type="radio" name="group_digest" value="1" {S_GROUP_DIGEST_YES} />{L_YES}</td>
	</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

#
# Now run install_digests.php if not using easymod.
#

# EoM  