aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-12 11:51:32 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-12 11:51:32 +0000
commit2e28deb303d73fa2ec9be90dbd223f54765503f6 (patch)
tree20edb0e89ac2dd71e0ca75e4e699abaf20560551 /start.php
parent2a92f73496399ee651dc23543ec2616b87adeb04 (diff)
downloadelgg-2e28deb303d73fa2ec9be90dbd223f54765503f6.tar.gz
elgg-2e28deb303d73fa2ec9be90dbd223f54765503f6.tar.bz2
added tidypics_ to url functions so we don't have a function collision
Diffstat (limited to 'start.php')
-rw-r--r--start.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/start.php b/start.php
index 5091a4200..85e4929bc 100644
--- a/start.php
+++ b/start.php
@@ -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');