mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Fix for page_chapter SEFs on fresh install. Increase frontend modal width. Add missing page data to page shortcode vars.
This commit is contained in:
@@ -281,7 +281,7 @@ Morbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor con
|
|||||||
<field name="chapter_id">1</field>
|
<field name="chapter_id">1</field>
|
||||||
<field name="chapter_parent">0</field>
|
<field name="chapter_parent">0</field>
|
||||||
<field name="chapter_name">General</field>
|
<field name="chapter_name">General</field>
|
||||||
<field name="chapter_sef"></field>
|
<field name="chapter_sef">general</field>
|
||||||
<field name="chapter_meta_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.</field>
|
<field name="chapter_meta_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et tempor odio. Quisque volutpat lorem nec lectus congue suscipit. In hac habitasse platea dictumst. Etiam odio nisi, egestas vitae amet.</field>
|
||||||
<field name="chapter_meta_keywords"></field>
|
<field name="chapter_meta_keywords"></field>
|
||||||
<field name="chapter_manager">0</field>
|
<field name="chapter_manager">0</field>
|
||||||
@@ -294,7 +294,7 @@ Morbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor con
|
|||||||
<field name="chapter_id">2</field>
|
<field name="chapter_id">2</field>
|
||||||
<field name="chapter_parent">1</field>
|
<field name="chapter_parent">1</field>
|
||||||
<field name="chapter_name">Chapter 1</field>
|
<field name="chapter_name">Chapter 1</field>
|
||||||
<field name="chapter_sef"></field>
|
<field name="chapter_sef">chapter-1</field>
|
||||||
<field name="chapter_meta_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ut nunc ac neque egestas ullamcorper. In convallis semper hendrerit. Etiam non dolor nisl, varius facilisis dui. Nunc egestas massa nunc.</field>
|
<field name="chapter_meta_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ut nunc ac neque egestas ullamcorper. In convallis semper hendrerit. Etiam non dolor nisl, varius facilisis dui. Nunc egestas massa nunc.</field>
|
||||||
<field name="chapter_meta_keywords"></field>
|
<field name="chapter_meta_keywords"></field>
|
||||||
<field name="chapter_manager">0</field>
|
<field name="chapter_manager">0</field>
|
||||||
|
@@ -122,6 +122,8 @@ img.featurebox { border-radius: 5px }
|
|||||||
#login-template { max-width: 330px; margin-right: auto; margin-left: auto; }
|
#login-template { max-width: 330px; margin-right: auto; margin-left: auto; }
|
||||||
#login-template h2.caption { text-align:center; font-size:120%; opacity:0.8 }
|
#login-template h2.caption { text-align:center; font-size:120%; opacity:0.8 }
|
||||||
#login-template .logo { padding-top:50px; margin-left:auto; margin-right: auto }
|
#login-template .logo { padding-top:50px; margin-left:auto; margin-right: auto }
|
||||||
|
|
||||||
|
.modal-lg { width: 70% }
|
||||||
/* CUSTOM Responsive Styles */
|
/* CUSTOM Responsive Styles */
|
||||||
|
|
||||||
|
|
||||||
|
35
page.php
35
page.php
@@ -149,7 +149,7 @@ class pageClass
|
|||||||
$this->debug .= "<b>pageSelected</b> ".$this->pageSelected." <br />";
|
$this->debug .= "<b>pageSelected</b> ".$this->pageSelected." <br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
$books = e107::getDb()->retrieve("SELECT chapter_id,chapter_sef,chapter_name FROM #page_chapters ORDER BY chapter_id ASC" , true);
|
$books = e107::getDb()->retrieve("SELECT chapter_id,chapter_sef,chapter_name,chapter_parent FROM #page_chapters ORDER BY chapter_id ASC" , true);
|
||||||
|
|
||||||
foreach($books as $row)
|
foreach($books as $row)
|
||||||
{
|
{
|
||||||
@@ -490,13 +490,16 @@ class pageClass
|
|||||||
'title' => $page['page_title'],
|
'title' => $page['page_title'],
|
||||||
'text' => $tp->toHtml($page['page_text'],true)
|
'text' => $tp->toHtml($page['page_text'],true)
|
||||||
);*/
|
);*/
|
||||||
|
$page['chapter_parent'] = $this->getParent($page['page_chapter']);
|
||||||
$page['chapter_sef'] = $this->getSef($page['page_chapter']); // $chapter_sef;
|
$page['chapter_sef'] = $this->getSef($page['page_chapter']); // $chapter_sef;
|
||||||
$page['book_sef'] = $bookSef;
|
$page['book_sef'] = $bookSef;
|
||||||
|
$page['book_id'] = $this->getParent($page['chapter_parent']);
|
||||||
|
|
||||||
// $this->page = $page;
|
// $this->page = $page;
|
||||||
$this->batch->setVars($page);
|
$this->batch->setVars($page);
|
||||||
// $this->batch->setVars(new e_vars($data))->setScVar('page', $this->page);
|
// $this->batch->setVars(new e_vars($data))->setScVar('page', $this->page);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $url = e107::getUrl()->create('page/view', $page, 'allow=page_id,page_sef,chapter_sef,book_sef');
|
// $url = e107::getUrl()->create('page/view', $page, 'allow=page_id,page_sef,chapter_sef,book_sef');
|
||||||
@@ -563,6 +566,7 @@ class pageClass
|
|||||||
$this->page['np'] = '';
|
$this->page['np'] = '';
|
||||||
$this->page['err'] = TRUE;
|
$this->page['err'] = TRUE;
|
||||||
$this->page['cachecontrol'] = false;
|
$this->page['cachecontrol'] = false;
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
@@ -629,16 +633,23 @@ class pageClass
|
|||||||
// $this->batch->setVars(new e_vars($ret))->setScVar('page', $this->page); // Removed in favour of $this->var (cross-compatible with menus and other parts of e107 that use the same shortcodes)
|
// $this->batch->setVars(new e_vars($ret))->setScVar('page', $this->page); // Removed in favour of $this->var (cross-compatible with menus and other parts of e107 that use the same shortcodes)
|
||||||
|
|
||||||
// ---- New --- -
|
// ---- New --- -
|
||||||
$this->page['page_text'] = $this->pageToRender;
|
$this->page['page_text'] = $this->pageToRender;
|
||||||
$this->page['np'] = $pagenav;
|
$this->page['np'] = $pagenav;
|
||||||
$this->page['rating'] = $rating;
|
$this->page['rating'] = $rating;
|
||||||
$this->page['comments'] = $comments;
|
$this->page['comments'] = $comments;
|
||||||
$this->page['err'] = FALSE;
|
$this->page['err'] = false;
|
||||||
$this->page['cachecontrol'] = (isset($this->page['page_password']) && !$this->page['page_password'] && $this->authorized === true);
|
$this->page['cachecontrol'] = (isset($this->page['page_password']) && !$this->page['page_password'] && $this->authorized === true);
|
||||||
|
$this->page['chapter_id'] = $this->page['page_chapter'];
|
||||||
|
$this->page['chapter_name'] = $this->getName($this->page['page_chapter']);
|
||||||
|
$this->page['chapter_sef'] = $this->getSef($this->page['page_chapter']);
|
||||||
|
$this->page['chapter_parent'] = $this->getParent($this->page['page_chapter']);
|
||||||
|
$this->page['book_id'] = $this->page['chapter_parent'];
|
||||||
|
$this->page['book_parent'] = $this->getParent($this->page['chapter_parent']);
|
||||||
|
$this->page['book_sef'] = $this->getSef($this->page['chapter_parent']);
|
||||||
|
$this->page['book_name'] = $this->getName($this->page['chapter_parent']);
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
||||||
|
|
||||||
$this->batch->setVars($this->page);
|
$this->batch->setVars($this->page);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user