diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-05-12 11:51:32 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-05-12 11:51:32 +0000 |
commit | 2e28deb303d73fa2ec9be90dbd223f54765503f6 (patch) | |
tree | 20edb0e89ac2dd71e0ca75e4e699abaf20560551 | |
parent | 2a92f73496399ee651dc23543ec2616b87adeb04 (diff) | |
download | elgg-2e28deb303d73fa2ec9be90dbd223f54765503f6.tar.gz elgg-2e28deb303d73fa2ec9be90dbd223f54765503f6.tar.bz2 |
added tidypics_ to url functions so we don't have a function collision
-rw-r--r-- | start.php | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -33,8 +33,8 @@ add_widget_type('album_view', elgg_echo("album:widget"), elgg_echo("album:widget:description"), 'profile');
// Register a URL handler for files
- register_entity_url_handler('image_url','object','image');
- register_entity_url_handler('album_url','object','album');
+ register_entity_url_handler('tidypics_image_url', 'object', 'image');
+ register_entity_url_handler('tidypics_album_url', 'object', 'album');
// Register entity type
register_entity_type('object','image');
@@ -289,24 +289,26 @@ /**
* Populates the ->getUrl() method for file objects
+ * Registered in the init function
*
* @param ElggEntity $entity album/image entity
* @return string File URL
*/
- function image_url($entity) {
+ function tidypics_image_url($entity) {
global $CONFIG;
$title = $entity->title;
$title = friendly_title($title);
return $CONFIG->url . "pg/photos/view/" . $entity->getGUID() . "/" . $title;
}
-
- function album_url($entity) {
+
+ function tidypics_album_url($entity) {
global $CONFIG;
$title = $entity->title;
$title = friendly_title($title);
- return $CONFIG->url . "pg/photos/album/" . $entity->getGUID() . "/" . $title;
+ return $CONFIG->url . "pg/photos/album/" . $entity->getGUID() . "/" . $title;
}
-
+
+
// Make sure tidypics_init is called on initialisation
register_elgg_event_handler('init','system','tidypics_init');
register_elgg_event_handler('pagesetup','system','tidypics_submenus');
|