Revision history for WikkaWikiEMailNotifications


Revision [21183]

Last edited on 2010-05-01 19:52:20 by ZorrunO [Updated to v1.3 with bugfix + tidying]
Additions:
V1.3 - zorruno 2010-05-02 - bug fix, Null user in array causing email warnings
// http://wikkawiki.org/WikkaWikiEMailNotifications
// Join the array for users from the db and users from the config file...
// and remove duplicate users so they don't get multiple emails...
// and remove blanks
$emailnotify_user_list = array_filter(array_unique(array_merge($users_to_notify_on_all, $db_users_to_notify)));
// http://wikkawiki.org/WikkaWikiEMailNotifications
Deletions:
// based on http://wikkawiki.org/NotifyOnChange
// V1.0 - Original - zorruno 2010-01-10
// Join the array for users from the db and users from the config file... and remove duplicate users so they don't get multiple emails
$emailnotify_user_list = array_unique(array_merge($users_to_notify_on_all, $db_users_to_notify));
// START: Email Notifications mod


Revision [21096]

Edited on 2010-04-04 21:47:02 by ZorrunO [Updated to v1.3 with bugfix + tidying]
Additions:
- make behave more like ACLs e.g with + and - users etc?


Revision [21095]

Edited on 2010-04-04 21:41:49 by ZorrunO [accidentally deleted some of the acls.php mod, now back in & more minor fixes]
Additions:
V1.2 - zorruno 2010-04-05 - accidentally deleted some of the acls.php mod, now back in & more minor fixes
%%(html)//i18n%%
$default_comment_acl = $this->GetConfigValue('default_comment_acl');
**AFTER**
<textarea name="comment_acl" rows="4" cols="20"><?php echo $this->ACLs['comment_acl'] ?></textarea>
</td>
**ADD**
<!-- START: Email Notifications mod -->
<td>
<strong><?php echo EMAILNOTIFY_ACL_LABEL; ?></strong><br />
<textarea name="emailnotify_acl" rows="4" cols="20"><?php echo $this->ACLs['emailnotify_acl'] ?></textarea>
</td>
<!-- END: Email Notifications mod -->
%%(html)<?php echo $this->Format(ACL_SYNTAX_HELP); ?> %%
%%(html)$default = "read_acl = '', write_acl = '', comment_acl = '', ";%%
Deletions:
""//i18n""
"" $default_comment_acl = $this->GetConfigValue('default_comment_acl');
""
<?php echo $this->Format(ACL_SYNTAX_HELP); ?>
""$default = "read_acl = '', write_acl = '', comment_acl = '', ";""


Revision [21094]

Edited on 2010-04-02 01:06:25 by ZorrunO [other minor tweaks - line numbers for mods now closer hopefully]
Additions:
**AFTER**: ''(around line 67)''
**FIND AND DELETE**: ''(around line 84)''
**AFTER**: ''(around line 167) - this part is optional really''
Deletions:
**AFTER**: ''(around line 63)''
**FIND AND DELETE**: ''(around line 151)''
**AFTER**: ''(around line 151) - this part is optional really''


Revision [21093]

Edited on 2010-04-01 23:36:22 by ZorrunO [fixed a bunch of minor howto errors + code bug in acls.php]
Additions:
TODO: users can select whether they receive emails for any particular page (check box on edit page maybe?)
V1.1 - zorruno 2010-04-02 - bug fixes to acls.php & minor fixes
1) **TODO:** **code that allows each user to individually turn notifications on or off** for any page. //(a tick box is set on each page for the user that they can opt in or out with) //
- Most of this code was taken from the diff.php page handler
- **ADD** this code where it tells you to in step 3 (inside that code).
**AFTER**: ''(around line 63)''
"" $default_comment_acl = $this->GetConfigValue('default_comment_acl');
""
// START: Email Notifications mod - V1.1
$default_emailnotify_acl = ''; //not really needed, but may use if mod is expanded
**FIND AND DELETE**: ''(around line 151)''
($posted_read_acl != $default_read_acl ||
$posted_write_acl != $default_write_acl ||
$posted_comment_acl != $default_comment_acl))
$this->SaveACL($this->GetPageTag(), 'read', $this->TrimACLs($posted_read_acl));
$this->SaveACL($this->GetPageTag(), 'write', $this->TrimACLs($posted_write_acl));
$this->SaveACL($this->GetPageTag(), 'comment', $this->TrimACLs($posted_comment_acl));
$message = ACLS_UPDATED;

**REPLACE IT WITH**:
($posted_read_acl != $default_read_acl ||
$posted_write_acl != $default_write_acl ||
$posted_comment_acl != $default_comment_acl||
$posted_emailnotify_acl != $default_emailnotify_acl)) // Added this Line: Email Notifications mod - V1.1
$this->SaveACL($this->GetPageTag(), 'read', $this->TrimACLs($posted_read_acl));
$this->SaveACL($this->GetPageTag(), 'write', $this->TrimACLs($posted_write_acl));
$this->SaveACL($this->GetPageTag(), 'comment', $this->TrimACLs($posted_comment_acl));
$this->SaveACL($this->GetPageTag(), 'emailnotify', $this->TrimACLs($posted_emailnotify_acl)); // Added this Line: Email Notifications mod - V1.1
$message = ACLS_UPDATED;
OPEN up the page **libs/Wakka.class.php**
Deletions:
STILL TODO: users can select whether they receive emails for any particular page (check box on edit page)
1) **STILL TODO:** **code that allows each user to individually turn notifications on or off** for any page. //(a tick box is set on each page for the user that they can opt in or out with) //
- Most of this code was taken from the acls.php page handler
- **ADD** this code where it tells you to in step 1 (inside that code).
**AFTER**: ''(around line 85)''
"" $this->SaveACL($this->GetPageTag(), 'comment', $this->TrimACLs($posted_comment_acl));""
"" }""
// START: Email Notifications mod - V1.0
// Some of this should really be placed further up in the code, but then it would have created more install steps for the mod
$default_comment_acl = '';
($posted_emailnotify_acl != $default_emailnotify_acl))
$this->SaveACL($this->GetPageTag(), 'emailnotify', $this->TrimACLs($posted_emailnotify_acl));
**AFTER**: ''(around line 151)''
<textarea name="comment_acl" rows="4" cols="20"><?php echo $this->ACLs['comment_acl'] ?></textarea>
</td>
<!-- START: Email Notifications mod -->
<td>
<strong><?php echo EMAILNOTIFY_ACL_LABEL; ?></strong><br />
<textarea name="emailnotify_acl" rows="4" cols="20"><?php echo $this->ACLs['emailnotify_acl'] ?></textarea>
</td>
<!-- END: Email Notifications mod -->
OPEN up the page **htdocs/libs/Wakka.class.php**


Revision [21092]

Edited on 2010-04-01 21:47:32 by ZorrunO [minor spelling]
Additions:
// There will be no EMAILNOTIFY_ACL_LABEL defined ...unless we also add something to the language files, so feel free to do so
Deletions:
// There wil be no EMAILNOTIFY_ACL_LABEL defined ...unless we also add something to the language files, so feel free to do so


Revision [21062]

Edited on 2010-03-18 00:21:25 by ZorrunO [category added]
Additions:
--
CategoryUserContributions


Revision [21061]

The oldest known version of this page was created on 2010-03-18 00:20:18 by ZorrunO [category added]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki