1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-23 06:33:22 +02:00

Page support for single page with anchor navigation.

This commit is contained in:
Cameron
2013-05-29 01:22:11 -07:00
parent 7c84b35c51
commit 7d6688d760
10 changed files with 179 additions and 18 deletions

View File

@@ -51,7 +51,7 @@ else
$highlighted_text = highlight_string($code_text, TRUE);
$highlighted_text = str_replace(array("<code>","</code>"),"",$highlighted_text);
$divClass = ($parm) ? $parm : 'code_highlight';
$ret = "<code class='".$tp -> toAttribute($divClass)." code-box {$class}' style='unicode-bidi: embed; direction: ltr'>{$highlighted_text}</code>";
$ret = "<pre class='prettyprint linenums ".$tp -> toAttribute($divClass)." code-box {$class}' style='unicode-bidi: embed; direction: ltr'>{$highlighted_text}</pre>";
}
$ret = str_replace("[", "&#091;", $ret);
return $ret;

View File

@@ -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()
{

View File

@@ -573,10 +573,17 @@ echo "</head>\n";
echo "<body".$body_onload.">\n";
if(!deftrue('BODYTAG')) //TODO Discuss a better way?
{
echo "<body".$body_onload.">\n";
}
else
{
echo BODYTAG."\n";
}
// Bootstrap Modal Window - too important to template.
/*
echo '<div id="uiModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@@ -590,7 +597,7 @@ echo '<div id="uiModal" style="display:none" class="modal hide fade" tabindex="-
</div>
</div>
';
*/