From 9b2d9a592cbba4359d8bec3a4980ce16a2070ff3 Mon Sep 17 00:00:00 2001
From: flow <f.weber@digi-info.de>
Date: Wed, 6 Apr 2011 11:43:45 +0200
Subject: [PATCH] node in colorbox.

---
 colorbox.module    |   10 ++++++++++
 colorbox.pages.inc |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/colorbox.module b/colorbox.module
index e5ccb41..bbb4e6f 100644
--- a/colorbox.module
+++ b/colorbox.module
@@ -95,6 +95,16 @@ function colorbox_menu() {
     'file' => 'colorbox.pages.inc',
   );
 
+  $items['colorbox/node/%node'] = array(
+    'title' => 'Node',
+    'page callback' => 'colorbox_node_page',
+    'page arguments' => array(2),
+    'access callback' => 'node_access',
+    'access arguments' => array('view', 2),
+    'type' => MENU_CALLBACK,
+    'file' => 'colorbox.pages.inc',
+  );
+
   return $items;
 }
 
diff --git a/colorbox.pages.inc b/colorbox.pages.inc
index 41b49ff..922b6c8 100644
--- a/colorbox.pages.inc
+++ b/colorbox.pages.inc
@@ -39,3 +39,12 @@ function colorbox_form_page($form_id) {
 
   exit;
 }
+
+/**
+ * Menu callback for colorbox_node_page.
+ */
+function colorbox_node_page($node) {
+  $GLOBALS['devel_shutdown'] = FALSE; // Prevent devel module from spewing.
+  print node_view($node);
+  exit;
+}
-- 
1.7.3.4

