本文整理汇总了PHP中TikiLib::create_page方法的典型用法代码示例。如果您正苦于以下问题:PHP TikiLib::create_page方法的具体用法?PHP TikiLib::create_page怎么用?PHP TikiLib::create_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TikiLib
的用法示例。
在下文中一共展示了TikiLib::create_page方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tra
* @param $s
* @return mixed
*/
function tra($s)
{
return $s;
}
$tikilib = new TikiLib();
$structId = '160';
$pages = explode("\n", `grep -r '{\$helpurl}' templates | sed -e "s/^.*helpurl}\\([^\\"']*\\)[\\"'].*\$/\\1/" | sort | uniq`);
$afterid = NULL;
foreach ($pages as $p) {
if ($p) {
echo $p;
if (!$tikilib->page_exists($p)) {
$tikilib->create_page($p, 0, 'to do', time(), 'automatic import from RestoreHelp script', 'RestoreHelp', 'RestoreHelp', 'to do');
echo ', not found, is created,';
}
if ($structlib->page_is_in_structure($p)) {
$alls = $structlib->get_page_structures($p, 'Help');
if (count($alls)) {
echo ". It is in Help structure with Id ";
echo $alls[0]["req_page_ref_id"];
$tikilib->remove_from_structure($alls[0]["req_page_ref_id"]);
echo ": erased and";
}
}
$afterid = $structlib->s_create_page($structId, $afterid, $p);
echo " created with id : {$afterid}";
echo "\n";
}