mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Custom-Page auto-resize working. Pagination still has an issue.
This commit is contained in:
@@ -431,7 +431,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
$textareaValue = (strstr($data, "[img]http") ? $data : str_replace("[img]../", "[img]", $data));
|
$textareaValue = (strstr($data, "[img]http") ? $data : str_replace("[img]../", "[img]", $data));
|
||||||
|
|
||||||
$text .= $this->bbareaMulti('data', $textareaValue, 'page','help','large');
|
$text .= $this->bbareaMulti('data', $textareaValue, 'page','page','large');
|
||||||
$text .= "</div>";
|
$text .= "</div>";
|
||||||
|
|
||||||
// $text .= $frm->bbarea('data', $textareaValue, 'page','help','large');
|
// $text .= $frm->bbarea('data', $textareaValue, 'page','help','large');
|
||||||
@@ -568,7 +568,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
// bbarea($name, $value, $help_mod = '', $help_tagid='', $size = 'large', $counter = false)
|
// bbarea($name, $value, $help_mod = '', $help_tagid='', $size = 'large', $counter = false)
|
||||||
function bbareaMulti($name, $textareaValue, $help_mod = '', $help_tagid='', $size = 'large', $counter = false)
|
function bbareaMulti($name, $textareaValue, $help_mod = '', $help_tagid='', $size = 'large', $counter = false)
|
||||||
{
|
{
|
||||||
$name = $name."[]";
|
// $name = $name."[]";
|
||||||
|
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
|
||||||
@@ -602,9 +602,10 @@ class page_admin_ui extends e_admin_ui
|
|||||||
{
|
{
|
||||||
$titles[] = isset($pt[1][$c]) ? $pt[1][$c] : "";
|
$titles[] = isset($pt[1][$c]) ? $pt[1][$c] : "";
|
||||||
$id = "page_".$c;
|
$id = "page_".$c;
|
||||||
|
$nm = $name."_".$c;
|
||||||
$text .= "<fieldset id='{$id}'>\n";
|
$text .= "<fieldset id='{$id}'>\n";
|
||||||
$text .= "<div>Title: ".$frm->text('page_subtitle[]', $titles[($c+1)], 250)."</div>\n";
|
$text .= "<div>Title: ".$frm->text('page_subtitle[]', $titles[($c+1)], 250)."</div>\n";
|
||||||
$text .= $frm->bbarea($name, $page, $help_mod,$help_tagid,$size,$counter);
|
$text .= $frm->bbarea($nm, $page, $help_mod,$help_tagid,$size,$counter);
|
||||||
$text .= "</fieldset>";
|
$text .= "</fieldset>";
|
||||||
$c++;
|
$c++;
|
||||||
}
|
}
|
||||||
@@ -702,19 +703,25 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
$page_title = $tp->toDB($_POST['page_title']);
|
$page_title = $tp->toDB($_POST['page_title']);
|
||||||
|
|
||||||
|
// print_a($_POST);
|
||||||
|
|
||||||
|
|
||||||
// if(is_array($_POST['data']) && is_array($_POST['subtitle']))
|
// if(is_array($_POST['data']) && is_array($_POST['subtitle']))
|
||||||
|
$newData = "";
|
||||||
|
foreach($_POST as $k=>$v)
|
||||||
{
|
{
|
||||||
$newData = "";
|
if(substr($k,0,4)=='data')
|
||||||
foreach($_POST['data'] as $key=>$val)
|
|
||||||
{
|
{
|
||||||
|
list($tm,$key) = explode("_",$k);
|
||||||
|
|
||||||
$newData .= "[newpage=".$_POST['page_subtitle'][$key]."]\n";
|
$newData .= "[newpage=".$_POST['page_subtitle'][$key]."]\n";
|
||||||
$newData .= $_POST['data'][$key]."\n\n";
|
$newData .= $v."\n\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
echo $newData;
|
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// echo $newData;
|
||||||
|
|
||||||
$page_text = $tp->toDB($newData);
|
$page_text = $tp->toDB($newData);
|
||||||
$pauthor = ($_POST['page_display_authordate_flag'] ? USERID : 0); // Ideally, this check should be done in the front-end.
|
$pauthor = ($_POST['page_display_authordate_flag'] ? USERID : 0); // Ideally, this check should be done in the front-end.
|
||||||
|
3
page.php
3
page.php
@@ -332,6 +332,8 @@ class pageClass
|
|||||||
public function parsePage()
|
public function parsePage()
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
e107::getBB()->setClass("page");
|
||||||
|
|
||||||
$this->pageTitles = array(); // Notice removal
|
$this->pageTitles = array(); // Notice removal
|
||||||
|
|
||||||
if(preg_match_all("/\[newpage.*?\]/si", $this->pageText, $pt))
|
if(preg_match_all("/\[newpage.*?\]/si", $this->pageText, $pt))
|
||||||
@@ -406,6 +408,7 @@ class pageClass
|
|||||||
echo "<pre>"; print_r($this->pageTitles); echo "</pre>";
|
echo "<pre>"; print_r($this->pageTitles); echo "</pre>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
e107::getBB()->clearClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageIndex()
|
function pageIndex()
|
||||||
|
Reference in New Issue
Block a user