From 7d6688d760871324e8199b82ee42db93085824ba Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 29 May 2013 01:22:11 -0700 Subject: [PATCH] Page support for single page with anchor navigation. --- e107_core/bbcodes/code.bb | 2 +- .../shortcodes/batch/page_shortcodes.php | 8 +- e107_core/templates/header_default.php | 13 ++- e107_handlers/form_handler.php | 1 + e107_handlers/sitelinks_class.php | 5 + e107_plugins/page/e_sitelink.php | 6 +- e107_plugins/page/page_navigation_menu.php | 5 +- e107_themes/bootstrap/theme.php | 97 ++++++++++++++++++- e107_themes/bootstrap/theme.xml | 1 + page.php | 59 +++++++++-- 10 files changed, 179 insertions(+), 18 deletions(-) diff --git a/e107_core/bbcodes/code.bb b/e107_core/bbcodes/code.bb index dab72e0a3..ea2ea4fcb 100644 --- a/e107_core/bbcodes/code.bb +++ b/e107_core/bbcodes/code.bb @@ -51,7 +51,7 @@ else $highlighted_text = highlight_string($code_text, TRUE); $highlighted_text = str_replace(array("",""),"",$highlighted_text); $divClass = ($parm) ? $parm : 'code_highlight'; - $ret = "{$highlighted_text}"; + $ret = "
{$highlighted_text}
"; } $ret = str_replace("[", "[", $ret); return $ret; \ No newline at end of file diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php index af9400d59..3d415b712 100644 --- a/e107_core/shortcodes/batch/page_shortcodes.php +++ b/e107_core/shortcodes/batch/page_shortcodes.php @@ -20,7 +20,7 @@ class cpage_shortcodes extends e_shortcode // var $var; // parsed DB values function sc_cpagetitle($parm='') - { + { return e107::getParser()->toHTML($this->getParserVars()->title, true, 'TITLE'); } @@ -81,6 +81,12 @@ class cpage_shortcodes extends e_shortcode return $this->page['page_id']; } + function sc_cpageanchor() + { + $frm = e107::getForm(); + return $frm->name2id($this->page['page_title']); + } + // Not a shortcode really, as it shouldn't be cached at all :/ function cpagecomments() { diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 117378461..adb7e775a 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -573,10 +573,17 @@ echo "\n"; - -echo "\n"; +if(!deftrue('BODYTAG')) //TODO Discuss a better way? +{ + echo "\n"; +} +else +{ + echo BODYTAG."\n"; +} // Bootstrap Modal Window - too important to template. +/* echo '