aboutsummaryrefslogtreecommitdiff
path: root/mod/profile_friendlyurl/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile_friendlyurl/start.php')
-rwxr-xr-xmod/profile_friendlyurl/start.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/profile_friendlyurl/start.php b/mod/profile_friendlyurl/start.php
new file mode 100755
index 000000000..d191c57be
--- /dev/null
+++ b/mod/profile_friendlyurl/start.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Elgg profile_friendlyurl plugin
+ *
+ * @package Elggprofile_friendlyurl
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Kévin Dunglas <dunglas@gmail.com>
+ * @copyright Kévin Dunglas - 2010
+ */
+
+function profile_friendly_url($user) {
+ return 'http://' . $user->username . '.' . get_plugin_setting('domain', 'profile_friendlyurl');
+}
+
+function profile_friendlyurl_init() {
+ register_entity_url_handler('profile_friendly_url','user','all');
+}
+
+register_elgg_event_handler('init','system','profile_friendlyurl_init');
+?> \ No newline at end of file