Changeset 6349
- Timestamp:
- 06/27/08 16:24:46 (5 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/CL_Moblog/index.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/CL_Moblog/index.php
r6294 r6349 146 146 $mail['text'] = preg_replace( '@<BR>\s*<BR>\s*<BR>@smi', '<BR>', $mail['text']); 147 147 } 148 $text = "<h3 id=\"$docid\">$docid</h3>\r\n"; 149 $text .= empty($mail['subject']) ? '' : ("<p>".$mail['subject']."</p>\r\n"); 150 $text .= "<p>{$mail['text']}</p>\r\n"; 148 $text = "<h3 class=\"moblog-title\" id=\"$docid\">$docid</h3>\r\n"; 149 //$text .= empty($mail['subject']) ? '' : ("<p>".$mail['subject']."</p>\r\n"); 150 if( !empty($mail['text']) ) { 151 $text .= "<div class=\"moblog-body\">{$mail['text']}</div>\r\n"; 152 } 151 153 return $text; 152 154 } … … 197 199 198 200 $post = new Post(); 201 $moblog_begin = "\n<div class=\"moblog-entry\">"; 202 $moblog_end = "\n</div>\n"; 199 203 200 204 if( $post->open( "slogan = '$slogan'" ) ) { 201 205 $this->log( "* 기존 글을 엽니다. (SLOGAN:$slogan)" ); 202 $post->content .= $ this->_getDecoratedContent( $mail, $docid );206 $post->content .= $moblog_begin.$this->_getDecoratedContent( $mail, $docid ); 203 207 $post->modified = time(); 204 208 $post->visibility = $this->visibility; … … 214 218 $post->userid = $this->userid; 215 219 $post->category = $this->category; 216 $post->content = $ this->_getDecoratedContent( $mail, $docid );220 $post->content = $moblog_begin.$this->_getDecoratedContent( $mail, $docid ); 217 221 $post->contentFormatter = getDefaultFormatter(); 218 222 $post->contentEditor = getDefaultEditor(); … … 235 239 if( isset( $mail['attachments'] ) && count($mail['attachments']) ) { 236 240 requireModel( "blog.api" ); 241 $post->content .= "<div class=\"moblog-attachments\">\n"; 237 242 foreach( $mail['attachments'] as $mail_att ) { 238 243 $this->log( "* ". _t("첨부")." : {$mail_att['filename']}" ); … … 250 255 } 251 256 $alt = htmlentities($mail_att['filename'],ENT_QUOTES,'utf-8'); 252 $content =' <p>[##_1C|$FILENAME|width="$WIDTH" height="$HEIGHT" alt="'.$alt.'"|_##]</p>';257 $content ='[##_1C|$FILENAME|width="$WIDTH" height="$HEIGHT" alt="'.$alt.'"|_##]'; 253 258 $content = str_replace( '$FILENAME', $att['name'], $content ); 254 259 $content = str_replace( '$WIDTH', $att['width'], $content ); … … 256 261 $post->content .= $content; 257 262 } 258 if( !$post->update() ) { 259 $this->logMail( $mail, "ERROR" ); 260 $this->log( _t("실패: 첨부파일을 본문에 연결하지 못하였습니다").". : " . $post->error ); 261 return false; 262 } 263 $post->content .= "\n</div>"; 264 } 265 $post->content .= $moblog_end; 266 267 if( !$post->update() ) { 268 $this->logMail( $mail, "ERROR" ); 269 $this->log( _t("실패: 첨부파일을 본문에 연결하지 못하였습니다").". : " . $post->error ); 270 return false; 263 271 } 264 272 $this->logMail( $mail, "OK" );
