森林之原
五月 23, 2012, 10:44:51 pm *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.

請輸入帳號, 密碼以及預計登入時間
新聞: 官方釋出 SMF 2.0 beta。繁體中文已經完成。請到 SMF 的版面下載測試。如有問題請通知。
 
   首頁   說明 搜尋 日曆 登入 註冊  
頁: [1]   向下
  寄送主題  |  列印  
作者 主題: SMF_SHOP 中文檔  (閱讀 2492 次)
0 會員 以及 2 訪客 正在閱讀本篇主題.
gobido
初學者
*
離線 離線

文章: 4


« 於: 七月 26, 2009, 06:16:11 am »

大家好 1年前幫別人弄了論壇, 那時候裝了shop, 花了些時間翻譯. 最近又用到了joomla, 沒想到貴站又活起來了,
慶祝網站復生, 我也供獻出來我辛苦的一部分

不知道這期間shop有沒有改版, 就大家用的到的拷貝去用吧

程式碼:
$txt['cannot_shop_admin'] = '抱歉, 只有管理者才能進入商店街管理!';

$txt['shop'] = '商店街';
$txt['shop_action'] = '動作';
$txt['shop_add'] = '增加';
$txt['shop_add_another'] = 'Add another item';
$txt['shop_add_item'] = '新增道具';
$txt['shop_add_item_message'] = '欲新增道具, 請從列表中選擇你想新增的道具後按 "下一步":';
$txt['shop_add_item_message2'] = '正在新增道具: \'%s\'. <i>For support with this item, please email the author: %s &lt;<a href="mailto:%3$s?subject=%1$s item">%3$s</a>&gt;, or visit their website at <a href="%4$s">%4$s</a></i>';
$txt['shop_added_cat'] = '新增道具分類!';
$txt['shop_added_item'] = 'Added item ID';
$txt['shop_admin'] = '商店街管理';
$txt['shop_admin_cat'] = '道具分類';
$txt['shop_admin_general'] = '設定';
$txt['shop_admin_inventory'] = '會員的包包';
$txt['shop_admin_items'] = '道具管理';
$txt['shop_admin_items_add'] = '新增道具';
$txt['shop_admin_items_edit'] = '刪除/修改道具';
$txt['shop_admin_items_addedit'] = '新增/刪除/修改道具';
$txt['shop_admin_restock'] = '道具補貨';
$txt['shop_admin_usergroup'] = '群組操作';
$txt['shop_amount'] = '總計金額';
$txt['shop_amount_to_send'] = '轉帳金額';
$txt['shop_asc'] = '升幕';
$txt['shop_back'] = '&lt; 上一頁';
$txt['shop_back2admin'] = '回商店管理';
$txt['shop_back2bank'] = '回銀行';
$txt['shop_back2inv'] = '回包包管理';
$txt['shop_bank'] = '銀行';
$txt['shop_bank_deposit'] = '存款';
$txt['shop_bank_disableMin'] = '輸入 \'0\' 讓會員們以任何金額存提';
$txt['shop_bank_fee_deposit'] = '存款手續費';
$txt['shop_bank_fee_withdraw'] = '提款手續費';
$txt['shop_bank_interest'] = '銀行利率';
$txt['shop_bank_minDeposit'] = '最低存款額';
$txt['shop_bank_minWithdraw'] = '最低提款額';
$txt['shop_bank_welcome'] = '歡迎來到銀行!';
$txt['shop_bank_welcome_full'] = '歡迎來到銀行! 在這裡你可以安全的存入你的錢,而且還可以生利息! 你的結餘每天可以獲得%s%%的利息!';
$txt['shop_bank_withdraw'] = '提款';
$txt['shop_bank_withdrawal'] = 'Withdrawal';
$txt['shop_bonuses'] = '獎勵金';
$txt['shop_bonus_zero'] = '將值設成 \'0\' 以關閉獎勵金功能.';
$txt['shop_bonus_info'] = '會員張貼文章會依照字元(characters)或字(words)來給予獎勵金. 獎勵金會依照上面的設定來發放. 如果獎勵金超過了獎勵金上限, 則最多只會給予獎勵金上限的額度.<br />';
$txt['shop_bought_for'] = '花費 %s'; //%s = the price, eg. Bought for $100
$txt['shop_bought_item'] = '你成功的購買了一個\'%s\'. 點選左邊"我的包包", 來使用道具.';
$txt['shop_buy'] = '買東西';
$txt['shop_buynow'] = '我要購買!';
$txt['shop_cannot_open_items'] = 'ERROR: Cannot open Sources/shop/items dir!';
$txt['shop_cannot_open_images'] = 'ERROR: Cannot open Sources/shop/item_images dir!';
$txt['shop_cat_all'] = '[全部]';
$txt['shop_cat_no'] = '[未分類]';
$txt['shop_category'] = '分類';
$txt['shop_categories'] = '分類';
$txt['shop_changed_money'] = '修改會員ID %s, 口袋裡的錢為:%s,銀行錢為:%s!';
$txt['shop_count_points'] = '開啟此版面計算貨幣功能';
$txt['shop_count_points_msg'] = '會員在此版面張貼文章將可獲得金錢.';
$txt['shop_create_cat'] = '新增分類';
$txt['shop_currency_prefix'] = '幣別 Prefix';
$txt['shop_currency_suffix'] = '分類 Suffix';
$txt['shop_currently_have1'] = '你現在口袋裡有 %s ';
$txt['shop_currently_have2'] = ',銀行裡有%s';
$txt['shop_current_bank'] = '你現在口袋裡有%s, 銀行裡有%s. 請問你需要提款或存款嗎?';
$txt['shop_database_version'] = 'Database 版本';
$txt['shop_delete'] = '刪除';
$txt['shop_deleted'] = '刪除道具!';
$txt['shop_delete_after_use'] = '會員使用完道具後,將道具刪除?';
$txt['shop_deleted_item'] = '刪掉包包裡的道具編號:%s';
$txt['shop_deleted_cat'] = '刪除分類 #%s';
$txt['shop_deposit'] = '存款成功! 你現在銀行裡有%s, 身上有%s.';
$txt['shop_deposit_small'] = 'ERROR: 你至少要存%s!';
//Don't get confused here. shop_description means Description, and shop_desc means Descending
$txt['shop_description'] = '描述';
$txt['shop_desc'] = '降幕';
$txt['shop_dont_have_much'] = 'ERROR: 你的錢不夠!';
$txt['shop_dont_have_much2'] = 'ERROR: 你的銀行並沒有這麼多錢!';
$txt['shop_edit'] = '修改';
$txt['shop_edit_inventory'] = '修改會員的包包';
$txt['shop_edit_item'] = '修改道具';
$txt['shop_edit_member'] = '修改會員 id:%s (%s)的包包:';
$txt['shop_edit_member_inventory'] = '請輸入你想修改會員的包包, 然後按 "下一步--&gt;":';
$txt['shop_edit_message'] = '以下為你商店裡的全部的商品列表. 點選商品右方的"修改"以修改商品. 如欲刪除則,勾選商品後點選"刪除".';
$txt['shop_editing_item'] = '編輯道具 ID:';
$txt['shop_enter_cat_name'] = 'ERROR: 請輸入分類名稱!';
$txt['shop_give_negative'] = 'Nice try, 但是沒人能轉"負"的錢吧...? 你應該是想偷錢對吧 ;)';
//Please keep the link to DanSoft Australia here...
global $modSettings;
$txt['shop_guest_message'] = '非會員無法使用商店功能喔!<br />請註冊以瀏覽商店.<br /><br />Powered by SMFShop version ' . $modSettings['shopVersion'] . ' (Build ' . $modSettings['shopBuild'] . ') &copy; 2005, 2006, 2007 <a href="http://www.dansoftaustralia.net/">DanSoft Australia</a><br /><br />';
$txt['shop_im_sendmoney_subject'] = '%s 轉錢給你 %s';
$txt['shop_im_sendmoney_message'] = '%s 轉了 %s 給你. 以下是他轉帳的理由:\r\n\r\n %s\r\n';
$txt['shop_im_senditem_subject'] = '有人贈送了你一個道具!';
$txt['shop_im_senditem_message'] = '%s 送了一個 %s 給你. 以下是他贈送的理由:\r\n\r\n %s\r\n';
$txt['shop_im_trade_subject'] = 'Your trade of %s item';
$txt['shop_im_trade_message'] = '恭喜! [url=' . $scripturl . '?action=profile;u=%s]%s[/url] 購買了你的 %s , 花了%s.\r\n';
$txt['shop_image'] = '圖片';
$txt['shop_image_width'] = '圖片寬';
$txt['shop_image_height'] = '圖片高';
$txt['shop_input'] = '這個道具要使用請輸入設定值. 請填寫下面的空格, 然後按 "使用道具"';
$txt['shop_interest'] = '利率';
$txt['shop_invalid_send_amount'] = 'ERROR: 請輸入正確的值來轉帳!';
$txt['shop_inventory'] = '包包';
$txt['shop_invother_message'] = '請輸入你想看包包的會員id, 然後按 "偷看其他會員的包包"';
$txt['shop_item'] = '道具';
$txt['shop_items'] = '道具';
$txt['shop_item_configure'] = '道具設定:';
$txt['shop_item_delete_error'] = 'ERROR: 請選擇道具刪除!';
$txt['shop_item_error'] = 'ERROR: 無法產生 \'%s\' 道具!<br />';
$txt['shop_item_notice'] = '道具圖片存在 Sources/shop/item_images/. 你可以自由的增刪圖片!';
$txt['shop_item_to_send'] = '贈與的道具';
$txt['shop_itemsperpage'] = '每頁顯示道具數';
$txt['shop_invother'] = '偷看其他會員的包包';
$txt['shop_membergroup'] = '群組';
$txt['shop_member_name'] = '會員名稱';
$txt['shop_member_no_exist'] = 'ERROR: 你輸入的會員名稱: (\'%s\') 並不存在!';
$txt['shop_members_no_exist'] = 'ERROR: 以下會員不存在: %s';
$txt['shop_membergroup_desc'] = '你可以依群組直接給錢或扣錢. 設定好後按 "下一步".';
$txt['shop_member_id'] = '會員ID';
$txt['shop_money_in_bank'] = '銀行裡的錢';
$txt['shop_money_in_pocket'] = '口袋中的錢';
$txt['shop_name'] = '名稱';
$txt['shop_name_desc_match'] = '記得修改道具名稱和描述以對應下方的道具設定.';
$txt['shop_need'] = '你需要 %s';
$txt['shop_new_cat'] = '新增分類';
$txt['shop_next'] = '下一步 --&gt;';
$txt['shop_next2'] = '下一頁 &gt;';
$txt['shop_not_enough_money'] = 'ERROR: 真抱歉你的錢不太夠買這個道具 (你還需要%s)';
$txt['shop_noway'] = '不..我再想想好了';
$txt['shop_no_negative'] = 'ERROR: 你不能存提"負"的錢';
$txt['shop_no_sale'] = 'ERROR: 這道具不能交易!';
$txt['shop_owners'] = '誰也有這個道具?';
$txt['shop_per_char'] = '每個字元(character)';
$txt['shop_per_char2'] = '每個字元(character)';
$txt['shop_per_new_post'] = '每篇文章';
$txt['shop_per_new_post2'] = '每篇文章';
$txt['shop_per_new_topic'] = '每一篇新主題';
$txt['shop_per_new_topic2'] = '每一篇新主題';
$txt['shop_per_post_limit'] = '獎勵金上限';
$txt['shop_per_word'] = '每個字(word)';
$txt['shop_per_word2'] = '每個字(word)';
$txt['shop_please_delete'] = 'Yes, please delete it';
$txt['shop_pocket'] = 'pocket';
$txt['shop_post_limit_zero'] = '獎勵金上限設成\'0\', 則無上限.';
$txt['shop_pre-suf_confuse'] = 'Prefix會顯示在金額之<u>前</u>, Suffix會顯示在金額之<u>後</u>. 例如, Prefix: \'$\', suffix \'元\', 就會顯示 \'$100元\'.';
$txt['shop_price'] = '價格';
$txt['shop_reg_bonus'] = '註冊後能獲得的金錢';
$txt['shop_restock_lessthan'] = '對所有少於指定數量的道具補貨';
$txt['shop_restock_amount'] = '要增加的庫存數';
$txt['shop_richest_bank'] = '前10位富豪 (銀行)';
$txt['shop_richest_pocket'] = '前10位富豪 (口袋)';
$txt['shop_saved'] = '己儲存!';
$txt['shop_save_changes'] = '儲存';
$txt['shop_send_item'] = '贈送道具';
$txt['shop_senditem'] = '贈送道具';
$txt['shop_send_items_message'] = '你在這裡可以贈送會員東西, 他們就不用自己買了, 如果你想出售道具, 到交易中心去. 你要交易的道具不會顯示在這裡.';
$txt['shop_send_message_to_give'] = '你要給會員的訊息';
$txt['shop_send_money'] = '轉帳';
$txt['shop_send_money_message'] = '你轉帳的對象會收到一封轉帳通知, 如果你想要留這給你轉帳的對象, 可以在下面的 "你要給會員的訊息" 輸入.';
$txt['shop_settings_general'] = '一般設定';
$txt['shop_settings_currency'] = '貨幣設定';
$txt['shop_soldout'] = '已售完!';
$txt['shop_soldout_full'] = 'ERROR: 這道具已售完!';
$txt['shop_sort'] = '排序';
$txt['shop_stock'] = '庫存';
$txt['shop_stoptrade'] = '停止交易';
$txt['shop_subtract'] = '減少';
$txt['shop_successfull_send'] = '道具:%s 成功道給 %s';
$txt['shop_sure_delete'] = '你確定要刪除以下道具:';
$txt['shop_sure_delete_cat'] = '你確定要刪除這個分類? 這分類下的所有道具也都會被刪除!';
$txt['shop_trade'] = '交易中心';
$txt['shop_trade_bought_item'] = '你成功購買了一個 "%s", 賣家: %s. 到 "我的包包" 去使用他.';
$txt['shop_trade_cancelled'] = '你的道具已經不會在交易中心出現.';
$txt['shop_trade_enable'] = '開啟交易中心';
$txt['shop_trade_list'] = '以下是待交易的道具.';
$txt['shop_trade_message'] = 'Please type in the amount you wish to trade this item for. Once you click "Next--&gt;", your item will be listed in the Trade Centre, and other members will be able to buy this item from you. As soon as a member buys the item, you\'ll receive an email.<br /><br /><b>NOTE: </b>If your item is listed in the Trade Centre, you <b>won\'t</b> be able to use it!';
$txt['shop_trade_negative'] = 'ERROR: You can\'t trade an item for a negative amount!';
$txt['shop_trade_success'] = 'Your request was successful. Your item is now listed in the Trade Centre, and other members can buy your item from you.';
$txt['shop_trade_welcome'] = '歡迎來到商店街交易中心!';
$txt['shop_trade_welcome_full'] = '歡迎來到商店街交易中心! 這裡你可以購買別人出售的道具,或是出售你手中的道具.';
$txt['shop_tradeitem'] = '交易道具';
$txt['shop_trade_saleby'] = '由 %s 出售';
$txt['shop_trading'] = 'Trading for %s';
$txt['shop_transfer_success'] = '成功轉移道具!';
$txt['shop_unable_connect'] = ' ';
$txt['shop_unusable'] = 'Unusable!';
$txt['shop_use'] = '使用道具';
$txt['shop_use_others_item'] = '你在做什麼?? 這<B>並不是</B>你的道具!!! 別來胡搞, 系統沒那麼呆 ;)';
$txt['shop_use_others_item2'] = '你在做什麼?? 這<B>並不是</B>你的道具!!! 我猜到你會搞這個了... 別來胡搞, 系統沒那麼呆 ;)';
$txt['shop_users_own_item'] = '%s 個會員擁有這個道具: \'%s\':';
$txt['shop_version_info_header'] = '版本訊息';
$txt['shop_version_number'] = '版本';
$txt['shop_version_reldate'] = '釋出日期';
$txt['shop_view_all'] = '看全部的會員';
$txt['shop_viewing_inv'] = '正在觀看會員的包包: %s (%s)';
$txt['shop_viewing_inv2'] = '%s的包包';
$txt['shop_wanna_trade'] = '想要交易你的道具嗎? 選擇"我的包包", 然後點擊道具旁邊的 "交易道具". 然後你要出售的道具就會出現在這裡, 其他會員便可以購買. 如果有人購買了你的道具你將會接到一則訊息.';
$txt['shop_welcome'] = '歡迎來到商店街!';
$txt['shop_welcome_full'] = '歡迎來到商店街! 你可以用你張貼文章所得到的錢來買道具. 你每張貼一則新主題會獲得%s, 每回覆一篇文章可以獲得%s';
$txt['shop_welcome_full2'] = ', 再加上額外的字數獎勵金. ';
$txt['shop_welcome_full3'] = ' (上限為 %s)';
$txt['shop_withdraw'] = '提款完成! 你現在身上有 %s,銀行裡有%s.';
$txt['shop_withdraw_small'] = 'ERROR: 你至少要提領 %s!';
$txt['shop_view_all2'] = '看全部的會員 (銀行)';
$txt['shop_yourinv'] = '我的包包';

$txt['shop_view_inv'] = '偷看他的包包';
$txt['shop_send_money_to'] = '轉帳給';
« 最後編輯時間: 七月 26, 2009, 06:18:11 am 由 gobido » 向版主檢舉   已記錄
gobido
初學者
*
離線 離線

文章: 4


« 回覆文章 #1 於: 七月 26, 2009, 06:20:18 am »

Steal.php

item的翻譯原作並沒有分開, 因為我code放主機上, 自己的code隨著上一顆hd去了 代表性的貼一個來

程式碼:
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: Steal.php 79 2007-01-18 08:26:55Z daniel15                              $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_Steal extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'Daniel15';
$this->authorWeb 'http://www.dansoftaustralia.net/';
$this->authorEmail 'dansoft@dansoftaustralia.net';

$this->name '偷錢';
$this->desc '從其他人的包包裡偷錢!';
$this->price 50;

$this->require_input true;
$this->can_use_item true;
$this->addInput_editable true;
}

function getAddInput()
{
global $item_info;
if ($item_info[1] == ''$item_info[1] = 40;
return '為了讓道具有趣, 會員 <b>不需要也不應該</b>知道偷的機率! 這樣比較好玩 :-)<br />偷錢成功的機率: <input type="text" name="info1" value="' $item_info[1]  . '" />%';
}

function getUseInput()
{
global $context$scripturl$settings$txt;
return '從誰偷錢: <input type="text" name="stealfrom" id="membername" size="50" />
<a href="' 
$scripturl '?action=findmember;input=membername;quote=0;sesc=' $context['session_id'] . '" onclick="return reqWin(this.href, 350, 400);"><img src="' $settings['images_url'] . '/icons/assist.gif" border="0" alt="' $txt['find_members'] . '" /> 查詢會員</a><br />';
}

function onUse()
{
global $db_prefix$ID_MEMBER$item_info;

// Check some inputs
if (!isset($_POST['stealfrom']) || $_POST['stealfrom'] == '') die('ERROR: Please enter a username to steal from!');

// This code from PersonalMessage.php. It trims the " characters off the membername posted, 
// and then puts all names into an array
$_POST['stealfrom'] = strtr($_POST['stealfrom'], array('\\"' => '"'));
preg_match_all('~"([^"]+)"~'$_POST['stealfrom'], $matches);
$userArray array_unique(array_merge($matches[1], explode(','preg_replace('~"([^"]+)"~'''$_POST['stealfrom']))));

// We only want the first memberName found
$user $userArray[0];

// Get a random number between 0 and 100
$try mt_rand(0100);

// If successful
if ($try $item_info[1])
{

// Get stealee's (person we're stealing from) money count
$result db_query("
SELECT money
FROM {$db_prefix}members
WHERE memberName = '{$user}'"
__FILE____LINE__);

// If user doesn't exist
if (mysql_num_rows($result) == 0)
die('ERROR: The specified user doesn\'t exist!');

$row mysql_fetch_assoc($result);

// Get random amount between 0 and amount of money stealee has
$steal_amount mt_rand(0$row['money']);

// Take this money away from stealee...
$result db_query("
UPDATE {$db_prefix}members
SET money = money - {$steal_amount}
WHERE memberName = '{$user}'
LIMIT 1"
__FILE____LINE__);
//...and give to stealer (robber)
$result db_query("
UPDATE {$db_prefix}members
SET money = money + {$steal_amount}
WHERE ID_MEMBER = {$ID_MEMBER}
LIMIT 1"
__FILE____LINE__);

if ($steal_amount 50)
return '偷成功了耶,雖然你只偷了 ' $steal_amount '!';
else
return '成功的偷了 ' $steal_amount ' 從 ' $user '的身上! 他們沒把錢存在銀行是他們自己的錯:)!';
}
else
{
// If reducing Karma doesn't work, replace
// 'karmaBad = karmaBad + 10' with 'karmaGood = karmaGood - 10'
//$result = db_query("
// UPDATE {$db_prefix}members
// SET karmaBad = karmaBad + 10
// WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__);
   return '偷錢 <b>失敗!</b>';
}
}
}

?>

向版主檢舉   已記錄
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #2 於: 七月 28, 2009, 04:14:23 pm »

多謝分享喔 Smiley
向版主檢舉   已記錄

頁: [1]   向上
  寄送主題  |  列印  
 
前往:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!