aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-16 15:03:37 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-16 15:03:37 +0000
commitdc62de56463104f553b51174c6266ccadcf260b3 (patch)
treef0709c02147a35f71e5d2025a800847c98c62e50 /mod/blog/start.php
parent11f62409f3e96e36d1e0ff6907439e850ebb109f (diff)
downloadelgg-dc62de56463104f553b51174c6266ccadcf260b3.tar.gz
elgg-dc62de56463104f553b51174c6266ccadcf260b3.tar.bz2
URL handling for the blog plugin
git-svn-id: https://code.elgg.org/elgg/trunk@476 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r--mod/blog/start.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index f8af95e17..d7157c40b 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -48,6 +48,8 @@
// Register a page handler, so we can have nice URLs
register_page_handler('blog','blog_page_handler');
+ // Register a URL handler for blog posts
+ register_entity_url_handler('blog_url','object','blog');
}
/**
@@ -82,6 +84,13 @@
}
+ function blog_url($blogpost) {
+
+ global $CONFIG;
+ return $CONFIG->url . "blog/" . $blogpost->getOwnerUser()->username . "/read/" . $blogpost->getGUID();
+
+ }
+
// Make sure the blog initialisation function is called on initialisation
register_event_handler('init','system','blog_init');