Skip to content

Commit

Permalink
Merge github.com:efault/elggpad-lite into colab-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sem committed Dec 21, 2011
2 parents b640d23 + 4ee677a commit 1af94f7
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 51 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG
@@ -1,3 +1,17 @@
0.8.1
fixed forwarded links. forwards to owners/groups pages when integration is enabled, or pads when not.
Changed river message, "created a new collaborative pad" as it works for both pads and collab pages.
History button now only appears when pages integration is enabled.
Fixed fullscreen button, works again and only appears if pages integration is disabled.

0.8.0 (Big thanks to Sem)
Pages integration
Group pads.
Lots of refactoring.
Bug fixes.
Plugin name changed from 'elggpad-lite' to 'elggpad'.
Changed 'Etherpads' to 'Pads' for consistency.

0.6.0
Fixed Etherpad Lite authentication.
Pads now support elgg permissions (private, logged in users only, friends, public)
Expand Down
14 changes: 8 additions & 6 deletions README
@@ -1,8 +1,9 @@
elggpad-lite v0.6.0
elggpad v0.8.0

Requires:
elgg 1.8 http://elgg.org/download.php
etherpad lite 1.0 http://etherpad.org/download/


Install:
Extract plugin.
Expand All @@ -17,6 +18,7 @@ Configure:
like a password. The plugin needs this to function correctly, you can find your api key in
etherpad lites root directory in a text file called APIKEY.txt
New pad text, this is the text that will be added to each new pad.
Integrate pads and pages, Removes normal pad behavior and integrates pads into pages. (Requires pages plugin)
Show controls, show/hide etherpad lites control bar.
Show chat, show/hide etherpad lites built in chat service.
Show line numbers, show/hide line numbers.
Expand All @@ -26,15 +28,15 @@ Configure:
Supported languages: English, Spanish.

Notes:
Huge thanks to Sem for this release, really nice work.
Etherpad Lite is not included in the plugin, you need to install and configure it separately.

Changes:
Fixed Etherpad Lite authentication.
Pads now support elgg permissions (private, logged in users only, friends, public)
Pads can no longer be directly accessed without logging into elgg. (unless public)

TODO:
Pages integration
Group pads.
Lots of refactoring.
Bug fixes.
Plugin name changed from 'elggpad-lite' to 'elggpad'

License:
GPL version 2, see LICENSE for more details.
Expand Down
12 changes: 1 addition & 11 deletions TODO
@@ -1,12 +1,2 @@
TODO:

Major:
Group pads, fix group ownership of pads (elgg), fix group module.

Minor:


Thinking about:
Save button, Saves current pad contents to blog/page.
(Will require blog and/or page plugins to be activated)
Passworded pads.
Update spanish language file.
14 changes: 8 additions & 6 deletions etherpad/README
@@ -1,8 +1,9 @@
elggpad-lite v0.6.0
elggpad v0.8.0

Requires:
elgg 1.8 http://elgg.org/download.php
etherpad lite 1.0 http://etherpad.org/download/


Install:
Extract plugin.
Expand All @@ -17,6 +18,7 @@ Configure:
like a password. The plugin needs this to function correctly, you can find your api key in
etherpad lites root directory in a text file called APIKEY.txt
New pad text, this is the text that will be added to each new pad.
Integrate pads and pages, Removes normal pad behavior and integrates pads into pages. (Requires pages plugin)
Show controls, show/hide etherpad lites control bar.
Show chat, show/hide etherpad lites built in chat service.
Show line numbers, show/hide line numbers.
Expand All @@ -26,15 +28,15 @@ Configure:
Supported languages: English, Spanish.

Notes:
Huge thanks to Sem for this release, really nice work.
Etherpad Lite is not included in the plugin, you need to install and configure it separately.

Changes:
Fixed Etherpad Lite authentication.
Pads now support elgg permissions (private, logged in users only, friends, public)
Pads can no longer be directly accessed without logging into elgg. (unless public)

TODO:
Pages integration
Group pads.
Lots of refactoring.
Bug fixes.
Plugin name changed from 'elggpad-lite' to 'elggpad'

License:
GPL version 2, see LICENSE for more details.
Expand Down
8 changes: 6 additions & 2 deletions etherpad/actions/etherpad/delete.php
Expand Up @@ -32,11 +32,15 @@
forward($parent->getURL());
}
}
//Forward to pages only if pages integration enabled. Otherwise forward to pads.
$handler = elgg_get_plugin_setting('integrate_in_pages', 'etherpad') == 'yes' ? 'pages' : 'etherpad';

if (elgg_instanceof($container, 'group')) {
forward("pages/group/$container->guid/all");
forward("$handler/group/$container->guid/all");
} else {
forward("pages/owner/$container->username");
forward("$handler/owner/$container->username");
}

}
}
}
Expand Down
27 changes: 14 additions & 13 deletions etherpad/languages/en.php
Expand Up @@ -11,26 +11,27 @@
* Menu items and titles
*/

'etherpad' => "Etherpads",
'etherpad:owner' => "%s's etherpads",
'etherpad:friends' => "Friends' etherpads",
'etherpad:all' => "All site etherpads",
'etherpad' => "Pads",
'etherpad:owner' => "%s's pads",
'etherpad:friends' => "Friends' pads",
'etherpad:all' => "All site pads",
'etherpad:add' => "Add pad",
'etherpad:timeslider' => 'History',
'etherpad:none' => 'No etherpads created yet',
'etherpad:fullscreen' => 'Fullscreen',
'etherpad:none' => 'No pads created yet',

'etherpad:group' => 'Group etherpads',
'etherpad:group' => 'Group pads',
'groups:enablepads' => 'Enable group pads',

/**
* River
*/
'river:create:object:etherpad' => '%s created a new collaborative page %s',
'river:create:object:subpad' => '%s created a new collaborative page %s',
'river:update:object:etherpad' => '%s updated the collaborative page %s',
'river:update:object:subpad' => '%s updated the collaborative page %s',
'river:comment:object:etherpad' => '%s commented on the collaborative page %s',
'river:comment:object:subpad' => '%s commented on the collaborative page %s',
'river:create:object:etherpad' => '%s created a new collaborative pad %s',
'river:create:object:subpad' => '%s created a new collaborative pad %s',
'river:update:object:etherpad' => '%s updated the collaborative pad %s',
'river:update:object:subpad' => '%s updated the collaborative pad %s',
'river:comment:object:etherpad' => '%s commented on the collaborative pad %s',
'river:comment:object:subpad' => '%s commented on the collaborative pad %s',

'item:object:etherpad' => 'Pads',
'item:object:subpad' => 'Subpads',
Expand Down Expand Up @@ -65,7 +66,7 @@
'etherpad:showcomments' => "Show comments?",
'etherpad:newpadtext' => "New pad text:",
'etherpad:pad:message' => 'New pad created successfully.',
'etherpad:integrateinpages' => "Integrate pads and pages?",
'etherpad:integrateinpages' => "Integrate pads and pages? (Requires Pages plugin to be enabled)",

/**
* Widget
Expand Down
6 changes: 3 additions & 3 deletions etherpad/manifest.xml
Expand Up @@ -2,7 +2,7 @@
<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
<name>Etherpad Lite</name>
<author>Luke Williams, Lorea</author>
<version>0.6.0</version>
<version>0.8.1</version>
<category>integrations</category>
<category>widget</category>
<blurb>Etherpad Lite integration.</blurb>
Expand All @@ -13,10 +13,10 @@
<type>elgg_release</type>
<version>1.8</version>
</requires>
<requires>
<suggests>
<type>plugin</type>
<name>pages</name>
</requires>
</suggests>
<requieres>
<type>priority</type>
<priority>after</priority>
Expand Down
25 changes: 18 additions & 7 deletions etherpad/start.php
Expand Up @@ -138,14 +138,25 @@ function etherpad_entity_menu($hook, $type, $return, $params) {
return $return;
}

// timeslider button
// timeslider button, show only if pages integration is enabled.
$handler = elgg_get_plugin_setting('integrate_in_pages', 'etherpad') == 'yes' ? 'pages' : 'etherpad';
$options = array(
'name' => 'etherpad-timeslider',
'text' => elgg_echo('etherpad:timeslider'),
'href' => elgg_get_site_url() . "$handler/history/" . $entity->guid,
'priority' => 200,
);
if($handler == 'pages') {
$options = array(
'name' => 'etherpad-timeslider',
'text' => elgg_echo('etherpad:timeslider'),
'href' => elgg_get_site_url() . "$handler/history/" . $entity->guid,
'priority' => 200,
);
} else {
// fullscreen button
$entity = new ElggPad($entity->guid);
$options = array(
'name' => 'etherpadfs',
'text' => elgg_echo('etherpad:fullscreen'),
'href' => $entity->getPadPath(),
'priority' => 200,
);
}
$return[] = ElggMenuItem::factory($options);

return $return;
Expand Down
4 changes: 3 additions & 1 deletion etherpad/views/default/object/etherpad.php
Expand Up @@ -27,9 +27,11 @@

$etherpad_icon = elgg_view('etherpad/icon', array('entity' => $etherpad, 'size' => 'small'));

//link to owners pages only if pages integration is enabled. Else link to owners pads.
$handler = elgg_get_plugin_setting('integrate_in_pages', 'etherpad') == 'yes' ? 'pages' : 'etherpad';
$editor = get_entity($etherpad->owner_guid);
$editor_link = elgg_view('output/url', array(
'href' => "pages/owner/$editor->username",
'href' => "$handler/owner/$editor->username",
'text' => $editor->name,
'is_trusted' => true,
));
Expand Down
4 changes: 2 additions & 2 deletions etherpad/views/default/output/iframe.php
Expand Up @@ -9,13 +9,13 @@
* @uses $vars['type'] type of iframe.
*/


//This is where theme makers can override iframe dimensions.
$fullsrc = "\"" . $vars['value'] . "\"";
$type = $vars['type'];
if($type){
switch($type) {
case "etherpad" :
$fullsrc .= " width=728 height=405";
$fullsrc .= " width=728 height=405";
break;
default :
break;
Expand Down

0 comments on commit 1af94f7

Please sign in to comment.