aboutsummaryrefslogtreecommitdiff
path: root/mod/profile_friendlyurl/start.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:00:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:00:15 -0300
commit991a965fcdbbcdd5ad754949a8b2bebc97b807b7 (patch)
treeac4cabac977b8113f01070a463f1410d1bdf471b /mod/profile_friendlyurl/start.php
parent792f381882a59615e0a7c1c0ee5d1c63d59cb358 (diff)
parent8fb95110c43e70f66eb5c14bb1446a3f1b5443a9 (diff)
downloadelgg-991a965fcdbbcdd5ad754949a8b2bebc97b807b7.tar.gz
elgg-991a965fcdbbcdd5ad754949a8b2bebc97b807b7.tar.bz2
Merge commit '8fb95110c43e70f66eb5c14bb1446a3f1b5443a9' as 'mod/profile_friendlyurl'
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