[以解決](v3) 手術房加入 改變推薦網址

WOG設定安裝教學

版主: 涅魂, 簫哥

頭像
齋月
 
文章: 557
註冊時間: 2006-02-27 7:54 am

[以解決](v3) 手術房加入 改變推薦網址

文章齋月 » 2007-02-26 11:42 am

感謝 涅魂 的指教
http://www.2233.idv.tw/viewtopic.php?p=3915285#3915285

修改方式 寫:
開啟 wog.js 寫:尋找
代碼: 選擇全部
function black_shop()
{
 ...
}
 

該function裡 適當位置加入
代碼: 選擇全部
   f.write('<form action="wog_act.php" name="f3" method="post" target="mission">');
   f.write(temp_table1);
   f.write('<tr><td>變更推薦網址</td></tr>');
   f.write('<tr><td>輸入網頁名稱 <input type="text" name="site" size="20"></td></tr>');
   f.write('<tr><td>輸入網址連結 <input type="text" name="siteurl" value="http://" size="40" maxlength="150"></td></tr>');
   f.write('<tr><td><input type="button" value="改變推薦網址" onclick="parent.act_click(\'store\',\'url\',document.f3.site.value+\',\'+document.f3.siteurl.value)"></td></tr>');
   f.write('<tr><td>變推薦網需花100萬</td></tr>');
   f.write(temp_table2);
   f.write('</form>');

開啟 wog_act.php 寫:尋找
代碼: 選擇全部
         case "sex":
            $wog_act_class->p_sex($HTTP_COOKIE_VARS["wog_cookie"]);
         break;


底下加上
代碼: 選擇全部
         case "url":
            $wog_act_class->p_url($HTTP_COOKIE_VARS["wog_cookie"]);
         break;

開啟 wog_act_config.php 寫:尋找
代碼: 選擇全部
$wog_arry["player_age"]=30;//多少天一歲


下面加上
代碼: 選擇全部
$wog_arry["chang_url"]=1000000;//變推薦網費用

開啟 wog_act_store.php 寫:尋找
代碼: 選擇全部
}
?>


上面加上
代碼: 選擇全部
   function p_url($user_id)
   {
      global $DB_site,$_POST,$wog_arry,$lang;
      list($site,$siteurl)=explode(',',$_POST['temp_id']);
      if(empty($site))
      {
         alertWindowMsg($lang['wog_act_url_noname']);
      }
      if(empty($siteurl) || $siteurl=="http://")
      {
         alertWindowMsg($lang['wog_act_url_nourl']);
      }
      $have_price=$DB_site->query_first("select p_money from wog_player where p_id=".$user_id."");
      if($wog_arry["chang_url"]>$have_price['p_money'])
      {
         alertWindowMsg($lang['wog_act_nomoney']);
      }
      $DB_site->query("update wog_player set p_url='".$siteurl."',p_homename='".$site."',p_money=p_money-".$wog_arry["chang_url"]." where p_id=".$user_id."");
      showscript("parent.d_p_url='".$siteurl."';parent.d_p_homename='".$site."';parent.job_end(11)");
      unset($have_price);
   }

開啟 wog_act_traditional_chinese.php 寫:尋找
代碼: 選擇全部
//--------------sex----------
$lang['wog_act_img_nosexg'] = '沒有選擇性別';
$lang['wog_act_img_errsex'] = '錯誤性別';


下面加上
代碼: 選擇全部
//--------------url----------
$lang['wog_act_url_noname'] = '沒有輸入網站名稱';
$lang['wog_act_url_nourl'] = '沒有輸入網址';


儲存檔案(完)



最後由 齋月 於 2007-02-28 1:58 pm 編輯,總共編輯了 3 次。

頭像
齋月
 
文章: 557
註冊時間: 2006-02-27 7:54 am

文章齋月 » 2007-02-26 11:43 am

我有試著加入

addslashes()

stripslashes()

等等。。。(有可能的都隨便加 =_=)

不過還是沒辦法呢。。。不知道哪裡寫錯 @_@


==============================================

找到一個錯誤 腳色狀態無法更新的問題

開啟 wog_act_store.php 寫:function p_url() 內

尋找
代碼: 選擇全部
showscript("parent.job_end(11)");



覆蓋為
代碼: 選擇全部
showscript("parent.d_p_url='".$_POST["siteurl"]."';parent.d_p_homename='".$_POST["site"]."';parent.job_end(11)");


儲存關閉


不過中文的問題還是存在 囧TZ




涅魂
 
文章: 4463
註冊時間: 2004-01-04 11:17 am
來自: Taiwan
性別: 男生

文章涅魂 » 2007-02-26 5:59 pm

試試看這個

開啟檔案wog/wog.js

尋找
代碼: 選擇全部
/*=====================================================
 Copyright (C) ETERNAL<iqstar.tw@gmail.com>
 Modify : 2005/09/17
 URL : http://www.2233.idv.tw

 This program is free software; you can redistribute it and/or modify
 it 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.
===================================================== */

下面,加上
代碼: 選擇全部
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=big5">

這是剛剛找到的改法,還沒測試過,試看看有沒有效吧 :lol:


圖檔

頭像
齋月
 
文章: 557
註冊時間: 2006-02-27 7:54 am

文章齋月 » 2007-02-27 1:39 pm

還是無法 OTZ

關於那段的話 我發現在
function message_cls()
就有了 ︿_︿

試著換過資料欄的 校對 結果還是不行 =_=




涅魂
 
文章: 4463
註冊時間: 2004-01-04 11:17 am
來自: Taiwan
性別: 男生

文章涅魂 » 2007-02-28 10:51 am

嗯,既然編碼的問題沒辦法直接解決,那換成[sub]偷雞摸狗[/sub]的方法吧XD

開啟檔案 wog/class/wog_act_store.php

尋找
代碼: 選擇全部
function p_url($user_id)
{
.....
.....
.....
}

覆蓋成
代碼: 選擇全部
   function p_url($user_id)
   {
      global $DB_site,$_POST,$wog_arry,$lang;
      list($site,$siteurl)=explode(',',$_POST['temp_id']);
      if(empty($site))
      {
         alertWindowMsg($lang['wog_act_url_noname']);
      }
      if(empty($siteurl) || $siteurl=="http://")
      {
         alertWindowMsg($lang['wog_act_url_nourl']);
      }
      $have_price=$DB_site->query_first("select p_money from wog_player where p_id=".$user_id."");
      if($wog_arry["chang_url"]>$have_price['p_money'])
      {
         alertWindowMsg($lang['wog_act_nomoney']);
      }
      $DB_site->query("update wog_player set p_url='".$siteurl."',p_homename='".$site."',p_money=p_money-".$wog_arry["chang_url"]." where p_id=".$user_id."");
      showscript("parent.d_p_url='".$siteurl."';parent.d_p_homename='".$site."';parent.job_end(11)");
      unset($have_price);
   }


開啟檔案 wog/wog.js

In black_shop

尋找
代碼: 選擇全部
   f.write('<form action="wog_act.php" method="post" target="mission">');
   f.write('<input type="hidden" name="f" value="store">');   
   f.write('<input type="hidden" name="act" value="url">');
   f.write(temp_table1);
   f.write('<tr><td>變更推薦網址</td></tr>');
   f.write('<tr><td>輸入網頁名稱 <input type="text" name="site" size="20"></td></tr>');
   f.write('<tr><td>輸入網址連結 <input type="text" name="siteurl" value="http://" size="40" maxlength="150"></td></tr>');
   f.write('<tr><td><input type="submit" value="改變推薦網址"></td></tr>');
   f.write('<tr><td>變推薦網需花100萬</td></tr>');
   f.write(temp_table2);
   f.write('</form>');

覆蓋成
代碼: 選擇全部
   f.write('<form action="wog_act.php" name="f3" method="post" target="mission">');
   f.write(temp_table1);
   f.write('<tr><td>變更推薦網址</td></tr>');
   f.write('<tr><td>輸入網頁名稱 <input type="text" name="site" size="20"></td></tr>');
   f.write('<tr><td>輸入網址連結 <input type="text" name="siteurl" value="http://" size="40" maxlength="150"></td></tr>');
   f.write('<tr><td><input type="button" value="改變推薦網址" onclick="parent.act_click(\'store\',\'url\',document.f3.site.value+\',\'+document.f3.siteurl.value)"></td></tr>');
   f.write('<tr><td>變推薦網需花100萬</td></tr>');
   f.write(temp_table2);
   f.write('</form>');


儲存、關閉所有檔案

其實這個方法還意外地蠻有用的說 :roll:


圖檔

頭像
齋月
 
文章: 557
註冊時間: 2006-02-27 7:54 am

文章齋月 » 2007-02-28 1:56 pm

真的就好了耶 0_0

涅 請問一下 其中奧義在哪 =.=?




涅魂
 
文章: 4463
註冊時間: 2004-01-04 11:17 am
來自: Taiwan
性別: 男生

文章涅魂 » 2007-02-28 3:24 pm

這個我也不是很瞭解呢,我認為是生成頁面方式的問題

wog_view是由JS所生成的,所以網頁傳遞資料的編碼強制設為utf8,顯示內容用的編碼則為message_cls()設定的BIG5

foot則是由網頁生成的,所以傳遞跟顯示編碼為網頁所設定的編碼

不過以上也只是猜測,實際情況就不知道了 :oops:


圖檔


回到 精華區

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 2 位訪客