[問題]MSN外掛修改問題....

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
hpo14
竹貓忠實會員
竹貓忠實會員
文章: 414
註冊時間: 2003-05-10 16:37
來自: M Starbucks

[問題]MSN外掛修改問題....

文章 hpo14 »

小弟自己改了MSN外掛的...內容下面有圖可以看...
圖檔
我去掉ㄌ秀出新進圖片的功能....只留下隨機秀圖...
但是她一次秀三張.......誰可以交我怎樣改成只秀兩張?
hpo14
竹貓忠實會員
竹貓忠實會員
文章: 414
註冊時間: 2003-05-10 16:37
來自: M Starbucks

文章 hpo14 »

怎麼這麼多人看過我的主題.....卻沒有半個人回覆...
都沒有人可以交我怎麼改嗎?
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2004 02/16更新)

竹貓星球發問規則:
http://phpbb-tw.net/phpbb/viewtopic.php?t=16149

請不要濫用 私人訊息 或是 MSN 問問題...你以為竹貓是架好看的阿
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

文章 動機不明 »

你..... 你應該先把程式碼放出來吧......(逃~)
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
hpo14
竹貓忠實會員
竹貓忠實會員
文章: 414
註冊時間: 2003-05-10 16:37
來自: M Starbucks

文章 hpo14 »

我只知道這段是讀取隨機展示照片程式碼..

代碼: 選擇全部

<table width="100%" border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline" HEIGHT=200>
	<th colspan="2" align="center" class="thTop" width="20%"> 論壇相簿隨機圖片 </th>
	<tr>
	<!-- BEGIN images -->
	<td class="row1" nowrap onMouseOver="this.style.backgroundColor='#eaeaea'" onMouseOut="this.style.backgroundColor='#f5f5f5'" WIDTH="25%"><span class="forumlink">
	<a href="../4images/details.php?image_id={images.image_url}" class="index" target="_top"><img src="{images.image}" border="0" onload="javascript:if(this.height>150) this.height=150"><BR>{images.image_title}</a>{images.username}<BR>
	<!-- END images -->
</table>
它是從這裡讀出來的
應該是從這下手吧 :?:

代碼: 選擇全部

<?
/***************************************************************************
 *                                 showpic.php
 *                            ------------------
 *   begin                : Sunday, Nov 17, 2002
 *   copyright            : (C) 2002 Tofu Chen
 *   email                : tofu0913@ms10.url.com.tw
 *
 *   $Id: news.php,v 1.2 2002/05/31 0:37:00 sj26 Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
//
// End session management
//

//
// Start read 4images DB
//
/*$pnlink = mysql_connect("資料庫名稱","連資料庫帳號","密碼")  or die ("mysql_connect() failed.");
mysql_select_db("phpbb_", $pnlink) or die ("mysql_connect() failed."); */
//$pnquery = mysql_query("SELECT * FROM 4images_images WHERE cat_id ='1'  OR cat_id ='3'  OR cat_id ='5'  OR cat_id ='7'  OR cat_id ='9' order by image_date desc limit 3");
//$pnquery = mysql_query("SELECT A.image_id,A.cat_id,A.image_thumb_file,A.image_name,B.username FROM 4images_images A, phpbb_users B WHERE A.user_id=B.user_id ORDER BY RAND() desc LIMIT 3");
$pnquery = "SELECT A.image_id,A.cat_id,A.image_thumb_file,A.image_name,B.username FROM 4images_images A, phpbb_users B WHERE A.user_id=B.user_id ORDER BY RAND() desc LIMIT 3";

// set template
$template->set_filenames(array("body" => "showpic_body2.tpl"));
if ( !($result = $db->sql_query($pnquery)) )
{
	message_die(GENERAL_ERROR, '無法取得工作內容!!', '', __LINE__, __FILE__, $pnquery);
}
//while ($myrow = mysql_fetch_row($pnquery)) {
while ($myrow = $db->sql_fetchrow($result)) {
	$image=($myrow[2]=="")?"http://hpo14.myftp.org/4images/templates/4waters/icons/jpg.gif":"http://hpo14.myftp.org/4images/data/thumbnails/".$myrow[1]."/".$myrow[2];
	$username =($myrow[4]=="")?"":"(".$myrow[4].")";

	$template->assign_block_vars("images",array(
		"image_url" => $myrow[0],
		"image" => $image,
		"image_title" => $myrow[3],
		"username" => $username
	));
}

$pnquery = "SELECT A.image_id,A.cat_id,A.image_thumb_file,A.image_name,B.username FROM 4images_images A, phpbb_users B WHERE A.user_id=B.user_id ORDER BY image_id desc LIMIT 1";
if ( !($result = $db->sql_query($pnquery)) )
{
	message_die(GENERAL_ERROR, '無法取得工作內容!!', '', __LINE__, __FILE__, $pnquery);
}
if ($row = $db->sql_fetchrow($result)) {
	$image=($row[2]=="")?"http://hpo14.myftp.org/4images/templates/4waters/icons/jpg.gif":"http://hpo14.myftp.org/4images/data/thumbnails/".$row[1]."/".$row[2];
	$username =($row[4]=="")?"":"(".$row[4].")";
	$template->assign_block_vars("new_images",array(
		"image_url" => $row[0],
		"image" => $image,
		"image_title" => $row[3],
		"username" => $username
	));
}
//
// End read 4images DB
//

//
// Generate the page
//

$template->assign_vars(array(
	"T_TITLE" => $lang['Random_Image'],
	"T_TITLE2" => $lang['New_Image']
));

$template->pparse('body');

//mysql_close($pnlink);

?>
主題已鎖定

回到「外掛問題討論」