Example #1
0
 /**
  * Make sure that the journal that the user is trying to
  * view is a journal that belongs to them
  * @Developer brandon
  * @Date May 17, 2010
  */
 public function show($id = NULL)
 {
     $journal = ORM::factory('journal', $id);
     if ($journal->user->id != user::current()->id) {
         url::redirect('');
     }
     meta::set_title(date::user_friendly_date($journal->created_at) . ' : ' . $journal->title);
     parent::show($id);
 }
Example #2
0
 /**
  * Clean up the show page URL
  * @Developer brandon
  * @Date Oct 11, 2010
  */
 public function show($name = NULL)
 {
     $blog = ORM::factory('blog')->where('name', format::dash_to_space($name))->find();
     // Set the title
     meta::set_title(ucwords($blog->name));
     // Set the description
     meta::set_description($blog->synopsis);
     // Show the page
     parent::show($blog);
 }
Example #3
0
 /**
  * Clean up the show page URL
  * @Developer brandon
  * @Date Oct 11, 2010
  */
 public function show($id = NULL)
 {
     // Find the product that we are trying to access
     $product = ORM::factory('product', $id);
     // Set the title
     meta::set_title(ucwords($product->name));
     // Set the description
     meta::set_description($product->description);
     // Show the page
     parent::show($product);
 }
Example #4
0
 /**
  * Set the title for the blog entry that the user is viewing
  * @Developer brandon
  * @Date May 27, 2010
  */
 public function show($id = NULL)
 {
     parent::show($id);
     $blog = ORM::factory('blog', $id);
     meta::set_title($blog->title);
 }
Example #5
0
 /**
  * Show
  * @Developer brandon
  * @Date May 19, 2010
  */
 public function show($title = NULL)
 {
     $page = ORM::factory('static')->where('title', $title)->find();
     meta::set_title($page->title);
     parent::show($page->id);
 }
Example #6
0
 /**
  * Show the user
  * @Developer brandon
  * @Date May 19, 2010
  */
 public function show()
 {
     user::require_login();
     parent::show(user::current()->id);
     meta::set_title('My Profile');
 }