-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8576 from juho-jaakkola/forum_plugin
feature(discussions): discussion feature has been moved to its own plugin
- Loading branch information
Showing
45 changed files
with
856 additions
and
821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
engine/lib/upgrades/2015062900-1.11.2-discussion_plugin-e28c7afa4f5f24ec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Elgg 1.11.2 upgrade 2015062900 | ||
* discussion_plugin | ||
* | ||
* Discussion feature was pulled from groups plugin into its | ||
* own plugin, so we need to update references of subtype | ||
* 'groupforumtopic' into 'discussion'. | ||
*/ | ||
|
||
$dbprefix = elgg_get_config('dbprefix'); | ||
|
||
// Update subtype "groupforumtopic" into "discussion" | ||
update_data("UPDATE {$dbprefix}entity_subtypes | ||
SET subtype = 'discussion' | ||
WHERE type = 'object' AND subtype = 'groupforumtopic'"); | ||
|
||
// Update river items to use the new view and subtype | ||
update_data("UPDATE {$dbprefix}river | ||
SET view = 'river/object/discussion/create', subtype = 'discussion' | ||
WHERE type = 'object' AND subtype = 'groupforumtopic'"); | ||
|
||
// Update system log to use the new subtype | ||
update_data("UPDATE {$dbprefix}system_log | ||
SET object_subtype = 'discussion' | ||
WHERE object_type = 'object' AND object_subtype = 'groupforumtopic'"); | ||
|
||
// If groups plugin is enabled, enable also the discussion plugin | ||
// so the feature won't disappear from groups that are using it. | ||
if (elgg_is_active_plugin('groups')) { | ||
// Force Elgg to discover the new plugin in plugins directory | ||
// and create a new \ElggPlugin entity for it so it can be | ||
// found with elgg_get_plugin_from_id(). | ||
_elgg_generate_plugin_entities(); | ||
|
||
$plugin = elgg_get_plugin_from_id('discussion'); | ||
$plugin->activate(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
mod/groups/actions/discussion/delete.php → ...discussions/actions/discussion/delete.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
mod/groups/classes/ElggDiscussionReply.php → ...scussions/classes/ElggDiscussionReply.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "elgg/discussions", | ||
"type": "elgg-plugin", | ||
"license": "GPL-2.0", | ||
"require": { | ||
"composer/installers": ">=1.0.8" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?php | ||
|
||
return array( | ||
'discussion' => 'Discussion', | ||
'discussion:add' => 'Add discussion topic', | ||
'discussion:latest' => 'Latest discussion', | ||
'discussion:group' => 'Group discussion', | ||
'discussion:none' => 'No discussion', | ||
'discussion:reply:title' => 'Reply by %s', | ||
'discussion:new' => "Add discussion post", | ||
'discussion:updated' => "Last reply by %s %s", | ||
|
||
'discussion:topic:created' => 'The discussion topic was created.', | ||
'discussion:topic:updated' => 'The discussion topic was updated.', | ||
'discussion:topic:deleted' => 'Discussion topic has been deleted.', | ||
|
||
'discussion:topic:notfound' => 'Discussion topic not found', | ||
'discussion:error:notsaved' => 'Unable to save this topic', | ||
'discussion:error:missing' => 'Both title and message are required fields', | ||
'discussion:error:permissions' => 'You do not have permissions to perform this action', | ||
'discussion:error:notdeleted' => 'Could not delete the discussion topic', | ||
|
||
'discussion:reply:edit' => 'Edit reply', | ||
'discussion:reply:deleted' => 'Discussion reply has been deleted.', | ||
'discussion:reply:error:notfound' => 'The discussion reply was not found', | ||
'discussion:reply:error:notfound_fallback' => "Sorry, we could not find the specified reply, but we've forwarded you to the original discussion topic.", | ||
'discussion:reply:error:notdeleted' => 'Could not delete the discussion reply', | ||
|
||
'discussion:search:title' => 'Reply on topic: %s', | ||
|
||
/** | ||
* Action messages | ||
*/ | ||
'discussion:reply:missing' => 'You cannot post an empty reply', | ||
'discussion:reply:topic_not_found' => 'The discussion topic was not found', | ||
'discussion:reply:error:cannot_edit' => 'You do not have the permission to edit this reply', | ||
|
||
/** | ||
* River | ||
*/ | ||
'river:create:object:discussion' => '%s added a new discussion topic %s', | ||
'river:reply:object:discussion' => '%s replied on the discussion topic %s', | ||
'river:reply:view' => 'view reply', | ||
|
||
/** | ||
* Notifications | ||
*/ | ||
'discussion:topic:notify:summary' => 'New discussion topic called %s', | ||
'discussion:topic:notify:subject' => 'New discussion topic: %s', | ||
'discussion:topic:notify:body' => | ||
'%s added a new discussion topic to %s: | ||
Title: %s | ||
%s | ||
View and reply to the discussion topic: | ||
%s | ||
', | ||
|
||
'discussion:reply:notify:summary' => 'New reply in topic: %s', | ||
'discussion:reply:notify:subject' => 'New reply in topic: %s', | ||
'discussion:reply:notify:body' => | ||
'%s replied to the discussion topic %s: | ||
%s | ||
View and reply to the discussion: | ||
%s | ||
', | ||
|
||
'item:object:discussion' => "Discussion topics", | ||
'item:object:discussion_reply' => "Discussion replies", | ||
|
||
'groups:enableforum' => 'Enable group discussion', | ||
|
||
'reply:this' => 'Reply to this', | ||
|
||
/** | ||
* ecml | ||
*/ | ||
'discussion:ecml:discussion' => 'Group Discussions', | ||
|
||
/** | ||
* Discussion status | ||
*/ | ||
'discussion:topic:status' => 'Topic status', | ||
'discussion:topic:closed:title' => 'This discussion is closed.', | ||
'discussion:topic:closed:desc' => 'This discussion is closed and is not accepting new comments.', | ||
|
||
'discussion:replies' => 'Replies', | ||
'discussion:addtopic' => 'Add a topic', | ||
'discussion:post:success' => 'Your reply was succesfully posted', | ||
'discussion:post:failure' => 'There was problem while posting your reply', | ||
'discussion:topic:edit' => 'Edit topic', | ||
'discussion:topic:description' => 'Topic message', | ||
|
||
'discussion:reply:edited' => "You have successfully edited the forum post.", | ||
'discussion:reply:error' => "There was a problem editing the forum post.", | ||
); |
File renamed without changes.
Oops, something went wrong.