it:tools:db:wpexport
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | it:tools:db:wpexport [2019/01/12 17:53] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== WordPress exporter ====== | ||
+ | > Traduzione italiana (a tratti libera) della pagina [[tools: | ||
+ | > | ||
+ | > // | ||
+ | |||
+ | |||
+ | Porre questo file nella " | ||
+ | |||
+ | Importare la tabella '' | ||
+ | |||
+ | **IMPORTANTE!** non appena si ha terminato, cancellare questo file dal server! | ||
+ | |||
+ | Un ringraziamento particolare a tutti quelli che hanno scritto [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | | ||
+ | require_once(' | ||
+ | require_once(INCLUDES_DIR.' | ||
+ | | ||
+ | if (function_exists(' | ||
+ | system_init(); | ||
+ | } else { | ||
+ | plugin_loadall(); | ||
+ | } | ||
+ | | ||
+ | header(' | ||
+ | |||
+ | | ||
+ | function toutf($str) { | ||
+ | // comment this one and uncomment the following line if you're using SPB! | ||
+ | return $str; | ||
+ | |||
+ | //return mb_convert_encoding($str, | ||
+ | } | ||
+ | |||
+ | error_reporting(E_ALL); | ||
+ | |||
+ | $WP_PREFIX = ' | ||
+ | | ||
+ | $POSTID = 10; | ||
+ | $COMMENTID = 10; | ||
+ | | ||
+ | $SQL_STRING = ''; | ||
+ | | ||
+ | $o = new entry_indexer(); | ||
+ | |||
+ | $list = $o-> | ||
+ | | ||
+ | foreach($list as $id => $c) { | ||
+ | | ||
+ | $e = entry_parse($id); | ||
+ | | ||
+ | $obj =& new comment_indexer($id); | ||
+ | $clist = $obj-> | ||
+ | $ccount = count($clist); | ||
+ | $date = date(" | ||
+ | |||
+ | | ||
+ | $SQL_STRING = " | ||
+ | $SQL_STRING .= " | ||
+ | addslashes(toutf($e[' | ||
+ | $SQL_STRING .= sanitize_title($e[' | ||
+ | | ||
+ | echo $SQL_STRING; | ||
+ | | ||
+ | foreach ($clist as $cid) { | ||
+ | $c = comment_parse($id, | ||
+ | $cdate = date(" | ||
+ | $SQL_STRING = " | ||
+ | $SQL_STRING .= " | ||
+ | $SQL_STRING .= addslashes(toutf($c[' | ||
+ | | ||
+ | echo $SQL_STRING; | ||
+ | | ||
+ | $COMMENTID++; | ||
+ | |||
+ | } | ||
+ | | ||
+ | | ||
+ | $POSTID++; | ||
+ | | ||
+ | } | ||
+ | |||
+ | ?> | ||
+ | </ |