=================================================
Version: SmartSection 2.12 patch
Date:   2006-12-17
Author: Kenichi OHWADA
URL:    http://linux.ohwada.jp/
Email:  webmaster@ohwada.jp
=================================================

 ύXꗗ
L̕sC
(1) $max_imgsize `
(2) uRg@\𖳌ɁvƁANotice \
(3) L[[h\
(4) PDF
(5) uL[őMv

Lǉ
(6) XFsection ̃C|[g


 ڍ
(1) $max_imgsize `
Ytt@C̒ǉŉL Notice o
-----
Notice [PHP]: Undefined variable: max_imgsize in file smartsection/include/fileform.inc.php line 42
-----

include/fileform.inc.php
------
$max_imgsize = 0;	// ǉ
$file_box = new XoopsFormFile(_MD_SSECTION_FILE_TO_UPLOAD, "userfile", $max_imgsize);
------

(2) uRg@\𖳌ɁvƁANotice \ 
uRg@\𖳌ɁvƁAL̃G[\
------
Notice [PHP]: Undefined variable: com_itemid in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_order in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_mode in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: link_extra in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_itemid in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_order in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_mode in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: link_extra in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_itemid in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_order in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: com_mode in file smartsection/item.php line 192
Notice [PHP]: Undefined variable: link_extra in file smartsection/item.php line 192
Notice [PHP]: Undefined index: commentsnav in file smartsection/item.php line 193
------

comment_view gpƂ̏
comment_view.php ł́A
ʐݒ̃Rg@\L̂ƂɁA\
u XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule'] v
Aitemp.php ł́A
u$itemObj->cancomment() == 1v ̂Ƃ́A
u smartsection_getConfig('com_rule') <> 0 v ͔肳Ȃ

item.php
-----
// if (($itemObj->cancomment() == 1) || (!$xoopsModuleConfig['commentatarticlelevel'] && smartsection_getConfig('com_rule') <> 0)) {
 
if ( (($itemObj->cancomment() == 1) || !$xoopsModuleConfig['commentatarticlelevel'] ) && (smartsection_getConfig('com_rule') <> 0) ) {
-----

(3) L[[h\
Ql [url=http://smartfactory.ca/modules/newbb/viewtopic.php?topic_id=1211&forum=5&post_id=5337]Bug: cannot show keyword in Japanese[/url]

class/keyhighlighter.php
------
function highlight ($buffer) {

// LC
 $this->preg_keywords = preg_replace ('/[^\w ]/si', '', $this->keywords);
 
  
 
 if ( XOOPS_USE_MULTIBYTES ) {
   $this->preg_keywords = trim($this->keywords);
  } else {
    $this->preg_keywords = preg_replace ('/[^\w ]/si', '', $this->keywords);
 }
 
}
------

(4) PDF
Ql [url=http://xoopscube.jp/modules/xhnewbb/viewtopic.php?topic_id=3414&forum=5]SmartSection ->pdf->{[/url]
L̋c_̂AKvƎvƂ؂o

fpdf/language/japanese.php
------
// Lǉ

// overwrite class PDF_Japanese in fpdf/japanese.php 
function SJISWrite($h,$txt,$link)
{
	$txt = $this->_jp_encoding($txt, 'SJIS-win', 'EUC-JP');
	parent::SJISWrite($h,$txt,$link);
}
 
// overwrite class FPDF in fpdf.php 
function _putinfo()
{
	$this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
	if(!empty($this->title))
		$this->_out('/Title '. $this->_jp_putinfohexstring($this->title) );
	if(!empty($this->subject))
		$this->_out('/Subject '.$this->_jp_putinfohexstring($this->subject));
	if(!empty($this->author))
		$this->_out('/Author '.$this->_jp_putinfohexstring($this->author));
	if(!empty($this->keywords))
		$this->_out('/Keywords '.$this->_jp_putinfohexstring($this->keywords));
	if(!empty($this->creator))
		$this->_out('/Creator '.$this->_jp_putinfohexstring($this->creator));
	$this->_out('/CreationDate '.$this->_textstring('D:'.date('YmdHis')));
}
 
function _jp_putinfohexstring($s)
{
	//Format a text string
	//for infomation properties hex
	$s = $this->_jp_encoding($s , 'UTF-16BE', 'EUC-JP') ;
	$s = '<' . 'FEFF' . strtoupper(bin2hex($s)) . '>'; // FEFF is BOM
	return $s ;
}
 
function _jp_encoding(&$text, $out_charset, $in_charset)
{
	if ( function_exists('mb_convert_encoding') ) {
		$text = mb_convert_encoding($text, $out_charset, $in_charset);
	} elseif( function_exists('iconv') ) {
		$text = iconv($in_charset, $out_charset . "//TRANSLIT", $text);
	}
	return $text;
}
------

(5) uL[őMv
Ql [url=http://linux.ohwada.jp/modules/smartsection/item.php?itemid=159]XOOPS FBɏЉFC W[[/url]

class/item.php
------
function getAdminLinks()
{

// LC
//	$maillink = "mailto:?subject=" . sprintf(_MD_SSECTION_INTITEM, $xoopsConfig['sitename']) . "&amp;body=" . sprintf(_MD_SSECTION_INTITEMFOUND, $xoopsConfig['sitename']) . ": " . $this->getItemUrl();
 
	$subject = sprintf(_MD_SSECTION_INTITEM, $xoopsConfig['sitename']);
	$body    = sprintf(_MD_SSECTION_INTITEMFOUND, $xoopsConfig['sitename']) . ": \n" . $this->getItemUrl();
	$subject = $this->convert_for_japanese($subject);
	$body    = $this->convert_for_japanese($body);
	$maillink = "mailto:?subject=" . $subject . "&amp;body=" . $body;
}


// Lǉ
function convert_for_japanese($str)
{
// no action, if not flag
	if ( ! _SSECTION_FLAG_JP_CONVERT )
	{
		return $str;
	}

// no action, if not Japanese
	global $xoopsConfig;
	if ( $xoopsConfig['language'] != 'japanese' )
	{
		return $str;
	}

// presume OS Browser
	$agent = $_SERVER["HTTP_USER_AGENT"];
	$os      = '';
	$browser = '';
	if (preg_match("/Win/i", $agent))
	{	$os = 'win';	}
	if (preg_match("/MSIE/i", $agent))
	{	$browser = 'msie';	}

// if msie
	if ( ($os == 'win') && ($browser == 'msie') )
	{
// if multibyte
		if ( function_exists('mb_convert_encoding') )
		{
			$str = mb_convert_encoding($str, 'SJIS', 'EUC-JP');
			$str = rawurlencode($str);
		}
	}

	return $str;
}
------

(6) XFsection ̃C|[g
Ql [url=http://linux.ohwada.jp/modules/smartsection/item.php?itemid=309]XFsection  SmartSection ւ̈ڐ[/url]
XFSection 1.xx  SmartSection 2.1 ւ̈ڐ݂̂߂̃vOłB

(a) gp@
SmartSection fBNgɃRs[ĂB
SmartSection ̊Ǘ҉ʂɂāAuC|[gvNbN
L̃C|[gʂɂāAuXFsectionvIB
XF-Section C|[gʂɂāAuC|[gv{^NbN
C|[gʂ\

(b) ڐ݂
pe[u
- category 
- article (items) 
- files 

pȂe[u
- config 
- broken 
- votedata 

ڍׂ́Aimport_xfsection_ja_sjis.html 
