Commit graph

151 commits

Author SHA1 Message Date
Andrew Garrett dc6a3cb6d0 Add a "mention" notification
Any user whose user page is linked in a comment on a talk page will get a notification of that.

Weaknesses: Currently this mention notification is additive.
We may want to restrict it to only cases where the user would not
otherwise be notified of the comment

patch set 3:
	* user + instead of array_merge for merging subscription users
	* rename $user to $agent to avoid name confilict in generateMentionEvents()
	* add check for possible null object
	* users should not receive 'mention' notification on their own talk pages

patch set 4:
	* add more descriptive comment
	* check for empty notification list before creating mention event

patch set 5:
	* Fix a parse error, change [ to {

patch set 10:
	* rebase

patch set 11:
	* adding flyout messages, updating params for other messages

Change-Id: I76b80db1f325d9569f36c506d14c8c875bba4a34
2013-02-24 20:38:11 -08:00
Kaldari 335fc1fab0 Getting rid of confusing abstraction regarding formatter classes
Specifying the class directly is much less confusing and fragile.
Plus we have way too many things named 'type'.
Also changing MWEchoArticleLinkedFormatter to EchoArticleLinkedFormatter
to match the convention of the other formatter classes.
Also making EchoBasicFormatter the default, so that the Hello World
case is easier to implement.

Change-Id: Ibd9b15008d37ad815e466ab81ba9a5b668ee2791
2013-02-15 16:02:42 -08:00
Bsitu 567e11bb14 Merge "Fixing notification type to be 'web' in controller" 2013-02-14 20:13:01 +00:00
Kaldari 6347618db5 Fixing notification type to be 'web' in controller
Change-Id: Iab077a77aa75a6ff0cf03acecca38403595dda93
2013-02-14 12:07:23 -08:00
Kaldari 16331eab92 Adding dismiss functionality to flyout overlay.
Change-Id: Ibfbdb2a9f170e1d9b30b50e8639aee25101e71d6
2013-02-14 11:01:03 -08:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -08:00
Kaldari d541e7babd Using human-friendly relative timestamps rather than absolute timestamps
Change-Id: Ie2b79133528bcc3afc701cca41e8ec78aab3124c
2013-01-23 16:39:42 -08:00
Kaldari 05e186c7a3 Setting up flyout formatting as a separate formatting option
This is replacing the implementation I did for 'html-light'.
The reason html-light doesn't work is that we don't have any way
of reliably determining which parameter should be the one that is
linked to in the notification title (flyout notifications are only
supposed to have one link). With this system, the notification
definer can specify a separate message/params combination to use
specifically for the notification flyout. If they don't specify
these, it falls back to the normal title message/params.

Change-Id: I35394849cf99307eba4a76e079333d19514fdb5d
2013-01-08 09:53:31 -08:00
bsitu a5cc1c6836 (bug 43625) - Strange notification
pages with 0 id should be filtered out

Change-Id: Idfccc3e7c430e929f7ef312548ad92e7d9f40dfe
2013-01-04 11:58:30 -08:00
Bsitu f94654389d Merge changes I388b8bbc,I85146f7e
* changes:
  Separating html and html-light formatting for notifications
  More work on our custom edit summary parsing
2013-01-03 18:51:40 +00:00
Kaldari d6ad22ed81 Separating html and html-light formatting for notifications
Change-Id: I388b8bbcce741005b34b87d7331e22d442ef1c9b
2013-01-02 17:52:07 -08:00
bsitu 961f86bd33 add article-linked notification
Patch Set 6:
	1. use 'linked' icron
	2. update message from cross-referenced to cross referenced

Change-Id: I8c70454e59b5f9f86f92825cfc75dcf5d9bcb336
2013-01-02 10:40:39 -08:00
Kaldari dc2dcf5db9 More work on our custom edit summary parsing
Change-Id: I85146f7eaa1871dc4356ad9494582621293f54d9
2012-12-28 09:55:52 -08:00
Kaldari 150e7078a3 Allow edit summaries to be parsed or stripped.
Change-Id: I810bee6353697c7b92aee914b4621372858834dd
2012-12-18 16:50:28 -08:00
Kaldari 40632b784f Strip out wikitext from edit summaries
Change-Id: I2a164da5c7bc23323422e6a527deb2547ed8a08f
2012-12-18 10:52:27 -08:00
bsitu 426c303e1f Email copy update
Change-Id: If7892289f3baf938e97b3a70b30a402468741c78
2012-12-17 17:52:24 -08:00
Kaldari 24d6ae2758 Merge "Initial check-in for email batch" 2012-12-13 17:59:17 +00:00
bsitu 6b8571403a Initial check-in for email batch
patch set 3:
	* add gender support to various messages
	* tweak variables a little bit, e.g. move class variables to function local variables
patch set 4:
	* update various email to e-mail in i18n file
	* add support to process only valid echo events
	* add global email footer
	* add the new table schema to core schema file
patch set 5:
	* remove trailing white space
	* add missing semicolon to return statement in Notifier::notifyWithEmail()
patch set 8:
	* some change based on newest feature requirement

Change-Id: I3298617dab4c04c4d6d486469120fc2d0c986b66
2012-12-12 12:00:13 -08:00
Kaldari 52ee8cd952 Adding placeholder and trashcan icons
Change-Id: I589032ae32ec67f0cfca46af98a27654b4ddd672
2012-12-11 19:27:34 +00:00
Kaldari ae7d11c40f Formatting work on overlay
Change-Id: I84a8d8e8259da65b922170b9a63150d0039dfb20
2012-12-07 12:04:19 -08:00
Kaldari 48b73cd131 Making sure the user's language is used regardless of context.
Plus a couple whitespace fixes.

Change-Id: Ifb5815874956738c29ec7cb279e0e72107a04edc
2012-12-05 20:20:28 +00:00
Kaldari 7e9a35107b Allowing notifications to support multiple predefined components in the payload.
Payload components can include edit summary, edit snippet, welcome message.

This replaces the older 'content' system which constructed a payload
from an arbitrary message + parameters (but only supported a single
message).

Change-Id: I9a5e1d69f0c8296bb2bb79cb3f26e67aa34592bb
2012-12-05 10:31:41 -08:00
Kaldari 1124538d8a Merge "Add global default email footer message" 2012-11-30 22:52:19 +00:00
bsitu 3105444b9f Add global default email footer message
patch set 3: change emails to e-mails
patch set 4: make email-footer a parameter for email-body, this gives more flexibility so the footer can be defined directly inside email body or a separate message.
patch set 5: update email copy, still waiting for legal to finalize, :(
patch set 6: update email copy, remove whitespace, update preference link, the copy is finalized, :)

Change-Id: Ia5e8336f1c142c8f040efd0174696c7952c391a9
2012-11-29 13:20:29 -08:00
Alex Monk 421babd44b Merge "Adding comments and fixing some incorrect comments" 2012-11-28 18:23:37 +00:00
Kaldari 1c2a76ae22 Adding comments and fixing some incorrect comments
Change-Id: Iab1be6ad8700630f2cf3f97b5d5edd542f1c85ec
2012-11-26 18:20:53 -08:00
bsitu 4bcc575ff8 (bug 41139) message snippets in notif should skip templates
patch set 2: remove trailing whitespace
patch set 3: remove unnecessary variable and add @return to function comment
patch set 4: remove redundant intval() and update commit message

Change-Id: I6abfa7d820433e008d8bdcc5843515cd4823dd02
2012-11-21 14:38:07 -08:00
Reedy 962d312080 Fatal error: Call to a member function equals() on a non-object
Fatal error:  Call to a member function equals() on a non-object in /usr/local/apache/common-local/php-1.21wmf4/extensions/Echo/formatters/CommentFormatter.php on line 28

Change-Id: If6867aeb0b4c3f6b4229f748e9791f3e74a4ef87
2012-11-14 21:52:17 +00:00
bsitu 9d916f77c6 Use canonical url for email links
Change-Id: Ice68cbb1ab91484981f40c26089799f1156d0efe
2012-11-02 10:43:35 -07:00
Andrew Garrett 466c87d999 Echo: Add "reverted" notification for when a user's edit is reverted.
* Supports 'undo' and 'rollback' currently
* Also includes adding the edit summary used to all edit notifications.
* Also fixes a minor bug that made it seem like all EchoNotificationJobs were failing.
* Added revert icon to CSS

Change-Id: Id22470107b071cdbce33da7cf3dfd09d22947644
2012-10-31 17:01:20 -07:00
bsitu 86c3b094d8 $language->prettyTimestamp is expecting 3 arguments
Change-Id: I58daf0fd93891bf3d6c7a76d56ffce2c4af5f3b3
2012-10-25 22:47:45 +01:00
bsitu b47980ca7a Fix a typo in array key
email-subject-params should be email-body-params

Change-Id: Ifdd2551a153756f5146cab074903c5822a89661d
2012-10-24 11:12:06 -07:00
Kaldari a202fd8a12 (bug 41332) syncing params between child and parent methods
Change-Id: Icaec6ad0b332a2bd2b40d849e2d377d24dab6872
2012-10-23 15:03:06 -07:00
Siebrand 8774a16ec3 Merge "(bug 40292) Don't use hardcoded brackets" 2012-10-06 20:24:02 +00:00
Krenair 9cb8ef3d40 (bug 40292) Don't use hardcoded brackets
Change-Id: I2a2de9c59d5d1f7306b9c6b92ba99d74b53d0192
2012-10-06 20:37:55 +01:00
Siebrand Mazeland 3a43ea2e05 Maintenance for Echo extension.
* Update docs.
* Remove unused local variables.
* JSLint/JSHint suggested updates.
* Merge CSS lines.

Change-Id: Ib2a2e8129d5ff8aca6c612a39d22698f078df9d5
2012-10-06 19:31:31 +00:00
Tychay 419f7b1cbb Merge "Add welcome notification for new users." 2012-09-04 19:03:09 +00:00
Siebrand Mazeland 69d91fa1b6 Update documentation and deprecated methods.
Basically having fun with the code analyzer.

Also:
* remove unused local variable assignments
* missing return values
* CSS optimizations.
* Initialize possible unset variables.

Change-Id: I77aa08ecb48eeda08f14dc38d7f35d57ea9fa110
2012-09-02 11:30:38 +02:00
Krenair 5714adf8f4 Add welcome notification for new users.
Change-Id: I14032b71ebe63bb6ef951ba0c14d6acf44e69d6b
2012-09-01 01:31:20 +01:00
Siebrand Mazeland 950f74eba8 Follow-up I2c10cb69: Auto-formatted using IDE.
Change-Id: Iedeaca3c31195a5cf7df8dd38d6332cfabffcc67
2012-08-31 23:50:46 +02:00
Krenair 9559105b59 Use whitespace between function parameters and the brackets.
Change-Id: I2c10cb69f1f1726b63d25579c6a35c882cc1fe7e
2012-08-30 17:04:39 +01:00
Andrew Garrett 72cae969ac Merge "Echo: Change parsed() to text() for email notifications" 2012-08-02 18:47:48 +00:00
Andrew Garrett e601448b46 Echo: Change parsed() to text() for email notifications
Change-Id: I53ab07bf845808776e54a1cfb473e0d74b1a3295
2012-08-02 11:47:03 -07:00
Andrew Garrett f713fad11c Echo: Make sure timestamps are shown for entries without content
Change-Id: Ie8f1758aa24ebf8e6dfe56fde92a40b340218052
2012-08-02 11:18:25 -07:00
Andrew Garrett 27128c6a71 New copy from Vibha
Change-Id: Iabceeeb06cef395c31f2e0d17138e020668256fc
2012-08-01 14:23:37 -07:00
Reedy 0238982af0 Update code/documentation
Add FIXME

Update some code to new standards

Change-Id: I4240f651ca85001eabaf91eed0c896741b01a76d
2012-08-01 10:54:17 -07:00
Andrew Garrett 0699d8f402 Formatting updates for Echo.
First implementation of "two line" formatting.
Messages have a title and optional content.

Distinguishing writing on "your talk page" from another talk page in messages.

Change-Id: I9051e4bfb66d1c25c1bf68ec092b52fd90544336
2012-08-01 10:37:17 -07:00
Andrew Garrett 6ff170cada Echo: Implement advanced notifications for vanilla talk pages.
Uses the class EchoDiscussionParser to understand actions taken on
vanilla MediaWiki discussion pages.

Currently notifies on these occasions:
* A new comment is added to a discussion on your talk page or that
  you have participated in.
* A new topic is added to your talk page.

There are vague plans to expand to these classes of events:
* Your comment is edited or removed.
* A large section is moved to your talk page.

and these classes of users:
* Users watching discussion pages.

Change-Id: Ie6cae76ed2e0ecf607059e39ac1aa480a275ec89
2012-08-01 10:17:36 -07:00
Krenair 7d6fb20bd7 Some code formatting, wfMsg and deglobalisation changes.
Change-Id: I77715b2c152cf557d2ba3e96a8969847a0957840
2012-07-26 18:51:57 +01:00
Andrew Garrett 8839f98735 Implement email notification in Echo. No way to turn it off yet, but at least it is there :).
Change-Id: Ie7c3d776d3698264d18ccaec90cc39aae83761dd
2012-05-18 01:36:18 +10:00
Andrew Garrett 8da85396d6 Initial commit of Echo, a notifications framework for MediaWiki.
This version is very rough.

For an example set of Minimum Releasable Functionality, this version will notify users on
changes to their watchlists or to their user talk pages.

However, it is still missing a conversion script to turn watchlists into echo subscriptions.

For now, notifications can be viewed through the new special page Special:Notifications, or through the API module provided.

Change-Id: I5867226e3e6195fbed81f4b5803e2310f057ffc4
2012-05-13 00:53:21 +10:00