codes****@googl*****
codes****@googl*****
2008年 9月 21日 (日) 22:37:49 JST
Author: tsuchi000 Date: Sun Sep 21 06:29:22 2008 New Revision: 670 Added: trunk/plugins/japanize/ trunk/plugins/japanize/admin/ trunk/plugins/japanize/admin/convertconfig_1.4.1jp_to_1.5.0.php trunk/plugins/japanize/admin/index.php trunk/plugins/japanize/admin/information.php trunk/plugins/japanize/admin/install.php trunk/plugins/japanize/admin/japanize_functions.php trunk/plugins/japanize/admin/settings.php trunk/plugins/japanize/doc/ trunk/plugins/japanize/doc/v1.0.0b2_changes.txt trunk/plugins/japanize/doc/v1.0.0b3_changes.txt trunk/plugins/japanize/doc/v1.0.1_changes.txt trunk/plugins/japanize/functions.inc trunk/plugins/japanize/install_defaults.php trunk/plugins/japanize/language/ trunk/plugins/japanize/language/japanese_utf-8.php trunk/plugins/japanize/public_html/ trunk/plugins/japanize/public_html/disabledmsg.html trunk/plugins/japanize/public_html/images/ trunk/plugins/japanize/public_html/images/japanize.png (contents, props changed) trunk/plugins/japanize/public_html/inex.html trunk/plugins/japanize/public_html/memberlogin_help.php trunk/plugins/japanize/readme_ja.txt trunk/plugins/japanize/sql/ trunk/plugins/japanize/sql/sql_japanize_1.php trunk/plugins/japanize/sql/sql_japanize_105.php trunk/plugins/japanize/sql/sql_japanize_107.php trunk/plugins/japanize/sql/sql_japanize_2.php trunk/plugins/japanize/sql/sql_japanize_3.php trunk/plugins/japanize/sql/sql_japanize_4.php trunk/plugins/japanize/sql/sql_japanize_5.php trunk/plugins/japanize/sql/sql_japanize_6.php trunk/plugins/japanize/sql/sql_japanize_7.php trunk/plugins/japanize/templates/ trunk/plugins/japanize/templates/admin/ trunk/plugins/japanize/templates/admin/index.thtml trunk/plugins/japanize/templates/admin/information.thtml trunk/plugins/japanize/templates/admin/settings.thtml trunk/plugins/japanize/templates/custom-memberlogin.thtml trunk/plugins/japanize/version.php Log: geeklog-1-jp-extended/plugins/japanize 1.0.1 add Added: trunk/plugins/japanize/admin/convertconfig_1.4.1jp_to_1.5.0.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/convertconfig_1.4.1jp_to_1.5.0.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,236 @@ +<?php +/* Reminder: always indent with 4 spaces (no tabs). */ +// +---------------------------------------------------------------------------+ +// | userconfig_bak.php(userconfigプラグインのデータバックアップ ) | +// | をGl1.5.0 のconfigテーブルに移行する処 理 | +// +---------------------------------------------------------------------------+ +// $Id: convertconfig_1.4.1_to_1.5.0.php +// public_html/admin/plugins/japanize/convertconfig_1.4.1jp_to_1.5.0.php +// 20080717 tsuchi AT geeklog DOT jp + +// + +define ('THIS_SCRIPT', 'convertconfig_1.4.1jp_to_1.5.0.php'); +define ('THIS_PLUGIN', 'japanize'); +//define ('THIS_SCRIPT', 'test.php'); + +include_once('japanize_functions.php'); + +function fncDisply() +{ + global $_CONF; + + $retval = ""; + $retval .= "<h1>Config 移行 </h1>".LB; + + if (file_exists($_CONF["path_data"]."userconfig_bak.php")) { + $retval .= "userconfig_bak.php(userconfigプラグインのデータバックア ップ)".LB; + $retval .= "をconfigテーブルに移行します".LB; + $retval .= "<form action="."'".THIS_SCRIPT."'"."method='post'>".LB; + $retval .= " <input type='submit' name='action' value='実 行'>".LB; + $retval .= " <input type='submit' name='action' value='キャンセ ル'>".LB; + $retval .= "</form>".LB; + }else{ + $retval .= "userconfig_bak.php(userconfigプラグインのデータバックア ップ)".LB; + $retval .= "が存在しません".LB; + } + + + return $retval ; + +} + +function fncSubmit($config) +{ + global $_CONF; + + //実行 + if (file_exists($_CONF["path_data"]."userconfig_bak.php")) { + require_once( $_CONF["path_data"]."userconfig_bak.php" ); + + $config->set('site_name', $_CONF['site_name']); + $config->set('site_slogan', $_CONF['site_slogan']); + + $config->set('theme', $_CONF['theme']); + + $config->set('menu_elements', $_CONF['menu_elements']); + + + $config->set('site_mail', $_CONF['site_mail']); + + $config->set('disable_new_user_registration', $_CONF['disable_new_user_registration']); + $config->set('disable_autolinks', $_CONF['disable_autolinks']); + + $config->set('loginrequired', $_CONF['loginrequired']); + + $config->set('submitloginrequired', $_CONF['submitloginrequired']); + $config->set('commentsloginrequired', $_CONF['commentsloginrequired']); + $config->set('statsloginrequired', $_CONF['statsloginrequired']); + $config->set('searchloginrequired', $_CONF['searchloginrequired']); + $config->set('profileloginrequired', $_CONF['profileloginrequired']); + $config->set('emailuserloginrequired', $_CONF['emailuserloginrequired']); + $config->set('emailstoryloginrequired', $_CONF['emailstoryloginrequired']); + $config->set('directoryloginrequired', $_CONF['directoryloginrequired']); + + $config->set('storysubmission', $_CONF['storysubmission']); + $config->set('usersubmission', $_CONF['usersubmission']); + + $config->set('allow_user_themes', $_CONF['allow_user_themes']); + $config->set('allow_username_change', $_CONF['allow_username_change']); + $config->set('allow_account_delete', $_CONF['allow_account_delete']); + + $config->set('hide_author_exclusion', $_CONF['hide_author_exclusion']); + + $config->set('advanced_editor', $_CONF['advanced_editor']); + $config->set('notification', $_CONF['notification']); + $config->set('listdraftstories', $_CONF['listdraftstories']); + + $config->set('maximagesperarticle', $_CONF['maximagesperarticle']); + $config->set('limitnews', $_CONF['limitnews']); + $config->set('innews', $_CONF['innews']); + + $config->set('contributedbyline', $_CONF['contributedbyline']); + $config->set('hideviewscount', $_CONF['hideviewscount']); + + $config->set('hideemailicon', $_CONF['hideemailicon']); + $config->set('hideprintericon', $_CONF['hideprintericon']); + $config->set('allow_page_breaks', $_CONF['allow_page_breaks']); + + $config->set('article_image_align', $_CONF['article_image_align']); + + $config->set('show_topic_icon', $_CONF['show_topic_icon']); + $config->set('max_image_width', $_CONF['max_image_width']); + $config->set('max_image_height', $_CONF['max_image_height']); + $config->set('max_topicicon_width', $_CONF['max_topicicon_width']); + $config->set('max_topicicon_height', $_CONF['max_topicicon_height']); + $config->set('postmode', $_CONF['postmode']); + + $config->set('showstorycount', $_CONF['showstorycount']); + $config->set('showsubmissioncount', $_CONF['showsubmissioncount']); + $config->set('hide_home_link', $_CONF['hide_home_link']); + + $config->set('hidenewstories', $_CONF['hidenewstories']); + $config->set('hidenewcomments', $_CONF['hidenewcomments']); + $config->set('hidenewtrackbacks', $_CONF['hidenewtrackbacks']); + $config->set('hidenewplugins', $_CONF['hidenewplugins']); + + + $config->set('default_permissions_block', $_CONF['default_permissions_block']); + $config->set('default_permissions_story', $_CONF['default_permissions_story']); + $config->set('default_permissions_topic', $_CONF['default_permissions_topic']); + + $config->set('censormode', $_CONF['censormode']); + $config->set('censorreplace', $_CONF['censorreplace']); + $config->set('censorlist', $_CONF['censorlist']); + + $config->set('allow_domains', $_CONF['allow_domains']); + + $config->set('url_rewrite', $_CONF['url_rewrite']); + + $config->set('date', $_CONF['date']); + + $config->set('daytime', $_CONF['daytime']); + $config->set('shortdate', $_CONF['shortdate']); + $config->set('dateonly', $_CONF['dateonly']); + $config->set('timeonly', $_CONF['timeonly']); + $config->set('week_start', $_CONF['week_start']); + + $config->set('image_lib', $_CONF['image_lib']); + $config->set('keep_unscaled_image', $_CONF['keep_unscaled_image']); + $config->set('trackback_enabled', $_CONF['trackback_enabled']); + + $config->set('pingback_enabled', $_CONF['pingback_enabled']); + $config->set('ping_enabled', $_CONF['ping_enabled']); + $config->set('trackback_code', $_CONF['trackback_code']); + $config->set('trackbackspeedlimit', $_CONF['trackbackspeedlimit']); + $config->set('backend', $_CONF['backend']); + $config->set('rdf_file', $_CONF['rdf_file']); + + $config->set('rdf_limit', $_CONF['rdf_limit']); + $config->set('rdf_storytext', $_CONF['rdf_storytext']); + $config->set('syndication_max_headlines', $_CONF['syndication_max_headlines']); + + $config->set('commentspeedlimit', $_CONF['commentspeedlimit']); + $config->set('comment_limit', $_CONF['comment_limit']); + $config->set('comment_code', $_CONF['comment_code']); + + $config->set('check_trackback_link', $_CONF['check_trackback_link']); + $config->set('multiple_trackbacks', $_CONF['multiple_trackbacks']); + $config->set('pingback_self', $_CONF['pingback_self']); + + $config->set('hour_mode', $_CONF['hour_mode']); + $config->set('rootdebug', $_CONF['rootdebug']); + $config->set('disallow_domains', $_CONF['disallow_domains']); + + $config->set('title_trim_length', $_CONF['title_trim_length']); + $config->set('draft_flag', $_CONF['draft_flag']); + $config->set('frontpage', $_CONF['frontpage']); + $config->set('hide_no_news_msg', $_CONF['hide_no_news_msg']); + $config->set('hide_main_page_navigation', $_CONF['hide_main_page_navigation']); + $config->set('onlyrootfeatures', $_CONF['onlyrootfeatures']); + + $config->set('newstoriesinterval', $_CONF['newstoriesinterval']); + $config->set('newcommentsinterval', $_CONF['newcommentsinterval']); + $config->set('newtrackbackinterval', $_CONF['newtrackbackinterval']); + $config->set('page_break_comments', $_CONF['page_break_comments']); + + $config->set('show_right_blocks', $_CONF['show_right_blocks']); + + //language_flag + // $_CONF['languages']=null; + // $_CONF['language_files']=null; + + //$_CONF['calendarloginrequired'] + + //$_CONF['eventsubmission'] + + //$_CONF['personalcalendars'] + //$_CONF['showupcomingevents'] + //$_CONF['upcomingeventsrange'] + //$_CONF['event_types'] + //$_CONF['default_permissions_event'] + + //$_CONF['locale'] + + + //----- + + } + return "実行しました!"; +} + + +// +---------------------------------------------------------------------------+ +// | MAIN | +// +---------------------------------------------------------------------------+ +$action =""; +if (isset ($_REQUEST['action'])) { + $action = COM_applyFilter($_REQUEST['action'],false); +} + + +$display = ''; +$display .= COM_siteHeader ('menu', $LANG_JPN['pinameadmin']); +if (isset ($_REQUEST['msg'])) { + $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], + true), 'japanize'); +} + +$display.=ppNavbar($navbarMenu,$LANG_JPN_admin_menu['4']); + +// 初期表示 +if ($action ==""){ + $display.=fncDisply(); +// 実行 +}elseif ($action =="実行"){ + $display.=fncSubmit($config); +}else{ + $display .="キャンセルしました!"; +} + +$display.= COM_siteFooter (); + +echo $display; + + +?> Added: trunk/plugins/japanize/admin/index.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/index.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,122 @@ +<?php + +/* Reminder: always indent with 4 spaces (no tabs). */ +// +---------------------------------------------------------------------------+ +// | index.php 更 新 | +// +---------------------------------------------------------------------------+ +// $Id: index.php +// public_html/admin/plugins/japanize/index.php +// 20080915 tsuchi AT geeklog DOT jp + +define ('THIS_SCRIPT', 'index.php'); +define ('THIS_PLUGIN', 'japanize'); +//define ('THIS_SCRIPT', 'test.php'); + +include_once('japanize_functions.php'); + + +// +---------------------------------------------------------------------------+ +// | 機能 テーブル更新実 行 | +// | 書式 fncCmdExec ($no) | +// +---------------------------------------------------------------------------+ +// | 引数 $no: | +// +---------------------------------------------------------------------------+ +// | 戻値 nomal:戻り画面&メッセー ジ | +// +---------------------------------------------------------------------------+ +function fncCmdExec ($no) +{ + global $_TABLES,$_CONF; + $_SQL =array(); + //require_once ("sql/sql_japanize_{$no}.php"); + require_once ($_CONF['path']."plugins/japanize/sql/sql_japanize_{$no}.php"); + + for ($i = 1; $i <= count($_SQL); $i++) { + $w=current($_SQL); + DB_query(current($_SQL)); + next($_SQL); + } + +} + +// +---------------------------------------------------------------------------+ +// | 機能 初期画面表 示 | +// | 書式 fncEdit () | +// +---------------------------------------------------------------------------+ + +function fncEdit () +{ + global $_CONF; + global $LANG04,$LANG_ADMIN; + + $retval = ''; + $T = new Template($_CONF['path'] . 'plugins/japanize/templates/admin'); + $T->set_file ('admin','index.thtml'); + + + $T->set_var('gltoken_name', CSRF_TOKEN); + $T->set_var('gltoken', SEC_createToken()); + $T->set_var ( 'xhtml', XHTML ); + + $this_script=$_CONF['site_admin_url']."/plugins/".THIS_PLUGIN."/".THIS_SCRIPT; + $T->set_var ( 'this_script', $this_script ); + + $T->set_var ('lang_submit', $LANG04[9]); + $T->set_var ('lang_cancel',$LANG_ADMIN['cancel']); + + + $T->parse('output', 'admin'); + $retval .= $T->finish($T->get_var('output')); + + return $retval; + +} + +// +---------------------------------------------------------------------------+ +// | MAIN | +// +---------------------------------------------------------------------------+ +$mode=""; +if (isset ($_REQUEST['mode'])) { + $mode = COM_applyFilter ($_REQUEST['mode'], false); +} + +if ((substr($mode,0,3)=="cmd") OR (substr($mode,0,3)=="ALL")){ + if (!SEC_checkToken()){ + COM_accessLog("User {$_USER['username']} tried to illegally and failed CSRF checks."); + echo COM_refresh($_CONF['site_admin_url'] . '/index.php'); + exit; + } +} + +$display = ''; +$display .= COM_siteHeader ('menu', $LANG_JPN['pinameadmin']); +if (isset ($_REQUEST['msg'])) { + $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], + true), 'japanize'); +} + +$display.=ppNavbar($navbarMenu,$LANG_JPN_admin_menu['1']); + +if (substr($mode,0,3)=="cmd") { + $no=trim($mode,"cmd"); + fncCmdExec($no); + + $url=$_CONF['site_admin_url'] . "/plugins/".THIS_PLUGIN."/".THIS_SCRIPT; + $url.="?msg={$no}"; + echo COM_refresh($url); + +}elseif (substr($mode,0,3)=="ALL") { + for ($no = 1; $no <= 7; $no++) { + fncCmdExec($no); + $var = 'PLG_japanize_MESSAGE'. $no; + $display .=$$var."<br>"; + } + $display .= COM_siteFooter (); +}else{// 初期表示、一覧表示 + $display .=fncEdit(); + $display .= COM_siteFooter (); +} + + +echo $display; + +?> Added: trunk/plugins/japanize/admin/information.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/information.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,52 @@ +<?php + +/* Reminder: always indent with 4 spaces (no tabs). */ +// +---------------------------------------------------------------------------+ +// | information.php 更 新 | +// +---------------------------------------------------------------------------+ +// $Id: information.php +// public_html/admin/plugins/japanize/information.php +// 20080729 tsuchi AT geeklog DOT jp + +// +// $Id: information.php + +define ('THIS_SCRIPT', 'information.php'); +define ('THIS_PLUGIN', 'japanize'); + +include_once('japanize_functions.php'); + + +$display = ''; +$display .= COM_siteHeader ('menu', $LANG_JPN['pinameadmin']); +if (isset ($_REQUEST['msg'])) { + $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], + true), 'japanize'); +} +$display.=ppNavbar($navbarMenu,$LANG_JPN_admin_menu['3']); + +// +$T = new Template($_CONF['path'] . 'plugins/japanize/templates/admin'); +$T->set_file ('admin','information.thtml'); + +$T->set_var( 'VERSION', "Geeklog".VERSION); + +if (file_exists($_CONF['path'] .'release_jp.php')) { + require_once ($_CONF['path'] .'release_jp.php'); + $T->set_var( 'release_jp', "日本語版".$release_jp); + $T->set_var( 'release_no', $release_no); + $T->set_var( 'release_date', "リリース日".$release_date); +}else{ + $T->set_var( 'release_jp', ""); + $T->set_var( 'release_no', ""); + $T->set_var( 'release_date', ""); +} + +$T->parse('output', 'admin'); +$display.= $T->finish($T->get_var('output')); +// +$display.= COM_siteFooter (); + +echo $display; + +?> Added: trunk/plugins/japanize/admin/install.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/install.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,357 @@ +<?php +// +---------------------------------------------------------------------------+ +// | install.php 更 新 | +// +---------------------------------------------------------------------------+ +// $Id: install.php +// public_html/admin/plugins/japanize/install.php +// 20080729 tsuchi AT geeklog DOT jp + +require_once ('../../../lib-common.php'); +require_once ($_CONF['path'] . 'plugins/japanize/functions.inc'); + +//-------------------- +// Plugin information +//-------------------- +// plugin display name +$pi_display_name = 'japanize'; +// Plugin name Must be 15 chars or less +$pi_name = 'japanize'; +// Plugin Version +$pi_version = $_JPN_CONF['version']; +// plugin suported GL version +$gl_version = '1.5.0'; +// plugin suport website url +$pi_url = 'http://www.geeklog.jp/filemgmt/index.php?id=340'; +// name of the Admin group +$pi_admin = $pi_display_name . ' Admin'; + + + +//---------------------------------------------------------------- +// the plugin's groups - assumes first group to be the Admin group +//---------------------------------------------------------------- +$GROUPS = array(); +$GROUPS[$pi_admin] = 'Has full access to ' . $pi_name . ' features'; + +//---------------------------------------------------------------- +// the plugin's feature - +//---------------------------------------------------------------- +$FEATURES = array(); +$FEATURES['japanize.edit'] = 'Access to assist editor'; + +//---------------------------------------------------------------- +// the plugin's mappings - +//---------------------------------------------------------------- +$MAPPINGS = array(); +$MAPPINGS['japanize.edit'] = array ($pi_admin); + +//---------------------------------------------------------------- +// (optional) data to pre-populate tables with +// Insert table name and sql to insert default data for your plugin. +// Note: '#group#' will be replaced with the id of the plugin's admin group. +//---------------------------------------------------------------- +$DEFVALUES = array(); // not used here - see plugin_postinstall +//$defvalues = 'defvalues_'.$_CONF['language'].'.php'; +//if (file_exists($defvalues)) { +// require_once ($defvalues); +//} + + + + +/** +* Plugin postinstall +* +* We're inserting our default here since it depends on other stuff that has +* to happen first ... +* +* @return boolean true = proceed with install, false = an error occured +* +*/ +//function plugin_postinstall() +// return true; +//} + +// ---------------------------------------------------------------- +// config情報ロード:Return OK:true NG:false +// ---------------------------------------------------------------- +function plugin_load_configuration() +{ + global $_CONF, $base_path; + + require_once $_CONF['path_system'] . 'classes/config.class.php'; + require_once $base_path . 'install_defaults.php'; + + return plugin_initconfig_japanize(); +} + +// ---------------------------------------------------------------------------- +// 以下はplugins共通の処理 通常変更の必要がない +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------- +// コアパッケージのチェック:Return OK:true NG:false +// ---------------------------------------------------------------- +function plugin_compatible_with_this_geeklog_version() +{ + if (!function_exists('COM_truncate') | | !function_exists('MBYTE_strpos')) { + return false; + } + + if (!function_exists('SEC_createToken')) { + return false; + } + + return true; +} + + +// ------ +// MAIN +// ------ +$base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/'; +$langfile = $base_path . "language/".$_CONF['language'] . '.php'; + + +if (file_exists($langfile)) { + require_once $langfile; +} else { + require_once $base_path . 'language/english.php'; +} +require_once $base_path . 'functions.inc'; + + +// Only let Root users access this page +// Root 管理者のみインストール可能です! +if (!SEC_inGroup('Root')) { + // Someone is trying to illegally access this page + COM_accessLog("Someone has tried to illegally access the {$pi_display_name} install/uninstall page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: {$_SERVER['REMOTE_ADDR']}", 1); + + $display = COM_siteHeader('menu', $LANG_ACCESS['accessdenied']) + . COM_startBlock($LANG_ACCESS['accessdenied']) + . $LANG_ACCESS['plugin_access_denied_msg'] + . COM_endBlock() + . COM_siteFooter(); + + echo $display; + exit; +} + +// lib-portalparts.php があるかどうかチェック! +$portalparts = $_CONF['path_system'] . 'lib-portalparts.php'; + +if (!file_exists($portalparts)) { + $msg="system/lib-portalparts.php not exist!<br>"; + $msg="system/lib-portalparts.php がありません!<br>"; + $display = COM_siteHeader('menu', "lib-portalparts.php check!") + . COM_startBlock("lib-portalparts.php check!") + . $msg + . COM_endBlock() + . COM_siteFooter(); + + echo $display; + exit; +} + +/** +* インストール +* Puts the datastructures for this plugin into the Geeklog database +* +*/ +function plugin_install_now() +{ + global $_CONF, $_TABLES, $_USER, $_DB_dbms, + $GROUPS, $FEATURES, $MAPPINGS, $DEFVALUES, $base_path, + $pi_name, $pi_display_name, $pi_version, $gl_version, $pi_url; + + COM_errorLog("Attempting to install the $pi_display_name plugin", 1); + + // create the plugin's groups + $admin_group_id = 0; + foreach ($GROUPS as $name => $desc) { + COM_errorLog("Attempting to create $name group", 1); + + $grp_name = addslashes($name); + $grp_desc = addslashes($desc); + DB_query("INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) VALUES ('$grp_name', '$grp_desc')", 1); + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + + // replace the description with the new group id so we can use it later + $GROUPS[$name] = DB_insertId(); + + // assume that the first group is the plugin's Admin group + if ($admin_group_id == 0) { + $admin_group_id = $GROUPS[$name]; + } + } + + // Create the plugin's table(s) + $_SQL = array(); + if (file_exists($base_path . 'sql/' . $_DB_dbms . '_install.php')) { + require_once $base_path . 'sql/' . $_DB_dbms . '_install.php'; + } + + if (count($_SQL) > 0) { + $use_innodb = false; + if (($_DB_dbms == 'mysql') && + (DB_getItem($_TABLES['vars'], 'value', "name = 'database_engine'") + == 'InnoDB')) { + $use_innodb = true; + } + foreach ($_SQL as $sql) { + $sql = str_replace('#group#', $admin_group_id, $sql); + if ($use_innodb) { + $sql = str_replace('MyISAM', 'InnoDB', $sql); + } + DB_query($sql); + if (DB_error()) { + COM_errorLog('Error creating table', 1); + PLG_uninstall($pi_name); + + return false; + } + } + } + + // Add the plugin's features + COM_errorLog("Attempting to add $pi_display_name feature(s)", 1); + + foreach ($FEATURES as $feature => $desc) { + $ft_name = addslashes($feature); + $ft_desc = addslashes($desc); + DB_query("INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) " + . "VALUES ('$ft_name', '$ft_desc')", 1); + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + + $feat_id = DB_insertId(); + + if (isset($MAPPINGS[$feature])) { + foreach ($MAPPINGS[$feature] as $group) { + COM_errorLog("Adding $feature feature to the $group group", 1); + DB_query("INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, {$GROUPS[$group]})"); + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + } + } + } + + // Add plugin's Admin group to the Root user group + // (assumes that the Root group's ID is always 1) + COM_errorLog("Attempting to give all users in the Root group access to the $pi_display_name's Admin group", 1); + + DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES " + . "($admin_group_id, NULL, 1)"); + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + + // Pre-populate tables or run any other SQL queries + COM_errorLog('Inserting default data', 1); + foreach ($DEFVALUES as $sql) { + $sql = str_replace('#group#', $admin_group_id, $sql); + DB_query($sql, 1); + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + } + + // Load the online configuration records + if (function_exists('plugin_load_configuration')) { + if (!plugin_load_configuration()) { + PLG_uninstall($pi_name); + + return false; + } + } + + // Finally, register the plugin with Geeklog + COM_errorLog("Registering $pi_display_name plugin with Geeklog", 1); + + // silently delete an existing entry + DB_delete($_TABLES['plugins'], 'pi_name', $pi_name); + + DB_query("INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) VALUES " + . "('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)"); + + if (DB_error()) { + PLG_uninstall($pi_name); + + return false; + } + + // give the plugin a chance to perform any post-install operations + if (function_exists('plugin_postinstall')) { + if (!plugin_postinstall()) { + PLG_uninstall($pi_name); + + return false; + } + } + + COM_errorLog("Successfully installed the $pi_display_name plugin!", 1); + + return true; +} + + +// MAIN +$display = ''; + +if (SEC_checkToken()) { + if ($_REQUEST['action'] == 'uninstall') { + $uninstall_plugin = 'plugin_uninstall_' . $pi_name; + if ($uninstall_plugin()) { + $display = COM_refresh($_CONF['site_admin_url'] + . '/plugins.php?msg=45'); + } else { + $display = COM_refresh($_CONF['site_admin_url'] + . '/plugins.php?msg=73'); + } + } else if (DB_count($_TABLES['plugins'], 'pi_name', $pi_name) == 0) { + // plugin not installed + + if (plugin_compatible_with_this_geeklog_version()) { + if (plugin_install_now()) { + $display = COM_refresh($_CONF['site_admin_url'] + . '/plugins.php?msg=44'); + } else { + $display = COM_refresh($_CONF['site_admin_url'] + . '/plugins.php?msg=72'); + } + } else { + // plugin needs a newer version of Geeklog + $display .= COM_siteHeader('menu', $LANG32[8]) + . COM_startBlock($LANG32[8]) + . '<p>' . $LANG32[9] . '</p>' + . COM_endBlock() + . COM_siteFooter(); + } + } else { + // plugin already installed + $display .= COM_siteHeader('menu', $LANG01[77]) + . COM_startBlock($LANG32[6]) + . '<p>' . $LANG32[7] . '</p>' + . COM_endBlock() + . COM_siteFooter(); + } +} else { + $display = COM_refresh($_CONF['site_admin_url'].'/plugins.php'); +} + +echo $display; + +?> Added: trunk/plugins/japanize/admin/japanize_functions.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/japanize_functions.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,39 @@ +<?php +// +---------------------------------------------------------------------------+ +// | japanize_function 共通&navbarMenu設 定 | +// +---------------------------------------------------------------------------+ +// $Id: index.php +// public_html/admin/plugins/japanize/japanize_function.php +// 20080729 tsuchi AT geeklog DOT jp +require_once('../../../lib-common.php'); +require_once ($_CONF['path_system'] . 'lib-portalparts.php'); + + +// 権限チェック +if (!SEC_hasRights('japanize.edit')) { + $display=""; + $display .= COM_siteHeader('menu', $MESSAGE[30]); + $display .= COM_startBlock ($MESSAGE[30], '', + COM_getBlockTemplate ('_msg_block', 'header')); + $display .= $MESSAGE[35]; + $display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); + $display .= COM_siteFooter(); + + // Log attempt to error.log + COM_accessLog("User {$_USER['username']} tried to illegally access the japanize administration screen."); + + echo $display; + + exit; +} + +$navbarMenu = array( + $LANG_JPN_admin_menu['1'] => $_CONF['site_admin_url'] .'/plugins/'.THIS_PLUGIN.'/index.php', + $LANG_JPN_admin_menu['2'] => $_CONF['site_admin_url'] .'/plugins/'.THIS_PLUGIN.'/settings.php', + $LANG_JPN_admin_menu['3'] => $_CONF['site_admin_url'] .'/plugins/'.THIS_PLUGIN.'/information.php', + $LANG_JPN_admin_menu['4'] => $_CONF['site_admin_url'] .'/plugins/'.THIS_PLUGIN + .'/convertconfig_1.4.1jp_to_1.5.0.php' +); + + +?> \ No newline at end of file Added: trunk/plugins/japanize/admin/settings.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/admin/settings.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,113 @@ +<?php + +/* Reminder: always indent with 4 spaces (no tabs). */ +// +---------------------------------------------------------------------------+ +// | settings.php 設 定 | +// +---------------------------------------------------------------------------+ +// $Id: settings.php +// public_html/admin/plugins/japanize/settings.php +// 20080915 tsuchi AT geeklog DOT jp + +// + +define ('THIS_SCRIPT', 'settings.php'); +define ('THIS_PLUGIN', 'japanize'); +//define ('THIS_SCRIPT', 'test.php'); + +include_once('japanize_functions.php'); + + +// +---------------------------------------------------------------------------+ +// | 機能 テーブル更新実 行 | +// | 書式 fncCmdExec () | +// +---------------------------------------------------------------------------+ +// | 戻値 nomal:戻り画面&メッセー ジ | +// +---------------------------------------------------------------------------+ +function fncCmdExec () +{ + global $_TABLES,$_CONF; + + $Anonymous = COM_applyFilter($_POST['Anonymous']); + + $url=$_CONF['site_admin_url'] . "/plugins/".THIS_PLUGIN."/".THIS_SCRIPT; + if ($Anonymous!==""){ + $sql ="UPDATE {$_TABLES['users']} "; + $sql .=" SET `username` = '{$Anonymous}',"; + $sql .=" `fullname` = '{$Anonymous}' "; + $sql .=" WHERE `uid` =1 "; + $rt = DB_query($sql); + $url.="?msg=1001"; + } + echo COM_refresh($url); + +} + +// +---------------------------------------------------------------------------+ +// | 機能 初期画面表 示 | +// | 書式 fncEdit () | +// +---------------------------------------------------------------------------+ + +function fncEdit () +{ + global $_CONF; + global $_TABLES; + global $LANG04,$LANG_ADMIN; + + $retval = ''; + $T = new Template($_CONF['path'] . 'plugins/japanize/templates/admin'); + $T->set_file ('admin','settings.thtml'); + + $T->set_var('gltoken_name', CSRF_TOKEN); + $T->set_var('gltoken', SEC_createToken()); + $T->set_var ( 'xhtml', XHTML ); + + $this_script=$_CONF['site_admin_url']."/plugins/".THIS_PLUGIN."/".THIS_SCRIPT; + + $T->set_var ( 'this_script', $this_script ); + + $val=DB_getItem($_TABLES['users'],"username","uid=1"); + $T->set_var ('Anonymous_value', $val); + + $T->set_var ('lang_submit', $LANG04[9]); + $T->set_var ('lang_cancel',$LANG_ADMIN['cancel']); + + + + $T->parse('output', 'admin'); + $retval .= $T->finish($T->get_var('output')); + + return $retval; + +} + +// +---------------------------------------------------------------------------+ +// | MAIN | +// +---------------------------------------------------------------------------+ + +$display = ''; +$display .= COM_siteHeader ('menu', $LANG_JPN['pinameadmin']); +if (isset ($_REQUEST['msg'])) { + $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], + true), 'japanize'); +} + +$display.=ppNavbar($navbarMenu,$LANG_JPN_admin_menu['2']); + +if($_POST['savesettings'] == 'yes'){ + + if (!SEC_checkToken()){ + COM_accessLog("User {$_USER['username']} tried to illegally and failed CSRF checks."); + echo COM_refresh($_CONF['site_admin_url'] . '/index.php'); + exit; + }else{ + fncCmdExec(); + } +}else{// 初期表示、一覧表示 + $display .=fncEdit(); + $display .= COM_siteFooter (); +} + + +echo $display; + +?> Added: trunk/plugins/japanize/doc/v1.0.0b2_changes.txt ============================================================================== --- (empty file) +++ trunk/plugins/japanize/doc/v1.0.0b2_changes.txt Sun Sep 21 06:29:22 2008 @@ -0,0 +1,7 @@ +1.0.0b1 ~ 1.0.0b2 改善点 2008/08/01 + +1.japanese以外の言語を設定した場合にエラーが発生する問題の解消 + +差替ファイル +-------------------- + functions.inc Added: trunk/plugins/japanize/doc/v1.0.0b3_changes.txt ============================================================================== --- (empty file) +++ trunk/plugins/japanize/doc/v1.0.0b3_changes.txt Sun Sep 21 06:29:22 2008 @@ -0,0 +1,16 @@ +1.0.0b2 ~ 1.0.0b3 改善点 2008/09/03 + +1.アンインストール時にcalendarプラグインのブロックを削除して + しまっていたのを修正 + functions.inc +2.管理画面(更新)テンプレート変更 + templates/admin/index.thtml +3.日本語Pingサイト「ドリコムRSS」 ウェブサイト変更 + sql/sql_japanize_3.php + 管理画面(更新)で日本語pingサイトの「日本語化実行」をクリック + してください。「ドリコムRSS」 ウェブサイトが訂正されます +差替ファイル +-------------------- +functions.inc +templates/admin/index.thtml +sql/sql_japanize_3.php Added: trunk/plugins/japanize/doc/v1.0.1_changes.txt ============================================================================== --- (empty file) +++ trunk/plugins/japanize/doc/v1.0.1_changes.txt Sun Sep 21 06:29:22 2008 @@ -0,0 +1,29 @@ +1.0.0b3 ~ 1.0.1 改善点 2008/09/14 + +1.「日本語サンプル記事アンケート追加」を追加 +2.「初期ブロックタイトル」を日本語化と日本語化キャンセル追加 +3.ピング送信先に Googleブログ検索 テクノラティ 追加 +4.オリジナルアイコン設定 +5.public_html/disabledmsg.html をpublic_html/disabledmsg.htmlに変更 +6.インストール時 lib-portalparts.php 存在チェック追加 +7.インストール時 lib-portalparts.php 存在チェック追加 +8.readmeja.txt 改定 + +注1:version情報をversion.phpに移動しました +注2:更新履歴ほかのドキュメントをdocに移動しました + +差替追加ファイル +-------------------- +admin/index.php +admin/settings.php +language/japanese_utf-8.php +public_html/images/japanize.png +public_html/disabledmsg.html +sql/sql_japanize_3.php +sql/sql_japanize_6.php +sql/sql_japanize_7.php +sql/sql_japanize_107.php +templates/admin/index.thtml +templates/admin/settings.thtml +functions.inc +version.php Added: trunk/plugins/japanize/functions.inc ============================================================================== --- (empty file) +++ trunk/plugins/japanize/functions.inc Sun Sep 21 06:29:22 2008 @@ -0,0 +1,287 @@ +<?php +/* Reminder: always indent with 4 spaces (no tabs). */ +// +---------------------------------------------------------------------------+ +// | 日本語化プラグイ ン | +// +---------------------------------------------------------------------------+ +// $Id: plugins/japanize/functions.inc +//2008/09/02 23:08 tsuchi AT geeklog DOT jp + +if (strpos ($_SERVER['PHP_SELF'], 'functions.inc') !== false) { + die ('This file can not be used on its own.'); +} + +$pi_name = 'japanize'; + +//言語ファイル +$langfile = $_CONF['path'] . "plugins/{$pi_name}/language/" + . $_CONF['language'] . '.php'; + +if (file_exists ($langfile)) { + require_once ($langfile); +} else { + require_once ($_CONF['path'] . "plugins/{$pi_name}/language/japanese_utf-8.php"); +} + +//設定ファイル +//現在設定項目がないのでコメントにしています +//require_once ($_CONF['path'] . "plugins/{$pi_name}/config.php"); +//if (!isset($_JPN_CONF['xxxxxxxxxx'])) { +// require_once $_CONF['path_system'] . 'classes/config.class.php'; + +// $ca_config = config::get_instance(); +// $_CA_CONF = $ca_config->get_config($pi_name); +//} + +include_once 'version.php'; + + +// アドバンストエディタ用.管理ユーザーが使ってもよいHTMLタグと属性. +//user_htmlにマージされます. +if ($_CONF['advanced_editor']) { + $_CONF['admin_html']['a'] = array('href' => 1, 'title' => 1, 'id' => 1, 'lang' => 1, 'name' => 1, 'type' => 1, 'rel' => 1); + $_CONF['admin_html']['br'] = array('clear' => 1,'style' => 1); + $_CONF['admin_html']['caption'] = array('style' => 1); + $_CONF['admin_html']['div'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['embed'] = array('src' => 1, 'loop' => 1, 'quality' => 1, 'width' => 1, 'height' => 1, 'type' => 1, 'pluginspage' => 1, 'align' => 1); + $_CONF['admin_html']['h1'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['h2'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['h3'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['h4'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['h5'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['h6'] = array('class' => 1, 'id' => 1, 'style' => 1); + $_CONF['admin_html']['hr'] = array('class' => 1, 'id' => 1, 'align' => 1); + $_CONF['admin_html']['img'] = array('src' => 1, 'width' => 1, 'height' => 1, 'vspace' => 1, 'hspace' => 1, 'dir' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'lang' => 1, 'longdesc' => 1, 'title' => 1, 'id' => 1, 'alt' => 1, 'style' => 1); + $_CONF['admin_html']['noscript'] = array(); + $_CONF['admin_html']['object'] = array('type' => 1,'data' => 1,'classid' => 1, 'codebase' => 1, 'width' => 1, 'height' => 1, 'align' => 1); + $_CONF['admin_html']['ol'] = array('class' => 1, 'style' => 1); + $_CONF['admin_html']['p'] = array('class' => 1, 'id' => 1, 'align' => 1, 'lang' => 1); + $_CONF['admin_html']['param'] = array('name' => 1, 'value' => 1); + $_CONF['admin_html']['script'] = array('src' => 1, 'language' => 1, 'type' => 1); + $_CONF['admin_html']['span' ] = array('class' => 1, 'id' => 1, 'lang' => 1); + $_CONF['admin_html']['table'] = array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1, 'cellspacing' => 1, 'cellpadding' => 1); + $_CONF['admin_html']['tbody'] = array(); + $_CONF['admin_html']['td'] = array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1, 'colspan' => 1, 'rowspan' => 1); + $_CONF['admin_html']['th'] = array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1, 'colspan' => 1, 'rowspan' => 1); + $_CONF['admin_html']['tr'] = array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1); + $_CONF['admin_html']['ul'] = array('class' => 1, 'style' => 1); +} + + + +// +-----------+ +// | 専用関数 | +// +-----------+ + + +// +---------------------------------------------------------------------------+ +// | Geeklog Plugin API Implementation | +// +---------------------------------------------------------------------------+ + +// +---------------------------------------------------------------------------+ +// | 自動タ グ | +// | 書式 plugin_autotags_japanize ($op, $content, $autotag) | +// +---------------------------------------------------------------------------+ +//現在当該機能はないのでコメントにしています +//function plugin_autotags_japanize ($op, $content = '', $autotag = '') + +// +---------------------------------------------------------------------------+ +// | 現在インストールされているバージョン取 得 | +// | 書式 plugin_chkVersion_japanize | +// +---------------------------------------------------------------------------+ +function plugin_chkVersion_japanize () +{ + global $_JPN_CONF; + + return $_JPN_CONF['version']; +} + +// +---------------------------------------------------------------------------+ +// | 一覧取 得 | +// | 書式 plugin_getListField_japanize | +// +---------------------------------------------------------------------------+ +//現在当該機能はないのでコメントにしています +//function plugin_getListField_japanize($fieldname, $fieldvalue, $A, $icon_arr) + +// +---------------------------------------------------------------------------+ +// | 機能 プラグイン更新:バージョンナンバーの更 新 | +// | 書式 plugin_upgrade_japanize | +// +---------------------------------------------------------------------------+ +function plugin_upgrade_japanize () +{ + global $_TABLES, $_JPN_CONF; + + // the plugin needs these functions so complain when they doesn't exist + if (!function_exists ('COM_truncate') || + !function_exists ('MBYTE_strpos')) { + return 3002; + } + + // no db changes - just update the version numbers + DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '{$_JPN_CONF['version']}', pi_gl_version = '" . VERSION . "' WHERE pi_name = 'japanize'"); + + return true; +} + +// +---------------------------------------------------------------------------+ +// | 機能 プラグインアンインストール 1.5.0用 | +// | 書式 plugin_getadminoption_japanize | +// +---------------------------------------------------------------------------+ +// | 戻値 nomal: | +// +---------------------------------------------------------------------------+ +function plugin_autouninstall_japanize () +{ + // (1) 削除するテーブル + $out['tables']=array(); + // (2) 削除するグループ名 + $out['groups'][]='japanize Admin'; + // (3) 削除するfeatures + $out['features'][]='japanize.edit'; + $out['features'][]='japanize.moderate'; + $out['features'][]='japanize.submit'; + // (4) 削除するphp_blocks + $out['php_blocks']=array(); + // (5) 削除する vars */ + $out['vars']=array(); + + return $out; +} + +/** +* ☆★現在のユーザは権利があるのをチェック +* +* @return boolean Returns true if moderator +* +*/ +function plugin_ismoderator_japanize() +{ + //return SEC_hasRights ('japanize.moderate'); + return true; +} + + + + + +// +---------------------------------------------------------------------------+ +// | 機能 プラグインのアイコン取 得 | +// | 書式 plugin_geticon_japanize | +// +---------------------------------------------------------------------------+ + +function plugin_geticon_japanize () +{ + global $_CONF; + + return $_CONF['site_url'] . '/japanize/images/japanize.png'; +} + +// +---------------------------------------------------------------------------+ +// | 機能 管理画面メニ ュ | +// | 書式 plugin_cclabel_japanize | +// +---------------------------------------------------------------------------+ +function plugin_cclabel_japanize() +{ + global $_CONF; + + if (SEC_hasRights('japanize.edit')) { + return array( + 'japanize' + ,$_CONF['site_admin_url'] . "/plugins/japanize/index.php" + ,plugin_geticon_japanize () + ); + } + + return ""; + +} + +// +---------------------------------------------------------------------------+ +// | 機能 管理者メニュ表示 | +// | 書式 plugin_getadminoption_japanize | +// +---------------------------------------------------------------------------+ +// | 戻値 nomal:管理者メニュリン ク | +// +---------------------------------------------------------------------------+ +function plugin_getadminoption_japanize() +{ + global $_CONF, $_TABLES; + global $LANG_JPN; + + if (SEC_hasRights ('japanize.edit') ){ + return array ( + $LANG_JPN['piname'] + ,$_CONF['site_admin_url'] . '/plugins/japanize/index.php' + ); + } + return ""; + +} + +// +---------------------------------------------------------------------------+ +// | 機能 テンプレート変数設 定 | +// | 書式 plugin_templatesetvars_japanize | +// +---------------------------------------------------------------------------+ +// 2006/10/16 Geeklog Japanese ivy added +// 2007/05/14 Geeklog Japanese kino changed +// 2007.8.26 Ivy added +// 2007/12/22 Geeklog Japanese Ivy changed +// 2008/06/11 Geeklog Japanese Tsuchi modify custom_templatesetvars +function plugin_templatesetvars_japanize($templatename, &$template) { + global $LANG01, $LANG_JPN; + global $_USER,$_CONF; + global $topic; + global $page; + + + switch ($templatename) { + case 'header': + + //Frontpageの場合は 'sub' そうでなければ 'home' + if( COM_isFrontpage() ){ + $home_id='sub'; + } else { + $home_id='home'; + } + + //ログインしている時 + if (isset($_USER['uid']) && $_USER['uid'] > 1) { + $login_status='member'; + $prof_url = "{$_CONF['site_url']}/users.php?mode=profile&uid={$_USER['uid']}"; + $welcome_msg_jp = "{$LANG01[67]}"; + $welcome_msg_jp .= ' ' . COM_getDisplayName()." ".$LANG_JPN['keisyo']; + $memberlogin = "<a href='{$_CONF['site_url']}/users.php?mode=logout' >{$LANG01[19]}</a> "; + //ログインしていない時 + } else { + $login_status='guest'; + $prof_url = "{$_CONF['site_url']}/"; + $welcome_msg_jp = ""; + + if (file_exists($_CONF['path_layout'] . 'custom-memberlogin.thtml')) { + $tmpl = new Template ($_CONF['path_layout']); + } else { + $tmpl = new Template ($_CONF['path'] . "plugins/japanize/templates/"); + } + $tmpl->set_file(array('member_login' => 'custom-memberlogin.thtml')); + $tmpl->set_var( 'site_url', $_CONF['site_url']); + $tmpl->parse ('output', 'member_login'); + $memberlogin = $template->finish ($tmpl->get_var ('output')); + + } + + //記事ID:topic_id + $template->set_var( 'topic_id', $topic ); + //静的ページID:sp_id + $template->set_var( 'sp_id', $page ); + //home_id ('home','sub') + $template->set_var( 'home_id', $home_id ); + //ログイン状態:login_status ('member','guest') + $template->set_var( 'login_status', $login_status ); + //ようこそメッセージ:welcome_msg_jp + $template->set_var( 'welcome_msg_jp', $welcome_msg_jp ); + //プロフィールのURL:prof_url_jp + $template->set_var( 'prof_url_jp', $prof_url ); + //メンバーログイン:memberlogin (ログインHTML,ログアウトHTML) + $template->set_var( 'memberlogin', $memberlogin); + + } +} + +?> Added: trunk/plugins/japanize/install_defaults.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/install_defaults.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,92 @@ +<?php + +// Reminder: always indent with 4 spaces (no tabs). +// +---------------------------------------------------------------------------+ +// | japanize Plugin 日本語化プラグイ ン | +// +---------------------------------------------------------------------------+ +// | install_defaults.php | +// | | +// | Initial Installation Defaults used when loading the online configuration | +// | records. These settings are only used during the initial installation | +// | and not referenced any more once the plugin is installed. | +// +---------------------------------------------------------------------------+ +// | Copyright (C) 2000-2008 by the following authors: | +// | | +// | Authors: Tony Bibbs - tony AT tonybibbs DOT com | +// | Mark Limburg - mlimb****@users***** DOT net | +// | Jason Whittenburg - jwhitten AT securitygeeks DOT com | +// | Dirk Haun - dirk AT haun-online DOT de | +// | Trinity Bays - trinity93 AT gmail DOT com | +// | Oliver Spiesshofer - oliver AT spiesshofer DOT com | +// | Euan McKay - info AT heatherengineering DOT com | +// +---------------------------------------------------------------------------+ +// | | +// | This program is licensed under the terms of the GNU General Public License| +// | as published by the Free Software Foundation; either version 2 | +// | of the License, or (at your option) any later version. | +// | | +// | This program is distributed in the hope that it will be useful, | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | +// | See the GNU General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software Foundation, | +// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +// | | +// +---------------------------------------------------------------------------+ +// +// $Id: install_defaults.php + +if (strpos($_SERVER['PHP_SELF'], 'install_defaults.php') !== false) { + die('This file can not be used on its own!'); +} + +global $_JAPANIZE_DEFAULT; + +$_JAPANIZE_DEFAULT = array(); + + +/** +* Initialize Links plugin configuration +* +* Creates the database entries for the configuation if they don't already +* exist. Initial values will be taken from $_LI_CONF if available (e.g. from +* an old config.php), uses $_LI_DEFAULT otherwise. +* +* @return boolean true: success; false: an error occurred +* +*/ +function plugin_initconfig_japanize() +{ + global $_JAPANIZE_CONF, $_JAPANIZE_DEFAULT; + + + + if (is_array($_JAPANIZE_CONF) && (count($_JAPANIZE_CONF) > 1)) { + $_JAPANIZE_DEFAULT = array_merge($_JAPANIZE_DEFAULT, $_JAPANIZE_CONF); + } + + $c = config::get_instance(); + if (!$c->group_exists('japanize')) { + + /* add( + $param_name + , $default_value + , $type + , $subgroup, $fieldset,$selection_array=null + , $sort=0 + , $set=true + , $group='japanize') + */ + + $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'japanize'); + $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'japanize'); + + + } + + return true; +} + +?> Added: trunk/plugins/japanize/language/japanese_utf-8.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/language/japanese_utf-8.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,71 @@ +<?php +############################################################################### +# plugins/japanize/language/japanese_utf-8.php +# もし万一エンコードの種類が UTF-8でない場合は、utf-8に変換してください。 +# Last Update 2008/09/05 + + +############################################################################### + + + +############################################################################### +$LANG_JPN= array(); +$LANG_JPN['piname']= '日本語化'; +$LANG_JPN['pinameadmin']= 'Geeklogを日本流にする'; +$LANG_JPN['keisyo']= ' さん'; + +############################################################################### +## 管理画面 +$LANG_JPN_admin_menu = array(); +$LANG_JPN_admin_menu['1']= '更新'; +$LANG_JPN_admin_menu['2']= '設定'; +$LANG_JPN_admin_menu['3']= '情報'; +$LANG_JPN_admin_menu['4']= '移行'; + + + +############################################################################### +# COM_showMessage() + +// Messages for the plugin upgrade +$PLG_JAPANIZE_MESSAGE3002 = $LANG32[9]; + +$PLG_japanize_MESSAGE1 = "テーブル構造を日本語化しました。"; +$PLG_japanize_MESSAGE2 = "コンフィギュレーションを日本語化しました。"; +$PLG_japanize_MESSAGE3 = "日本語pingサイトを追加しました。"; +$PLG_japanize_MESSAGE4 = "ゲストユーザに変更しました。"; +$PLG_japanize_MESSAGE5 = " グループ 詳細を日本語に変更しました。"; +$PLG_japanize_MESSAGE105 = "グループ 詳細を英語に戻しました。"; +$PLG_japanize_MESSAGE6 = " 日本語サンプルアンケート追加しました。"; +$PLG_japanize_MESSAGE7 = " 初期ブロックタイトルを日本語に変更しました。"; +$PLG_japanize_MESSAGE107 = " 初期ブロックタイトルを英語に戻しました。"; + + +$PLG_japanize_MESSAGE1001 = "更新しました。"; + + +############################################################################### +## コンフィギュレーション +$LANG_configsections['japanize'] = array(); +$LANG_configsections['japanize']['label']='japanize'; +$LANG_configsections['japanize']['title']='japanizeの設定'; + +// +$LANG_confignames['japanize'] = array(); + + +// +$LANG_configsubgroups['japanize'] = array(); +$LANG_configsubgroups['japanize']['sg_main'] = 'メイン'; +// +$LANG_fs['japanize'] = array(); +$LANG_fs['japanize']['fs_main'] = '既定値の設定'; + +// +$LANG_configselects['japanize'] = array( + 0 => array('はい' => 1, 'いいえ' => 0), + 1 => array('はい' => TRUE, 'いいえ' => FALSE) +); + +?> \ No newline at end of file Added: trunk/plugins/japanize/public_html/disabledmsg.html ============================================================================== --- (empty file) +++ trunk/plugins/japanize/public_html/disabledmsg.html Sun Sep 21 06:29:22 2008 @@ -0,0 +1,18 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> +<meta http-equiv="Content-Style-Type" content="text/css" /> +<title>Geeklog サイト</title> +</head> + +<body> + + +Geeklog サイトは,ただいまメンテナンスのため閉鎖しています。しばらくお待ち ください。 + +<li><a href="../">ホームへ</a></li> + +</body> +</html> \ No newline at end of file Added: trunk/plugins/japanize/public_html/images/japanize.png ============================================================================== Binary file. No diff available. Added: trunk/plugins/japanize/public_html/inex.html ============================================================================== Added: trunk/plugins/japanize/public_html/memberlogin_help.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/public_html/memberlogin_help.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,13 @@ +<?php + +require_once '../lib-common.php'; + +// MAIN +$display = ''; + +$display.=COM_siteHeader(); +$display.="memberlogin help"; +$display.=COM_siteFooter(); +echo $display; + +?> \ No newline at end of file Added: trunk/plugins/japanize/readme_ja.txt ============================================================================== --- (empty file) +++ trunk/plugins/japanize/readme_ja.txt Sun Sep 21 06:29:22 2008 @@ -0,0 +1,75 @@ +-------------------------------------------------------------------------------- +Geeklog 日本語化(japanize)プラグイン +tsuchi AT geeklog DOT jp +2008/09/14 +-------------------------------------------------------------------------------- +概要 :Geeklog1.5.0を日本人流にするプラグインです + 詳細については、管理画面をご参照ください +-------------------------------------------------------------------------------- +ファイル構成 +-japanize + ├ admin + │ ├ convertconfig_1.4.1jp_to_1.5.0.php + │ ├ index.php + │ ├ information.php + │ ├ install.php + │ ├ japanize_functions.php + │ └ settings.php + ├ doc + │ 更新履歴ほかのドキュメント + ├ language + │ └ japanese_utf-8.php + ├ public_html + │ ├ images + │ │ └ japanize.png + │ ├ disabledmsg.html + │ ├ index.html + │ └ memberlogin_help.php + ├ sql + │ ├ sql_japanize_1.php + │ ├ sql_japanize_2.php + │ ├ sql_japanize_3.php + │ ├ sql_japanize_4.php + │ ├ sql_japanize_5.php + │ └ sql_japanize_105.php + │ templates + │ ├ admin + │ │ ├ index.thtml + │ │ ├ information.thtml + │ │ └ settings.thtml + │ └custom-memberlogin.thtml + ├ functions.inc + ├ install_defaults.php + ├ readme_ja.txt + └ version.php + + +注1:custom-memberlogin.thtml + 指定されているテーマにcustom-memberlogin.thtmlがある場合は、そちらを + 使用します +注2:指定の言語ファイルがない場合はjapanese_utf-8.phpを使用します +注3:Geeklog1.5.0日本語版で追加されている以下のファイルを必要とします + system/lib-portalparts.php + lib-portalparts.php は、Forum ,nexProシリーズのファイルでもかまいませ ん +-------------------------------------------------------------------------------- +インストール方法 +1.データベースおよびファイルのバックアップをとります。 +2.標準的なプラグインのファイル配置に従い、ファイルをアップします。 + plugins/ 以下に japanize以下をアップ + admin/plugins/japanize/以下に admin以下のファイルを移動 + public_html/japanize/以下に public_html以下のファイルを移動 +3.Rootユーザーとしてログインし,プラグイン管理の画面でインストールを実行 します +-------------------------------------------------------------------------------- +アンインストール方法 +1.データベースおよびファイルのバックアップをとります。 +2.Rootユーザーとしてログインし,プラグイン管理の画面で削除を実行します。 +3.アップしたファイルを削除します。 +-------------------------------------------------------------------------------- +通常のアップグレード方法 +1.データベースおよびファイルのバックアップをとります。 +2.標準的なプラグインのファイル配置に従い、ファイルをアップします。 + plugins/ 以下に japanize以下をアップ + admin/plugins/japanize/以下に admin以下のファイルを移動 + public_html/japanize/以下に public_html以下のファイルを移動 +3.Rootユーザーとしてログインし,プラグイン管理の画面で更新を実行します +-------------------------------------------------------------------------------- Added: trunk/plugins/japanize/sql/sql_japanize_1.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_1.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,34 @@ +<?php +// +---------------------------------------------------------------------------+ +// | テーブル構造とデータを日本語版化す る | +// | SQL文データ1 テーブル構造とシステム用デー タ | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize1.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2007/05/21 tsuchi AT geeklog DOT jp + +// (01) en-gb →ja data (syndication) +$_SQL[] = " + ALTER TABLE {$_TABLES['syndication']} MODIFY + language varchar(20) NOT NULL default 'ja' + "; + +$_SQL[] = " + UPDATE {$_TABLES['syndication']} SET + language = 'ja' + "; + +$_SQL[] = " + UPDATE {$_TABLES['syndication']} SET + charset = 'UTF-8' + "; + +// (06) username varchar(36) → carchar(108) gl_users +$_SQL[] = " + ALTER TABLE {$_TABLES['users']} MODIFY username varchar(108) NOT NULL default '' + "; + + + + +?> Added: trunk/plugins/japanize/sql/sql_japanize_105.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_105.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,139 @@ +<?php +// +---------------------------------------------------------------------------+ +// | グループ詳細を英語に戻 す | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize105.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2007/07/29 tsuchi AT geeklog DOT jp + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to the site' + WHERE grp_name = 'Root' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Group that a typical user is added to' + WHERE grp_name = 'All Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to story features' + WHERE grp_name = 'Story Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to block features' + WHERE grp_name = 'Block Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to topic features' + WHERE grp_name = 'Topic Admin' + "; + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to topic features' + WHERE grp_name = 'User Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to plugin features' + WHERE grp_name = 'Plugin Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to plugin features' + WHERE grp_name = 'Group Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Can use Mail Utility' + WHERE grp_name = 'Mail Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'All registered members' + WHERE grp_name = 'Logged-in Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to plugin features' + WHERE grp_name = 'spamx Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Users in this group can have authenticated against a remote server.' + WHERE grp_name = 'Remote Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Can create and modify web feeds for the site' + WHERE grp_name = 'Syndication Admin' + "; + + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to calendar features' + WHERE grp_name = 'Calendar Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to links features' + WHERE grp_name = 'Links Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to polls features' + WHERE grp_name = 'Polls Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Users in this group can administer the Spam-X plugin' + WHERE grp_name = 'spamx Admin' + "; + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Can administer static pages' + WHERE grp_name = 'Static Page Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Has full access to japanize features' + WHERE grp_name = 'japanize Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Users in this group can administer the filemgmt plugin' + WHERE grp_name = 'filemgmt Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'Users in this group can administer the forum plugin' + WHERE grp_name = 'forum Admin' + "; + +?> Added: trunk/plugins/japanize/sql/sql_japanize_107.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_107.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,59 @@ +<?php +// +---------------------------------------------------------------------------+ +// | 初期ブロックタイトル等日本語 化 | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize6.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2008/09/02 tsuchi AT geeklog DOT jp + + +// (18) 初期ブロックタイトル等日本語化 +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'User Functions' + WHERE name = 'user_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Admins Only' + WHERE name = 'admin_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Topics' + WHERE name = 'section_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Poll' + WHERE name = 'polls_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Events' + WHERE name = 'events_block' + "; + +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'What''s New' + WHERE name = 'whats_new_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Who''s Online' + WHERE name = 'whosonline_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'Older Stories' + WHERE name = 'older_stories' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'About Geeklog' + ,content = '<p><b>Welcome to Geeklog!</b></p><p>If you''re already familiar with Geeklog - and especially if you''re not: There have been many improvements to Geeklog since earlier versions that you might want to read up on. Please read the <a href=\"docs/changes.html\">release notes</a>. If you need help, please see the <a href=\"docs/support.html\">support options</a>.</p>' + WHERE name = 'first_block' + "; + +?> Added: trunk/plugins/japanize/sql/sql_japanize_2.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_2.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,135 @@ +<?php +// +---------------------------------------------------------------------------+ +// | コンフィギュレーションを日本語版化す る | +// | | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize2.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +//@@@@@2008/09/11 サイト・・・無効のURL変更 + + +//【サイト】 +//サイト・・・無効のメッセージまたはURL +$wk="\"{$_CONF['site_url']}/japanize/disabledmsg.html\";"; +$wklen=strlen($wk)-3; +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:{$wklen}:{$wk}' + WHERE name = 'site_disabled_msg' + "; +//シンジケーション・・・フィードの言語 +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:2:\"ja\";' + WHERE name = 'rdf_language' + "; +//【ブロック】 +//管理者ブロック・・・リンクをソートする いいえ 0:表示しない +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'b:0;' + WHERE name = 'sort_admin' + "; +//話題ブロック・・・記事投稿数を表示する いいえ 0:表示しない +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'b:0;' + WHERE name = 'showsubmissioncount' + "; +//話題ブロック・・・Homeへのリンクを隠す はい 1:隠す +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'b:1;' + WHERE name = 'hide_home_link' + "; +//【ユーザと投稿】 +//コメント・・・コメント形状 flat:一覧 +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:4:\"flat\";' + WHERE name = 'comment_mode' + "; +//【画像】 +//画像ライブラリ・・・画像ライブラリ:GDライブラリ +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:5:\"gdlib\";' + WHERE name = 'image_lib' + "; +//画像ライブラリ・・・記事の画像高さの最大値:120ピクセル +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'i:120;' + WHERE name = 'max_image_height' + "; +//【言語とロケール】 +//ロケール・・・ロケール +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:11:\"ja_JP.UTF-8\";' + WHERE name = 'locale' + "; +//ロケール・・・日付 +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:25:\"%Y年%B%e日(%a) %H:%M %Z\";' + WHERE name = 'date' + "; +//ロケール・・・日時 +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:14:\"%m/%d %H:%M %Z\";' + WHERE name = 'daytime' + "; + +//ロケール・・・日付短表記 +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:12:\"%Y年%B%e日\";' + WHERE name = 'shortdate' + "; +//ロケール・・・日付けのみ +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:7:\"%B%e日\";' + WHERE name = 'dateonly' + "; +//ロケール・・・時間のみ +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 's:8:\"%H:%M %Z\";' + WHERE name = 'timeonly' + "; + +//【その他】 +//HTMLフィルタ・・・ユーザHTML +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'a:18:{s:1:\"a\";a:3:{s:4:\"href\";i:1;s:5:\"title\";i:1;s:3:\"rel\";i:1;}s:1:\"b\";a:0:{}s:10:\"blockquote\";a:0:{}s:2:\"br\";a:1:{s:5:\"clear\";i:1;}s:4:\"code\";a:0:{}s:3:\"div\";a:1:{s:5:\"class\";i:1;}s:4:\"font\";a:1:{s:5:\"color\";i:1;}s:2:\"em\";a:0:{}s:1:\"h\";a:0:{}s:2:\"hr\";a:0:{}s:1:\"i\";a:0:{}s:2:\"li\";a:0:{}s:2:\"ol\";a:0:{}s:1:\"p\";a:1:{s:4:\"lang\";i:1;}s:3:\"pre\";a:0:{}s:6:\"strong\";a:0:{}s:2:\"tt\";a:0:{}s:2:\"ul\";a:0:{}}' + WHERE name = 'user_html' + "; +//HTMLフィルタ・・・管理者HTML +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'a:26:{s:1:\"a\";a:7:{s:4:\"href\";i:1;s:5:\"title\";i:1;s:2:\"id\";i:1;s:4:\"lang\";i:1;s:4:\"name\";i:1;s:4:\"type\";i:1;s:3:\"rel\";i:1;}s:2:\"br\";a:2:{s:5:\"clear\";i:1;s:5:\"style\";i:1;}s:7:\"caption\";a:1:{s:5:\"style\";i:1;}s:3:\"div\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:5:\"embed\";a:8:{s:3:\"src\";i:1;s:4:\"loop\";i:1;s:7:\"quality\";i:1;s:5:\"width\";i:1;s:6:\"height\";i:1;s:4:\"type\";i:1;s:11:\"pluginspage\";i:1;s:5:\"align\";i:1;}s:2:\"h1\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"h2\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"h3\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"h4\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"h5\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"h6\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"style\";i:1;}s:2:\"hr\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"align\";i:1;}s:3:\"img\";a:15:{s:3:\"src\";i:1;s:5:\"width\";i:1;s:6:\"height\";i:1;s:6:\"vspace\";i:1;s:6:\"hspace\";i:1;s:3:\"dir\";i:1;s:5:\"align\";i:1;s:6:\"valign\";i:1;s:6:\"border\";i:1;s:4:\"lang\";i:1;s:8:\"longdesc\";i:1;s:5:\"title\";i:1;s:2:\"id\";i:1;s:3:\"alt\";i:1;s:5:\"style\";i:1;}s:8:\"noscript\";a:0:{}s:6:\"object\";a:7:{s:4:\"type\";i:1;s:4:\"data\";i:1;s:7:\"classid\";i:1;s:8:\"codebase\";i:1;s:5:\"width\";i:1;s:6:\"height\";i:1;s:5:\"align\";i:1;}s:2:\"ol\";a:2:{s:5:\"class\";i:1;s:5:\"style\";i:1;}s:1:\"p\";a:4:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"align\";i:1;s:4:\"lang\";i:1;}s:5:\"param\";a:2:{s:4:\"name\";i:1;s:5:\"value\";i:1;}s:6:\"script\";a:3:{s:3:\"src\";i:1;s:8:\"language\";i:1;s:4:\"type\";i:1;}s:4:\"span\";a:3:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:4:\"lang\";i:1;}s:5:\"table\";a:6:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"width\";i:1;s:6:\"border\";i:1;s:11:\"cellspacing\";i:1;s:11:\"cellpadding\";i:1;}s:5:\"tbody\";a:0:{}s:2:\"td\";a:6:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"align\";i:1;s:6:\"valign\";i:1;s:7:\"colspan\";i:1;s:7:\"rowspan\";i:1;}s:2:\"th\";a:6:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"align\";i:1;s:6:\"valign\";i:1;s:7:\"colspan\";i:1;s:7:\"rowspan\";i:1;}s:2:\"tr\";a:4:{s:5:\"class\";i:1;s:2:\"id\";i:1;s:5:\"align\";i:1;s:6:\"valign\";i:1;}s:2:\"ul\";a:2:{s:5:\"class\";i:1;s:5:\"style\";i:1;}}' + WHERE name = 'admin_html' + "; + +//HTMLフィルタ・・・RootユーザはHTMLフィルタを無効にする +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'i:1;' + WHERE name = 'skip_html_filter_for_root' + "; + + + +//バッドワードチェック・・・チェックモード いいえ +$_SQL[] = " + UPDATE {$_TABLES['conf_values']} SET + value = 'i:0;' + WHERE name = 'censormode' + "; + + +?> Added: trunk/plugins/japanize/sql/sql_japanize_3.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_3.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,85 @@ +<?php +// +---------------------------------------------------------------------------+ +// | 日本語Pingサイトを追加す る | +// | | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize3.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +//@@@@@20080903 「ドリコムRSS」 ウェブサイト変更 +// 最終更新日 2007/09/03 tsuchi AT geeklog DOT jp + +//http://www.blogpeople.net/ +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://www.blogpeople.net/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'BlogPeople', 'http://www.blogpeople.net/' + ,'http://www.blogpeople.net/servlet/weblogUpdates', 'weblogUpdates.ping', 1) + "; +//http://ping.bloggers.jp/ +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://ping.bloggers.jp/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'ping.bloggers.jp', 'http://ping.bloggers.jp/' + , 'http://ping.bloggers.jp/rpc/', 'weblogUpdates.ping', 1) + "; +//http://ping.rss.drecom.jp/ +//@@@@@20080903 ウェブサイト変更 +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://www.myblog.jp/' + "; +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://rss.drecom.jp/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'ドリコムRSS', 'http://rss.drecom.jp/' + , 'http://ping.rss.drecom.jp/', 'weblogUpdates.ping', 1) + "; +//http://blog.goo.ne.jp/ +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://blog.goo.ne.jp/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'goo ブログ', 'http://blog.goo.ne.jp/' + , 'http://blog.goo.ne.jp/XMLRPC', 'weblogUpdates.ping', 1) + "; + +//3.ピング送信先に Googleブログ検索 テクノラティ 追加 +//Googleブログ検索 拡張ピング +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://blogsearch.google.co.jp/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'Googleブログ検索', 'http://blogsearch.google.co.jp/' + , 'http://blogsearch.google.co.jp/ping/RPC2', 'weblogUpdates.extendedPing', 1) + "; +//テクノラティ +$_SQL[] = " + DELETE FROM {$_TABLES['pingservice']} Where + site_url = 'http://www.technorati.jp/' + "; +$_SQL[] = " + INSERT INTO {$_TABLES['pingservice']} + (pid, name, site_url, ping_url, method, is_enabled) + VALUES (NULL, 'テクノラティ', 'http://www.technorati.jp/' + , 'http://rpc.technorati.jp/rpc/ping', 'weblogUpdates.ping', 1) + "; + +?> Added: trunk/plugins/japanize/sql/sql_japanize_4.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_4.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,19 @@ +<?php +// +---------------------------------------------------------------------------+ +// | テーブル構造とデータを日本語版化す る | +// | SQL文データ1 テーブル構造とシステム用デー タ | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize1.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2007/05/21 tsuchi AT geeklog DOT jp + +// (05) Anonymous → ゲストユーザ (users) +$_SQL[] = " + UPDATE {$_TABLES['users']} + SET `username` = 'ゲストユーザ', + `fullname` = 'ゲストユーザ' + WHERE `uid` =1 + "; + + +?> Added: trunk/plugins/japanize/sql/sql_japanize_5.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_5.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,138 @@ +<?php +// +---------------------------------------------------------------------------+ +// | グループ詳細を日本語版化す る | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize5.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2007/07/29 tsuchi AT geeklog DOT jp + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'すべての管理へのアクセス' + WHERE grp_name = 'Root' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'すべてのユーザ' + WHERE grp_name = 'All Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = '記事管理へのアクセス' + WHERE grp_name = 'Story Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'ブロック管理へのアクセス' + WHERE grp_name = 'Block Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = '話題管理へのアクセス' + WHERE grp_name = 'Topic Admin' + "; + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'ユーザ管理へのアクセス' + WHERE grp_name = 'User Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'プラグイン管理へのアクセス' + WHERE grp_name = 'Plugin Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'ユーザとグループ管理へのアクセス' + WHERE grp_name = 'Group Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'メール管理へのアクセス' + WHERE grp_name = 'Mail Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'すべての登録ユーザ' + WHERE grp_name = 'Logged-in Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'プラグイン管理へのアクセス' + WHERE grp_name = 'spamx Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'リモートユーザ' + WHERE grp_name = 'Remote Users' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'RSS配信管理へのアクセス' + WHERE grp_name = 'Syndication Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'カレンダ管理へのアクセス' + WHERE grp_name = 'Calendar Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'リンク管理へのアクセス' + WHERE grp_name = 'Links Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'アンケート管理へのアクセス' + WHERE grp_name = 'Polls Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'スパム管理へのアクセス' + WHERE grp_name = 'spamx Admin' + "; + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = '静的ページ管理へのアクセス' + WHERE grp_name = 'Static Page Admin' + "; + + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = '日本語化管理へのアクセス' + WHERE grp_name = 'japanize Admin' + "; +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = 'ファイル管理へのアクセス' + WHERE grp_name = 'filemgmt Admin' + "; + +$_SQL[] = " + UPDATE {$_TABLES['groups']} SET + grp_descr = '掲示板管理へのアクセス' + WHERE grp_name = 'forum Admin' + "; + +?> Added: trunk/plugins/japanize/sql/sql_japanize_6.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_6.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,121 @@ +<?php +// +---------------------------------------------------------------------------+ +// | 日本語サンプルアンケート追加す る | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize6.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2007/09/01 tsuchi AT geeklog DOT jp + + +// 初期日本語サンプルアンケートdelete +$_SQL[] = " + DELETE FROM {$_TABLES['pollanswers']} Where pid='geeklogfeaturepolljp' + "; +$_SQL[] = " + DELETE FROM {$_TABLES['pollquestions']} Where pid='geeklogfeaturepolljp' + "; +$_SQL[] = " + DELETE FROM {$_TABLES['polltopics']} Where pid='geeklogfeaturepolljp' + "; +$_SQL[] = " + DELETE FROM {$_TABLES['pollvoters']} Where pid='geeklogfeaturepolljp' + "; + +// 初期日本語サンプルアンケート質問1の答え +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 1, '日本語化をプラグインで実現', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 2, '携帯ハック', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 3, 'すぐに日本語サイトになるインストーラ', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 4, '翻訳されたドキュメント', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 5, '1.4.1からテーマの移行を容易にする ProfessionalCSS', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 6, '文字化けしない日本語対応メール関数', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 0, 7, 'その他', 0, '') + "; + +// 初期日本語サンプルアンケート質問2の答え +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 1, 1, '直感的操作', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 1, 2, '権限設定が可能', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 1, 3, 'コミュニティ', 0, '') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollanswers']} + (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ( + 'geeklogfeaturepolljp', 1, 4, '拡張性', 0, '') + "; + +// 初期日本語サンプルアンケート質問 +$_SQL[] = " + INSERT INTO {$_TABLES['pollquestions']} + (`qid`, `pid`, `question`) VALUES ( + 0, 'geeklogfeaturepolljp', '日本語版でお気に入りの機能は何ですか?') + "; + +$_SQL[] = " + INSERT INTO {$_TABLES['pollquestions']} + (`qid`, `pid`, `question`) VALUES ( + 1, 'geeklogfeaturepolljp', '一番の特徴は何ですか?') + "; + +// 初期日本語サンプルアンケートトピック +$_SQL[] = " + INSERT INTO {$_TABLES['polltopics']} + (`pid`, `topic`, `voters`, `questions`, `date` + , `display`, `is_open`, `hideresults`, `commentcode` + , `statuscode`, `owner_id`, `group_id`, `perm_owner` + , `perm_group`, `perm_members`, `perm_anon`) VALUES ( + 'geeklogfeaturepolljp' + , 'Geeklogに関する意見をどうぞ' + , 0 + , 2 + , NOW() + , 1, 1, 1, 0, 0, 2, 8, 3, 2, 2, 2) + "; + + +?> Added: trunk/plugins/japanize/sql/sql_japanize_7.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/sql/sql_japanize_7.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,59 @@ +<?php +// +---------------------------------------------------------------------------+ +// | 初期ブロックタイトル等日本語 化 | +// +---------------------------------------------------------------------------+ +// $Id: sql_japanize6.php +// もし万一エンコードの種類が utf-8でない場合は、utf-8に変換してください。 +// 最終更新日 2008/09/02 tsuchi AT geeklog DOT jp + + +// (18) 初期ブロックタイトル等日本語化 +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'ユーザ情報' + WHERE name = 'user_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = '管理者専用メニュー' + WHERE name = 'admin_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = '記事カテゴリ' + WHERE name = 'section_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'アンケート' + WHERE name = 'polls_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'イベント' + WHERE name = 'events_block' + "; + +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = '新着情報' + WHERE name = 'whats_new_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'オンラインユーザ' + WHERE name = 'whosonline_block' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = '過去記事' + WHERE name = 'older_stories' + "; +$_SQL[] = " + UPDATE {$_TABLES['blocks']} SET + title = 'GeekLogについて' + ,content = '<p><b>ようこそ、GeekLogへ!</b><p>Geeklogについてのサポート は、 <a href=\"http://www.geeklog.jp\">Geeklog Japanese</a>へ。ドキュメント は <a href=\"http://wiki.geeklog.jp\">Geeklog Wiki ドキュメント</a>をどう ぞ。' + WHERE name = 'first_block' + "; + +?> Added: trunk/plugins/japanize/templates/admin/index.thtml ============================================================================== --- (empty file) +++ trunk/plugins/japanize/templates/admin/index.thtml Sun Sep 21 06:29:22 2008 @@ -0,0 +1,141 @@ +<!-- plugins/japanize/templates/admin/index.thtml { --> + +<div id="plugin-japanize"> + +<form method="POST" action="{this_script}?mode=ALL"><p><input type="submit" value="日本語化一括実行" name="ALL"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> + +<fieldset style="margin-top:10px;"> +<legend>(1)テーブル構造</legend> +<p>テーブル構造を日本語化します。</p> +<ul> + <li>フィード 文字コード:utf-8、言語:ja</li> + <li>ユーザ名の桁数:108に拡大</li> +</ul> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd1"><p><input type="submit" value="日本語化実行" name="cmd1"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(2)コンフィギュレーション</legend> +<p>コンフィギュレーションを日本語化します。</p> +<p>【サイト】</p> +<ul> + <li>サイト・・・disabledmsg.htmlのURLを設定</li> + <li>フィード・・・フィードの言語をjaに設定</li> +</ul> +<p>【ブロック】</p> +<ul> + <li>管理者ブロック・・・リンクをソートしない</li> + <li>話題ブロック・・・記事投稿数を表示しない</li> + <li>話題ブロック・・・Homeへのリンクを隠す</li> +</ul> +<p>【ユーザと投稿】</p> +<ul> + <li>コメント・・・コメント形状 flat:一覧</li> +</ul> +<p>【画像】</p> +<ul> + <li>画像ライブラリ・・・画像ライブラリ:GDライブラリ</li> + <li>画像ライブラリ・・・記事の画像高さの最大値:120ピクセル</li> +</ul> +<p>【言語とロケール】</p> +<ul> + <li>ロケール・・・ロケール ja_JP.UTF-8</li> + <li>ロケール・・・日付 %Y年%B%e日(%a) %H:%M %Z</li> + <li>ロケール・・・日時 %m/%d %H:%M %Z</li> + <li>ロケール・・・日付短表記 %Y年%B%e日</li> + <li>ロケール・・・日付けのみ %B%e日</li> + <li>ロケール・・・時間のみ %H:%M %Z</li> +</ul> +<p>【その他】</p> +<ul> + <li>HTMLフィルタ・・・ユーザHTML 追加調整</li> + <li>HTMLフィルタ・・・管理者HTML 追加調整</li> + <li>HTMLフィルタ・・・RootユーザはHTMLフィルタを無効にする</li> + <li>バッドワードチェック・・・チェックモード いいえ</li> +</ul> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd2"><p><input type="submit" value="日本語化実行" name="cmd2"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(3)日本語pingサイト</legend> +<p>日本語pingサイトを追加します。</p> +<ul> + <li>BlogPeople</li> + <li>PING.BLOGGERS.JP</li> + <li>ドリコムRSS</li> + <li>goo ブログ</li> + <li>Googleブログ検索</li> + <li>テクノラティ</li> +</ul> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd3"><p><input type="submit" value="日本語化実行" name="cmd3"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(4)Anonymous</legend> +<p>Anonymousの表記をゲストユーザに変更します。</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd4"><p><input type="submit" value="日本語化実行" name="cmd4"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(5)グループ管理画面</legend> +<p>説明文を日本語に変更します。</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd5"><p><input type="submit" value="日本語化実行" name="cmd5"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +<p>説明文を英語に戻します。</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd105"><p><input type="submit" value="英語化実行(日本語化キャンセル)" name="cmd105"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(6)サンプルアンケート</legend> +<p>日本語サンプルアンケート追加します</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd6"><p><input type="submit" value="日本語化実行" name="cmd6"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +<fieldset style="margin-top:10px;"> +<legend>(7)初期ブロックタイトル</legend> +<p>初期ブロックタイトルを日本語に変更します。</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd7"><p><input type="submit" value="日本語化実行" name="cmd7"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +<p>初期ブロックタイトルを英語に戻します。</p> +<blockquote> +<form method="POST" action="{this_script}?mode=cmd107"><p><input type="submit" value="英語化実行(日本語化キャンセル)" name="cmd107"></p> +<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</blockquote> +</fieldset> + +</div> + +<!-- } plugins/japanize/templates/admin/index.thtml --> Added: trunk/plugins/japanize/templates/admin/information.thtml ============================================================================== --- (empty file) +++ trunk/plugins/japanize/templates/admin/information.thtml Sun Sep 21 06:29:22 2008 @@ -0,0 +1,24 @@ +<!-- plugins/japanize/templates/admin/information.thtml { --> + +<div class="clearboth" style="min-width:600px;"> + +<p>日本のGeeklogについてのサポートは、 <a href="http://www.geeklog.jp">Geeklog Japanese</a>へ。</p> +<p>ドキュメントは <a href="http://wiki.geeklog.jp">Geeklog Wiki </a></p> +<p>コミュニティは <a href="http://sns.geeklog.jp">Geeklog SNS </a></p> +<p>コアのバージョンは {VERSION} {release_jp} {release_no} {release_date} +<a href="http://wiki.geeklog.jp/index.php/Geeklog1.5.0-jp-{release_no}">Wiki </a> +</p> +<hr> +<p>テンプレート変数 header.thtml用 </p> +<ul> +<li>記事ID:topic_id</li> +<li>静的ページID:sp_id</li> +<li>home_id ('home','sub')</li> +<li>ログイン状態:login_status ('member','guest')</li> +<li>ようこそメッセージ:welcome_msg_jp</li> +<li>プロフィールのURL:prof_url_jp</li> +<li>メンバーログイン:memberlogin (ログインHTML,ログアウトHTML)</li> +</ul> +</div> +<!-- } plugins/japanize/templates/admin/information.thtml --> + Added: trunk/plugins/japanize/templates/admin/settings.thtml ============================================================================== --- (empty file) +++ trunk/plugins/japanize/templates/admin/settings.thtml Sun Sep 21 06:29:22 2008 @@ -0,0 +1,15 @@ +<!-- plugins/japanize/templates/admin/settings.thtml { --> + +<div class="clearboth" style="min-width:600px;"> +<form action="{this_script}" method="post" > + + Anonymous: + <input type="text" id="Anonymous" name="Anonymous" size="60" maxlength="80" value="{Anonymous_value}"{xhtml}> + <input type="hidden" name="savesettings" value="yes"> + <input type="submit" name="btnsubmit" value="変更を保存する"{xhtml}> + <input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}> +</form> +</div> + +<!-- } plugins/japanize/templates/admin/settings.thtml --> + Added: trunk/plugins/japanize/templates/custom-memberlogin.thtml ============================================================================== --- (empty file) +++ trunk/plugins/japanize/templates/custom-memberlogin.thtml Sun Sep 21 06:29:22 2008 @@ -0,0 +1,27 @@ +<!-- plugins/japanize/template/custom-memberlogin.thtml { --> + +<form action="{site_url}/users.php" method="post" id="custom-memberlogin" class="basic"> + <fieldset> + <legend>ログイン情報</legend><!-- Geeklog Japanese --> + + <dl> + <dt><label for="custom-memberlogin-loginname">ユーザ名</label></dt> + <dd><input type="text" size="10" name="loginname" id="custom-memberlogin-loginname" class="text"></dd> + <dt><label for="custom-memberlogin-passwd">パスワード</label></dt> + <dd><input type="password" size="10" name="passwd" id="custom-memberlogin-passwd" class="text"></dd> + </dl> + + <ul class="submit"> + <li><input value="ログイン" type="submit" class="submit"></li> + </ul> + + <ul class="navi"> + <li><a href="{site_url}/users.php?mode=new">新規登録</a></li> + <li><a href="{site_url}/users.php?mode=getpassword">パスワードをお忘 れの方</a></li> + <li><a href="{site_url}/japanize/memberlogin_help.php">ヘルプ </a></li> + </ul> + + </fieldset> +</form> + +<!-- } plugins/japanize/template/custom-memberlogin.thtml --> Added: trunk/plugins/japanize/version.php ============================================================================== --- (empty file) +++ trunk/plugins/japanize/version.php Sun Sep 21 06:29:22 2008 @@ -0,0 +1,3 @@ +<?php +$_JPN_CONF['version'] = '1.0.1'; // Plugin Version +?>