Created
March 8, 2016 03:14
-
-
Save mrmt/5e98864eb0375e00a6ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++ nucleus/plugins/impexp/template/np_impexp/entry_japanese-utf8.txt.org 2010-09-11 13:14:09.265971760 +0900 | |
--- nucleus/plugins/impexp/template/np_impexp/entry_japanese-utf8.txt 2010-09-05 10:22:30.000000000 +0900 | |
@@ -1,6 +1,5 @@ | |
AUTHOR: {{author}} | |
TITLE: {{title}} | |
+ ITEMID: {{itemid}} | |
STATUS: {{status}} | |
ALLOW COMMENTS: {{allow_comments}} | |
CONVERT BREAKS: {{convert_breaks}} | |
--- nucleus/plugins/NP_ImpExp.php.org 2010-09-11 13:22:20.939423749 +0900 | |
+++ nucleus/plugins/NP_ImpExp.php 2010-09-10 20:52:50.000000000 +0900 | |
@@ -107,6 +107,29 @@ | |
); | |
} | |
+ // mrmt | |
+ function unfold($source){ | |
+ $in_pre = 0; | |
+ $buf = ''; | |
+ foreach(explode("\n", $source) as $line){ | |
+ $line = rtrim($line); | |
+ if(preg_match('<pre>', $line)){ | |
+ $in_pre = 1; | |
+ } | |
+ if(preg_match('</pre>', $line)){ | |
+ $in_pre = 0; | |
+ } | |
+ if(preg_match('/[a-zA-Z0-9]$/', $line) && !$in_pre){ | |
+ $buf .= ' '; | |
+ } | |
+ $buf .= $line; | |
+ if($in_pre){ | |
+ $buf .= "\n"; | |
+ } | |
+ } | |
+ return $buf; | |
+ } | |
+ | |
function init(){ | |
// include language file for this plugin | |
$language = ereg_replace( '[\\|/]', '', getLanguageName()); | |
@@ -387,6 +410,7 @@ | |
$itemVar['convert_breaks'] = $stripbr ? 1 : 0; | |
$itemVar['body'] = $item->body; | |
+ $itemVar['itemid'] = $item->itemid; // mrmt | |
$itemVar['more'] = $item->more; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NucleusからWordPressへ移行 - なんか:かんがえて-6
http://blog.mrmt.net/entry/2010/09/11/050933