I have an array of information of places and I wanna use them to create multiple pages in a phpfox site.
First I tried to manually insert data in phpfox database (in tables of phpfox_pages and phpfox_pages_text).
The page is shown up in the site but when opening it's link, the site says:
The page you are looking for cannot be found.
Do you know what other tables should I manipulate to make it work? Or do you know any plugin for phpfox to do the same?
Thanks,
Solved ( With @Purefan Guide):
"Pages" also has a user
If you take a look at phpfox_user
table, you'll found out how to fetch new records on that. But there are two ambiguous fields in that table ( password
& password_salt
). You can use this script to create values for the fields:
<?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));