我有一系列的位置信息,我想使用它们在phpfox站点中创建多个页面。
首先,我尝试在phpfox数据库中手动插入数据(在、phpfox_pages、和phpfox_pages表中)。
该页面显示在网站中,但当打开它的链接时,该站点会说:
找不到您要查找的页面。
你知道我应该操作哪些其他表来使它正常工作吗?或者你知道有什么插件可以让phpfox做同样的事情吗?
谢谢,
解决了(与@Purefan指南):
“页面”也有一个用户。
如果您查看phpfox_user表,您将了解如何在该表上获取新记录。但是该表中有两个不明确的字段( password & password_salt)。可以使用此脚本为字段创建值:
<?php
function generateRandomString()
{
$length = 164;
$characters = '-_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
$sSalt = '';
for ($i = 0; $i < 3; $i++)
{
$sSalt .= chr(rand(33, 91));
}
$sPossible = generateRandomString();
$sPassword = '';
$i = 0;
while ($i < 10)
{
$sPassword .= substr($sPossible, mt_rand(0, strlen($sPossible)-1), 1);
$i++;
}
$password_Salt_Field = $sSalt;
$password_Field = md5(md5($sPassword) . md5($sSalt));发布于 2013-05-18 23:26:45
Phpfox有两个非常相似的模块:“页面”和“页面”,如果您想让人们“喜欢”它们,在其中发布,添加照片,您可以创建“页面”。“页面”是静态的,所以我认为这是您想要的,在这种情况下,我将添加到phpfox_page和phpfox_page_text中
编辑:好的,那么您可能忘记插入到phpfox_user中,“页面”也有一个用户,下面应该说明了一些情况:
$iUserId = $this->database()->insert(Phpfox::getT('user'), array(
'profile_page_id' => $iId,
'user_group_id' => NORMAL_USER_ID,
'view_id' => '7',
'full_name' => $this->preParse()->clean($aVals['title']),
'joined' => PHPFOX_TIME,
'password' => Phpfox::getLib('hash')->setHash($sPassword, $sSalt),
'password_salt' => $sSalt
)
);查看第338行附近的文件/module/pages/include/service/process.class.add (取决于您的版本)。
https://stackoverflow.com/questions/16628637
复制相似问题