aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-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 000000000..df30fcf73
--- /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 000000000..bcc4ee382
--- /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 000000000..86049cf71
--- /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 000000000..47343f273
--- /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 000000000..9dba9a4cb
--- /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>
+