diff options
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 |