it:tools:db:wpexport
Differences
This shows you the differences between two versions of the page.
it:tools:db:wpexport [2019/01/12 17:53] – external edit 127.0.0.1 | it:tools:db:wpexport [2020/01/01 00:03] (current) – removed arvid | ||
---|---|---|---|
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++; | ||
- | | ||
- | } | ||
- | |||
- | ?> | ||
- | </ |
it/tools/db/wpexport.1547312016.txt.gz · Last modified: 2019/01/12 17:53 by 127.0.0.1