aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-11-09 16:29:14 +0100
committerSem <sembrestels@riseup.net>2013-11-09 16:29:14 +0100
commitdee4ff21a5a5e8b8c5dbeae0a2f89a36a3f1c6cc (patch)
tree88864dd5d5428d68efc677caa2ee0ef8a88adc73
parent536ad685d02d6721671237bc6e6f5a04334419ac (diff)
parenta81819e6399907420e67aabe93f5ac5eee8bac5f (diff)
downloadelgg-dee4ff21a5a5e8b8c5dbeae0a2f89a36a3f1c6cc.tar.gz
elgg-dee4ff21a5a5e8b8c5dbeae0a2f89a36a3f1c6cc.tar.bz2
Add 'mod/profile_widgets/' from commit 'a81819e6399907420e67aabe93f5ac5eee8bac5f'
git-subtree-dir: mod/profile_widgets git-subtree-mainline: 536ad685d02d6721671237bc6e6f5a04334419ac git-subtree-split: a81819e6399907420e67aabe93f5ac5eee8bac5f
-rw-r--r--mod/profile_widgets/languages/en.php7
-rw-r--r--mod/profile_widgets/languages/es.php7
-rwxr-xr-xmod/profile_widgets/manifest.xml16
-rw-r--r--mod/profile_widgets/start.php13
-rw-r--r--mod/profile_widgets/views/default/widgets/thewirewrite/view.php11
5 files changed, 54 insertions, 0 deletions
diff --git a/mod/profile_widgets/languages/en.php b/mod/profile_widgets/languages/en.php
new file mode 100644
index 0000000..df30fcf
--- /dev/null
+++ b/mod/profile_widgets/languages/en.php
@@ -0,0 +1,7 @@
+<?php
+
+ $english = array(
+ 'thewire:add' => "Post to the wire",
+ 'thewire:write:desc' => 'This widget allows sending messages to the wire'
+ );
+ add_translation("en",$english);
diff --git a/mod/profile_widgets/languages/es.php b/mod/profile_widgets/languages/es.php
new file mode 100644
index 0000000..bcc4ee3
--- /dev/null
+++ b/mod/profile_widgets/languages/es.php
@@ -0,0 +1,7 @@
+<?php
+
+ $spanish = array(
+ 'thewire:add' => "Enviar mensaje a la red",
+ 'thewire:write:desc' => 'Este widget permite enviar telegramas a la red'
+ );
+ add_translation("es",$spanish);
diff --git a/mod/profile_widgets/manifest.xml b/mod/profile_widgets/manifest.xml
new file mode 100755
index 0000000..86049cf
--- /dev/null
+++ b/mod/profile_widgets/manifest.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>Extra profile widgets</name>
+ <author>Lorea developers</author>
+ <version>1.8.0</version>
+ <category>widget</category>
+ <description>Extra widgets for profile and dashboard.</description>
+ <copyright>(C) Lorea 2011-2013</copyright>
+ <website>https://lorea.org/</website>
+ <license>GNU Affero General Public License version 3 or higher</license>
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8</version>
+ </requires>
+ <activate_on_install>true</activate_on_install>
+</plugin_manifest>
diff --git a/mod/profile_widgets/start.php b/mod/profile_widgets/start.php
new file mode 100644
index 0000000..47343f2
--- /dev/null
+++ b/mod/profile_widgets/start.php
@@ -0,0 +1,13 @@
+<?php
+
+function profile_widgets_init() {
+
+ // Set dashboard as default page after login
+ if (elgg_is_active_plugin('dashboard') && !isset($_SESSION['last_forward_from'])) {
+ $_SESSION['last_forward_from'] = 'dashboard';
+ }
+
+ elgg_register_widget_type('thewirewrite', elgg_echo('thewire:add'), elgg_echo("thewire:yourdesc:write:desc"), 'dashboard');
+}
+
+elgg_register_event_handler('init', 'system', 'profile_widgets_init');
diff --git a/mod/profile_widgets/views/default/widgets/thewirewrite/view.php b/mod/profile_widgets/views/default/widgets/thewirewrite/view.php
new file mode 100644
index 0000000..9dba9a4
--- /dev/null
+++ b/mod/profile_widgets/views/default/widgets/thewirewrite/view.php
@@ -0,0 +1,11 @@
+<div class="contentWrapper">
+<?php
+
+ $form_vars = array('class' => 'thewire-form');
+ $content = elgg_view_form('thewire/add', $form_vars);
+ $content .= elgg_view('input/urlshortener');
+ $context = 'mine';
+ echo $content;
+?>
+</div>
+