Automatically create pages in phpfox -


i have array of information of places , wanna use them create multiple pages in phpfox site.

first tried manually insert data in phpfox database (in tables of phpfox_pages , phpfox_pages_text).

the page shown in site when opening it's link, site says:

the page looking cannot found.

do know other tables should manipulate make work? or know plugin phpfox same?

thanks,



solved ( @purefan guide):

"pages" has user

if take @ phpfox_user table, you'll found out how fetch new records on that. there 2 ambiguous fields in table ( password & password_salt). can use script create values fields:

<?php function generaterandomstring() {     $length = 164;     $characters = '-_0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz';     $randomstring = '';     ($i = 0; $i < $length; $i++) {     $randomstring .= $characters[rand(0, strlen($characters) - 1)];     }     return $randomstring; }  $ssalt = ''; ($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)); 

phpfox has 2 similar modules: "pages" , "page", create "pages" if want people "like" them, post in them, add photos... "page" static think want, in case add phpfox_page , phpfox_page_text

edit: ok forgetting insert phpfox_user, "pages" has user, following should shed light:

$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         )     ); 

look in file /module/pages/include/service/process.class.add around line 338 (depending on version).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -