Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
+++ 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;
}
@mrmt

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2016

NucleusからWordPressへ移行 - なんか:かんがえて-6
http://blog.mrmt.net/entry/2010/09/11/050933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.