diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:00:15 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:00:15 -0300 |
commit | 8fb95110c43e70f66eb5c14bb1446a3f1b5443a9 (patch) | |
tree | 96b3aab7bf588139f4c67c26d6445190b0c639ce /start.php | |
download | elgg-8fb95110c43e70f66eb5c14bb1446a3f1b5443a9.tar.gz elgg-8fb95110c43e70f66eb5c14bb1446a3f1b5443a9.tar.bz2 |
Squashed 'mod/profile_friendlyurl/' content from commit 1720c0c
git-subtree-dir: mod/profile_friendlyurl
git-subtree-split: 1720c0ccf8fb93760b75e5ea25b766ad539c3a57
Diffstat (limited to 'start.php')
-rwxr-xr-x | start.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/start.php b/start.php new file mode 100755 index 000000000..d191c57be --- /dev/null +++ b/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 |