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 | 991a965fcdbbcdd5ad754949a8b2bebc97b807b7 (patch) | |
tree | ac4cabac977b8113f01070a463f1410d1bdf471b /mod/profile_friendlyurl/start.php | |
parent | 792f381882a59615e0a7c1c0ee5d1c63d59cb358 (diff) | |
parent | 8fb95110c43e70f66eb5c14bb1446a3f1b5443a9 (diff) | |
download | elgg-991a965fcdbbcdd5ad754949a8b2bebc97b807b7.tar.gz elgg-991a965fcdbbcdd5ad754949a8b2bebc97b807b7.tar.bz2 |
Merge commit '8fb95110c43e70f66eb5c14bb1446a3f1b5443a9' as 'mod/profile_friendlyurl'
Diffstat (limited to 'mod/profile_friendlyurl/start.php')
-rwxr-xr-x | mod/profile_friendlyurl/start.php | 20 |
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 |