外掛:kctony 付費瀏覽 1.0.7、cash mod 2.2.2等
問題:{附圖}請問各位大大如何把下拉式的收費選單改做為自行輸入的空格,請各位幫幫忙好嗎,我已找過很多文章但無提及這個問題。
版主: 版主管理群
在[原創][外掛] 付費瀏覽 -by- KCTONY當中,ccmorange 寫:神呀!教教我吧
代碼: 選擇全部
----------------------------------------------------------
有人提到使用者會漫天開價,那就改成選單式吧!(不包含在原始檔中)
http://phpbb-tw.net/phpbb/viewtopic.php?p=64088#64088
代碼: 選擇全部
#
#-----[ OPEN ]-----
#
templates/YOUR_THEME/posting_body.tpl
#
#-----[ FIND ]-----
#
<span class="gen">{PAY_MONEY}</span>
#
#-----[ REPLACE WITH ]-----
#
<span class="gen">{L_SET_MONEY}</span><input type="text" name="pay_money" size="10" value="{VALUE_PAY_MONEY}" /><span class="gen">{VIRTUAL_MONEY}</span>
#
#-----[ OPEN ]-----
#
posting.php
#
#-----[ FIND ]-----
#
'SMILIES_STATUS' => $smilies_status,
#
#-----[ AFTER, ADD ]-----
#
'L_SET_MONEY' => $lang['paymoney_set_money'], // Pay_Money_MOD
'VALUE_PAY_MONEY' => $pay_money -1, // Pay_Money_MOD
'VIRTUAL_MONEY' => $lang['Virtual_Money'], // Pay_Money_MOD
#
#-----[ OPEN ]-----
# 此部份修改純粹只為了[b]美觀[/b]
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]-----
# 後面還有很長的程式碼...
$lang['paymoney_set_money'] = "這一篇文章是否設定為付費瀏覽?...";
#
#-----[ REPLACE WITH ]-----
#
$lang['paymoney_set_money'] = "這一篇文章是否設定為付費瀏覽?";
#
#-----[ AFTER, ADD ]-----
# [b]現金[/b] 請自行更換成您所設定的貨幣名稱\r
$lang['Virtual_Money'] = "現金<br>( 預設為 -1, 是不用付費; 若設定為 0, 則只是會記錄下觀看此文的名單.)";
#
#-----[ SAVE & CLOSE ]-----
#
建議您參考下列文章修改:電腦白痴仔 寫:我仲有野想問呀...
外掛:kctony 付費瀏覽 1.0.7、cash mod 2.2.2等
我測試過全部都無問題...
但如果用快速回覆....
...
佢就會自動設計為0呀....{金幣(設為 -1 為不付費,0 是只記錄下觀看此文的}
這變左用快速回覆有問題呀...
請問我要怎樣改才可以用快速回覆..自動設計為 {-1 為不付費}
thx 多謝指引心靈捕手 寫:在[原創][外掛] 付費瀏覽 -by- KCTONY當中,ccmorange 寫:神呀!教教我吧
最原始的設計就是如您所說" 自行輸入的空格",
後來是為了避免使用者會漫天開價, 才改成目前的選單式.Source: http://phpbb-tw.net/phpbb/viewtopic.php?t=9973代碼: 選擇全部
---------------------------------------------------------- 有人提到使用者會漫天開價,那就改成選單式吧!(不包含在原始檔中) http://phpbb-tw.net/phpbb/viewtopic.php?p=64088#64088
如果您想改回自行輸入的空格的話,
那麼以下的修改, 提供給您參考:ps. 不改回去, 有這麼嚴重嗎?代碼: 選擇全部
# #-----[ OPEN ]----- # templates/YOUR_THEME/posting_body.tpl # #-----[ FIND ]----- # <span class="gen">{PAY_MONEY}</span> # #-----[ REPLACE WITH ]----- # <span class="gen">{L_SET_MONEY}</span><input type="text" name="pay_money" size="10" value="{VALUE_PAY_MONEY}" /><span class="gen">{VIRTUAL_MONEY}</span> # #-----[ OPEN ]----- # posting.php # #-----[ FIND ]----- # 'SMILIES_STATUS' => $smilies_status, # #-----[ AFTER, ADD ]----- # 'L_SET_MONEY' => $lang['paymoney_set_money'], // Pay_Money_MOD 'VALUE_PAY_MONEY' => $pay_money -1, // Pay_Money_MOD 'VIRTUAL_MONEY' => $lang['Virtual_Money'], // Pay_Money_MOD # #-----[ OPEN ]----- # 此部份修改純粹只為了[b]美觀[/b] language/lang_chinese_traditional_taiwan/lang_main.php # #-----[ FIND ]----- # 後面還有很長的程式碼... $lang['paymoney_set_money'] = "這一篇文章是否設定為付費瀏覽?..."; # #-----[ REPLACE WITH ]----- # $lang['paymoney_set_money'] = "這一篇文章是否設定為付費瀏覽?"; # #-----[ AFTER, ADD ]----- # [b]現金[/b] 請自行更換成您所設定的貨幣名稱\r $lang['Virtual_Money'] = "現金<br>( 預設為 -1, 是不用付費; 若設定為 0, 則只是會記錄下觀看此文的名單.)"; # #-----[ SAVE & CLOSE ]----- #![]()
奉勸您試試就好了, 個人以為還是選單式較理想.
該快速回文修改viewtopic.php如下MOD Title: Quick Reply with Quote
MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
MOD Version: 1.1.3
代碼: 選擇全部
//
// Quick Reply Mod
//
if ( ((!$is_auth['auth_reply']) or ($forum_topic_data['forum_status'] == FORUM_LOCKED) or ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) and ($userdata['user_level'] != ADMIN) )
{
$quick_reply_form = "";
}
else
{
if ( $can_watch_topic && $is_watching_topic )
{
$notify = 1;
}
else
{
$notify = $userdata['user_notify'];
}
$bbcode_uid = $postrow[$total_posts - 1]['bbcode_uid'];
$last_poster = $postrow[$total_posts - 1]['username'];
$last_msg = $postrow[$total_posts - 1]['post_text'];
$last_msg = str_replace(":1:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":u:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":o:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":$bbcode_uid", "", $last_msg);
$last_msg = str_replace("'", "'", $last_msg);
$last_msg = "[QUOTE=\"$last_poster\"]" . $last_msg . "[/QUOTE]";
$quick_reply_form = "
<script language='JavaScript' type='text/javascript'>
function checkForm() {
formErrors = false;
document.post.message.value = '';
if (document.post.input.value.length < 2) {
formErrors = '" . $lang['Empty_message'] . "';
}
if (formErrors) {
alert(formErrors);
return false;
} else {
if (document.post.quick_quote.checked) {
document.post.message.value = document.post.last_msg.value;
}
document.post.message.value += document.post.input.value;
return true;
}
}
</script>
<form action='".append_sid("posting.$phpEx")."' method='post' name='post' onsubmit='return checkForm(this)'>
<span class='genmed'><b>".$lang["Quick_Reply"].":</b><br />";
if (!$userdata['session_logged_in'])
{
$quick_reply_form .= $lang['Username'] . ": <input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";
}
$quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post''></textarea><br />
<input type='checkbox' name='quick_quote' />".$lang["Quick_quote"]."<br />
<input type='checkbox' name='attach_sig' checked='checked' />".$lang["Attach_signature"]."<br />
<input type='hidden' name='mode' value='reply' />
<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />
<input type="hidden" name="pay_money" value="-1" />
<input type='hidden' name='t' value='" . $topic_id . "' />
<input type='hidden' name='message' value='' />
<input type='hidden' name='notify' value=" . $notify . " />
<input type='hidden' name='last_msg' value='" . $last_msg . "' />
<input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' />
<input type='submit' name='post' class='mainoption' value='".$lang["Submit"]."' />
</form></span>";
}
$template->assign_vars(array(
'QUICK_REPLY_FORM' => $quick_reply_form)
);
//
// END Quick Reply Mod
//
代碼: 選擇全部
<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />代碼: 選擇全部
<input type='hidden' name='pay_money' value='-1' />