1 頁 (共 1 頁)

[問題]想尋找一個類似這樣的個人頭像外掛

發表於 : 2006-01-07 03:22
依夢兒
就像這樣:http://www.lunarforums.com/forum/index. ... ic=30283.0
頭像太大時,會自動出現捲軸 bar 不讓頭像將版面撐開而破壞版面。

上面的範例是 SMF 論壇,不是 phpBB ,不過原理好像是透過 Java Script 達成的,所以我想 phpBB 也作得到。
我記得以前在哪裡有看到 phpBB 也有類似的外掛,可是現在找不到了。
如果有人知道這支外掛叫作什麼名字,或是在哪裡可以下載,煩請告知,謝謝。

發表於 : 2006-01-07 10:33
心靈捕手
剛剛搜尋了一下, 並未發現有相關外掛;
但是, 我猜想: 它應該只是在頭像的部份, 包一個 div 而已.

以下的修改, 提供您參考:
#
#-----[ OPEN ]-----
#
templates/YOUR_THEME/viewtopic_body.tpl

#
#-----[ FIND ]-----
#

代碼: 選擇全部

{postrow.POSTER_AVATAR}
#
#-----[ REPLACE WITH ]-----
# ps. 請自行調整 寬, 高 的像素

代碼: 選擇全部

<div style="overflow:auto; width:100px; height:100px;">{postrow.POSTER_AVATAR}</div>
#
#-----[ SAVE & CLOSE ]-----
#
#EoM

發表於 : 2006-01-07 10:46
Mac
該網站的原始碼\r

代碼: 選擇全部

<div style="overflow: auto; width: 100%;"><img src="http://topspotz.com/ames.gif" alt="" border="0" /></div><br />
~Mac

發表於 : 2006-01-07 11:40
御津闇慈
Mac 寫:該網站的原始碼\r

代碼: 選擇全部

<div style="overflow: auto; width: 100%;"><img src="http://topspotz.com/ames.gif" alt="" border="0" /></div><br />
~Mac
其實他DIV那邊好像用有程式碼控制\r
晚點在搞搞看

打開viewtopic.php

尋找\r

代碼: 選擇全部

	//
	// Again this will be handled by the templating
	// code at some point
	//
上方加入\r

代碼: 選擇全部

	$c_width = $board_config['avatar_max_width'];
	$c_height = $board_config['avatar_max_height'];
尋找\r

代碼: 選擇全部

'POSTER_AVATAR' => $poster_avatar,
替換成

代碼: 選擇全部

'POSTER_AVATAR' => '<div style="overflow:auto; width:'.$c_width.'px; height:'.$c_height.'px;">' . $poster_avatar.'</div>',
大概就這樣吧...
個人資料或者會員管理請自己弄看看

發表於 : 2006-01-07 23:42
依夢兒
謝謝各位的指導,成功了。 :-P