[外掛] 使用 links.js.php 的語法, 更改 Smartor's ezPortal 的 Links

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8513
註冊時間: 2004-04-30 01:54
來自: Taiwan

[外掛] 使用 links.js.php 的語法, 更改 Smartor's ezPortal 的 Links

文章 心靈捕手 »

代碼: 選擇全部

######################################################## 
## 外掛名稱: Use Advanced links mod Modify Links of Smartor's ezPortal
## 外掛作者: wang5555 < wang5555adsl@giga.net.tw > (心靈捕手) http://220.134.232.37/
## 外掛描述: 這個外掛, 使用 (Advanced links mod) links.js.php 的語法 (功能), 更改 Smartor's ezPortal 的 Links 語法 (顯示).
## 外掛版本: 1.0.0
## 
## 安裝難度: 簡單
## 安裝時間: 3 分鐘內
##
## 需要編輯的檔案: 2
## portal.php
## templates/subSilver/portal_body.tpl
##
## 附加的檔案: n/a
##
## 版權聲明: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
################################################################# 
## 由於安全上的考量, 請檢查: http://phpbb-tw.net/phpbb/index.php
## 是否有此外掛的最新版本. 
##
############################################################## 
## 作者留言:
## 修改前提, 您的論壇已經有安裝下列兩個外掛且功能正常.
## 1. ezportal_v218e.rar
## http://smartor.is-root.com/viewtopic.php?t=1860
## 2. advanced_links_mod_1.2.2.rar
## http://www.phpbb2.de/dload.php?action=file&file_id=361
## 
## 此外掛在 2.0.21 上測試過.
##
############################################################## 
## 版本歷史: 
##
##   2006 - 10 - 09 版本 1.0.0
##   - 首次發佈
## 
############################################################## 
## 在增加此外掛前, 請務必備份所有需要修改的檔案
##############################################################

#
#-----[ OPEN ]-----
#
portal.php

#
#-----[ FIND ]-----
#
//
// Start output of page
//

#
#-----[ BEFORE, ADD ]-----
#
// + links
$sql = "SELECT *
		FROM ". LINK_CONFIG_TABLE;
	if(!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Could not query Link config information", "", __LINE__, __FILE__, $sql);
	}
	
	while( $row = $db->sql_fetchrow($result) )
	{
		$link_config_name = $row['config_name'];
		$link_config_value = $row['config_value'];
		$link_config[$link_config_name] = $link_config_value;
		$link_self_img = $link_config['site_logo'];
		$site_logo_height = $link_config['height'];
		$site_logo_width = $link_config['width'];
		$display_interval = $link_config['display_interval'];
		$display_logo_num = $link_config['display_logo_num'];
	}

$sql = "SELECT link_id, link_title, link_logo_src
	FROM " . LINKS_TABLE . "
	WHERE link_active = 1
	ORDER BY link_hits DESC";

// If failed just ignore
if( $result = $db->sql_query($sql) )
{
	$links_logo = "";
	while($row = $db->sql_fetchrow($result))
	{
		//if (empty($row['link_logo_src'])) $row['link_logo_src'] = 'images/links/no_logo88a.gif';
		if ($row['link_logo_src']) {
			$links_logo .= ('<a href="' . append_sid("links.$phpEx?action=go&link_id=" . $row['link_id']) . '" target="_blank" onMouseOver="document.all.logo_link.stop()" onMouseOut="document.all.logo_link.start()"><img src="' . $row['link_logo_src'] . '" title="' . $row['link_title'] . '" width="' . $site_logo_width . '" height="' . $site_logo_height . '" border="0" vspace="3" /></a>');
		}
	}

	if ($links_logo) {
		$links_logo = substr($links_logo, 0, -2);

		$template->assign_vars(array(
			'S_CONTENT_ENCODING' => $lang['ENCODING'],
			'T_BODY_BGCOLOR' => '#'.$theme['td_color1'],

			'DISPLAY_INTERVAL' => $display_interval,
			'DISPLAY_LOGO_NUM' => $display_logo_num,
			'LINKS_LOGO' => $links_logo
		));
	}
}
// - links

#
#-----[ OPEN ]-----
#
templates/subSilver/portal_body.tpl

#
#-----[ FIND ]-----
#
	  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
	   <tr>
		<td class="catHead" height="25"><span class="genmed"><b>Links</b></span></td>
	   </tr>
	   <tr>
		<td class="row1" align="center"><a href="http://smartor.is-root.com" target="_blank"><img src="images/smartorsite_logo.gif" width="88" height="31" alt="Smartor Site" border="0" vspace="3"></a></td>
	   </tr>
	  </table>

#
#-----[ REPLACE WITH ]-----
#
	  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
	   <tr>
		<td class="catHead" height="25"><span class="cattitle"><b><a href="links.php" title="{L_LINKS}" class="cattitle">{L_LINKS}</a></b></span></td>
	   </tr>
	   <tr align="center">
		<td class="row1"><span class="gensmall">
			<marquee id="logo_link" behavior="scroll" direction="up" width="88" height="200" scrolldelay="100" scrollamount="2">{LINKS_LOGO}</marquee>
		</span></td>
	   </tr>
	  </table>

#
#-----[ SAVE & CLOSE ]-----
#
--
原先 Smartor's ezPortal 的 Links 語法, 是將連結網站的圖示,
利用 HTML 語法, 一一寫入 portal_body.tpl 之中.

如果您的論壇, 已經安裝過 Advanced links mod 的話,
那麼將可以透過簡單的修改, 而以跑馬燈產生連結網站的圖示.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
主題已鎖定

回到「非官方認證外掛」