[風格][推薦] Mozilla_Firefox

Officially Approved Styles
推薦您喜歡的官方認證風格吧!享受多樣化的 phpBB 。

版主: 版主管理群譯文組

版面規則
請注意!只有發表在 [2.0.x] Styles Database Releases 的風格,才算是官方認證的風格。
不過,歡迎您製作中文化按鈕圖檔分享!
CRLin
星球公民
星球公民
文章: 147
註冊時間: 2002-11-13 08:36
聯繫:

文章 CRLin »

slipper 寫: 可以請CRLin大大
說明一下
Blocks for BCP
這是做啥用的呢??
...
非常感謝您的測試, 是我個人不小心的錯誤, 造成右邊區塊無法顯示! 請重新下載, 覆蓋 bpanel_header.php 及 bpanel_tail.php 兩個檔案即可.

Blocks for BCP 如同 Blocks for linkdb ( http://web.dhjh.tcc.edu.tw/~gzqbyr/Hest ... c.php?t=13 ) 及 Smartor 的 Blocks for ezPortal ( http://smartor.is-root.com/viewtopic.php?t=1860 )
CRLin的簽名檔:
My phpBB3 - http://web.dhjh.tc.edu.tw/~gzqbyr/phpBB
My FluxBB - http://web.dhjh.tc.edu.tw/~gzqbyr/fluxbb (快速、輕巧、方便使用的論壇程式)
slipper
星球公民
星球公民
文章: 75
註冊時間: 2003-02-03 04:28
來自: 台南市

文章 slipper »

再請教CRLin大大一下:


在Block Control Panel的個人資訊區塊裡

可以自行增加
如:
會員名稱
等級
等級圖示
發表文章數....嗎???

可以教我一下如何增加呢??
試好久一直試不出來

謝謝~~~
verykinkin
星球普通子民
星球普通子民
文章: 3
註冊時間: 2004-06-01 12:19

文章 verykinkin »

請教CRLin大大

小弟安裝了 這個style , 真的很美, 很喜愛呀, 謝謝.

但在家中的pc 運行時, 卻預到了小問題.

在每 load 個版面時, index.php 內有一句

都會發生錯誤 unterminated string constant

我發現在下面一句發生.

<body onload="RIcutwords();">

我在家中電腦是用win xp sp1.

但在使用 win 2000, win xp sp2 的電腦上運行, 卻沒有此問題發生. 想問大大如何解決.

:oops: :oops: 謝謝.
CRLin
星球公民
星球公民
文章: 147
註冊時間: 2002-11-13 08:36
聯繫:

文章 CRLin »

slipper 寫:再請教CRLin大大一下:


在Block Control Panel的個人資訊區塊裡

可以自行增加
如:
會員名稱
等級
等級圖示
發表文章數....嗎???

可以教我一下如何增加呢??
試好久一直試不出來

謝謝~~~
因為這是竹貓的風格討論, 不是模組探討. 發表模組研究, 不吻合也不恰當.
請至 http://web.dhjh.tcc.edu.tw/~gzqbyr/phpB ... ?p=584#584 發表, 謝謝!!
本篇是 CRLin 針對 Block Control Panel 模組於此發表的最後一篇. (本文花了將近 3 hr 又 30 min 才完成)

以下說明增加 會員名稱, 等級圖示 的作法.(使用 EditPlus 開啟及編輯檔案是最佳的 PHP 程式編輯軟體之一)

會員名稱 可於 bpanel_header.tpl 找到 L_LOGIN_LOGOUT
於 page_header.php 找到以下三行
'L_LOGIN_LOGOUT' => $l_login_logout,

$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';

$l_login_logout = $lang['Login'];

因此 會員名稱 就是 $userdata['username']

打開 blockpanel\block\system_user.php
尋找\r

代碼: 選擇全部

$bcp_content =	"<div align="center"><br />" . $avatar_bcp_img ."<br><br>";
之後加入

代碼: 選擇全部

$bcp_content .= '歡迎&nbsp;' . $userdata['username'] . '<br>';
等級圖示及發表文章數的處理
方法一.( 難!)
瀏覽文章時網址列是 viewtopic.php, 因此開啟 viewtopic.php, 找到可能使用的 3 個 tpl 檔 viewtopic_body.tpl, viewtopic_poll_result.tpl 及 viewtopic_poll_ballot.tpl. 當然是觀察 viewtopic_body.tpl 檔
因此開啟 viewtopic_body.tpl
等級的英文是 RANK, 而圖示 IMAGE
找到 postrow.POSTER_RANK 及 postrow.RANK_IMAGE
於 viewtopic.php
找到\r
'POSTER_RANK' => $poster_rank,
而與 $poster_rank 有關的程式碼蠻冗長.

方法二. ( 難!)
檢視 會員 的個人資料時網址列是 profile.php?mode=viewprofile&u=2
開啟 profile.php
發現程式碼\r
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
再開啟 includes/usercp_viewprofile.php 及 subSilver/profile_view_body.tpl

看了 usercp_viewprofile.php 的程式碼後, 頭皮發麻! 如果您想繼續研究, usercp_viewprofile.php 比 viewtopic.php 更適合.
程式碼須自己改寫, 才可適用.

以下是 CRLin 修改過的程式, 仍然使用 blockpanel\block\system_user.php
於\r
$bcp_content .= '歡迎&nbsp;' . $userdata['username'] . '<br>';
之後加入\r

代碼: 選擇全部

$profiledata1 = get_userdata($userdata['user_id']);

	$sql = "SELECT *
		FROM " . RANKS_TABLE . "
		ORDER BY rank_special, rank_min";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
	}
	
	$ranksrow1 = array();
	while ( $row = $db->sql_fetchrow($result) )
	{
		$ranksrow1[] = $row;
	}
	$db->sql_freeresult($result);
	
	$poster_rank1 = '';
	$rank_image1 = '';
	if ( $profiledata1['user_rank'] )
	{
		for($i = 0; $i < count($ranksrow1); $i++)
		{
			if ( $profiledata1['user_rank'] == $ranksrow1[$i]['rank_id'] && $ranksrow1[$i]['rank_special'] )
			{
				$poster_rank1 = $ranksrow1[$i]['rank_title'];
				$rank_image1 = ( $ranksrow1[$i]['rank_image'] ) ? '<img src="' . $ranksrow1[$i]['rank_image'] . '" alt="' . $poster_rank1 . '" title="' . $poster_rank1 . '" border="0" /><br />' : '';
			}
		}
	}
	else
	{
		for($i = 0; $i < count($ranksrow1); $i++)\r
		{
			if ( $profiledata1['user_posts'] >= $ranksrow1[$i]['rank_min'] && !$ranksrow1[$i]['rank_special'] )
			{
				$poster_rank1 = $ranksrow1[$i]['rank_title'];
				$rank_image1 = ( $ranksrow1[$i]['rank_image'] ) ? '<img src="' . $ranksrow1[$i]['rank_image'] . '" alt="' . $poster_rank1 . '" title="' . $poster_rank1 . '" border="0" /><br />' : '';
			}
		}
	}
	$bcp_content .= $poster_rank1 . '<br>' . $rank_image1 . '<br>';
	$bcp_content .= $lang['Total_posts'] . ': ' . $profiledata1['user_posts'] . '<br>';
	if (function_exists('get_html_translation_table'))
	{
		$u_search_author1 = urlencode(strtr($profiledata1['username'], array_flip(get_html_translation_table(HTML_ENTITIES))));
	}
	else
	{
		$u_search_author1 = urlencode(str_replace(array('&', '', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata1['username']));
	}
	$tmp = append_sid("search.$phpEx?search_author=" . $u_search_author1);
	$bcp_content .= '<a href=' . $tmp . ' class="genmed">'.sprintf($lang['Search_user_posts'], $profiledata1['username']) . '</a><br>';
存檔
最後由 CRLin 於 2005-11-17 11:29 編輯,總共編輯了 1 次。
CRLin的簽名檔:
My phpBB3 - http://web.dhjh.tc.edu.tw/~gzqbyr/phpBB
My FluxBB - http://web.dhjh.tc.edu.tw/~gzqbyr/fluxbb (快速、輕巧、方便使用的論壇程式)
slipper
星球公民
星球公民
文章: 75
註冊時間: 2003-02-03 04:28
來自: 台南市

文章 slipper »

這段有點小問題

代碼: 選擇全部

   else
   { 
      $u_search_author1 = urlencode(str_replace(array('&', ''', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata1['username']));
   }
我已經移到CRLin的討論區發表了
到哪裡討論吧...
CRLin
星球公民
星球公民
文章: 147
註冊時間: 2002-11-13 08:36
聯繫:

文章 CRLin »

slipper 寫:這段有點小問題

代碼: 選擇全部

   else
   { 
      $u_search_author1 = urlencode(str_replace(array('&', ''', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata1['username']));
   }
我已經移到CRLin的討論區發表了
到哪裡討論吧...
謝謝!!已訂正.
原來是貼上 phpBB-2.0.18 的 usercp_viewprofile.php 程式碼會出錯.
就錯在你所指出的這段, 我以 phpBB-2.0.17 替代. 請重新貼上我上一篇的文章程式碼.
CRLin的簽名檔:
My phpBB3 - http://web.dhjh.tc.edu.tw/~gzqbyr/phpBB
My FluxBB - http://web.dhjh.tc.edu.tw/~gzqbyr/fluxbb (快速、輕巧、方便使用的論壇程式)
slipper
星球公民
星球公民
文章: 75
註冊時間: 2003-02-03 04:28
來自: 台南市

文章 slipper »

To:CRlin

現在整個執行上的沒問題了
謝謝~~~

貼上完成圖
圖檔


這是我依樣畫葫蘆修改的
圖檔


我修改後的
整段的system_user.php

代碼: 選擇全部

<?
/***************************************************************************
*                             system_user.php
*                           -------------------
*   begin                : Friday, Jan 3, 2003
*   copyright            : (C) CRLin
*   url                  : http://web.dhjh.tcc.edu.tw/~gzqbyr/Hestia/
*
****************************************************************************/

/***************************************************************************
*	WARNING: This script free for non-commercial uses.
****************************************************************************/

/***************************************************************************
*	You may not change or alter any portion of this comment or credits
*	of supporting developers from this source code or any supporting
*	source code which is considered copyrighted (c) material of the
*	original comment or credit authors.
****************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

if( $userdata['session_logged_in'] )
{
	//
	// Avatar On Index MOD
	//
	$avatar_bcp_img = '';
	if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
	{
		switch( $userdata['user_avatar_type'] )
		{
			case USER_AVATAR_UPLOAD:
				$avatar_bcp_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_REMOTE:
				$avatar_bcp_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_GALLERY:
				$avatar_bcp_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
				break;
		}
	}
	
	
   $profiledata1 = get_userdata($userdata['user_id']);
   $sql = "SELECT *
   FROM " . RANKS_TABLE . "
   ORDER BY rank_special, rank_min"; 
   if ( !($result = $db->sql_query($sql)) ) 
   { 
      message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql); 
   } 

   $ranksrow1 = array(); 
   while ( $row = $db->sql_fetchrow($result) ) 
   { 
      $ranksrow1[] = $row; 
   } 
   $db->sql_freeresult($result); 

   $poster_rank1 = ''; 
   $rank_image1 = ''; 
   if ( $profiledata1['user_rank'] ) 
   { 
      for($i = 0; $i < count($ranksrow1); $i++) 
      { 
         if ( $profiledata1['user_rank'] == $ranksrow1[$i]['rank_id'] && $ranksrow1[$i]['rank_special'] ) 
         { 
            $poster_rank1 = $ranksrow1[$i]['rank_title']; 
            $rank_image1 = ( $ranksrow1[$i]['rank_image'] ) ? '<img src="' . $ranksrow1[$i]['rank_image'] . '" alt="' . $poster_rank1 . '" title="' . $poster_rank1 . '" border="0" /><br />' : ''; 
         } 
      } 
   } 
   else 
   { 
      for($i = 0; $i < count($ranksrow1); $i++) 
      { 
         if ( $profiledata1['user_posts'] >= $ranksrow1[$i]['rank_min'] && !$ranksrow1[$i]['rank_special'] ) 
         { 
            $poster_rank1 = $ranksrow1[$i]['rank_title']; 
            $rank_image1 = ( $ranksrow1[$i]['rank_image'] ) ? '<img src="' . $ranksrow1[$i]['rank_image'] . '" alt="' . $poster_rank1 . '" title="' . $poster_rank1 . '" border="0" /><br />' : '';
         } 
      } 
   }
	

   if (function_exists('get_html_translation_table'))
   {
      $u_search_author1 = urlencode(strtr($profiledata1['username'], array_flip(get_html_translation_table(HTML_ENTITIES))));
   }
   else
   { 
      $u_search_author1 = urlencode(str_replace(array('&', '', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata1['username']));
   }
   $tmp = append_sid("search.$phpEx?search_author=" . $u_search_author1);
   $regdate = create_date($lang['DATE_FORMAT'], $profiledata1['user_regdate'], $board_config['board_timezone']);
	



	//
	// END: Avatar On Index MOD
	//

        
	$bcp_content .= '<center><span style="filter: glow(color=blue,strength=3); height:13px; color:white; padding:3px; font-size : 13px"><b>' . $userdata['username'] .'</b></span><br>';
        $bcp_content .= '<span class="postdetails">' . $poster_rank1 . '<br>' . $rank_image1 . '<br>';
        $bcp_content .= $avatar_bcp_img .'</span></center><br>';
        $bcp_content .= '<left><span class="postdetails">'.$lang['Joined'] . ': ' . $regdate . '<br>';
        $bcp_content .= $lang['Total_posts'] . ': ' . $profiledata1['user_posts'] . '</span><br><hr>';
        $bcp_content .= '<center><a href="'.$u_login_logout.'" '.$BCP_CLASS.'>' . $lang['Logout'] . '</a><br>';
	$bcp_content .= '<a href="' . append_sid("profile.$phpEx?mode=editprofile&" . $userdata['user_id']) . '" '.$BCP_CLASS.'>' . $lang['Profile'] . '</a><br>';
	$bcp_content .= '<a href="' . append_sid('privmsg.'.$phpEx.'?folder=inbox') . '" '.$BCP_CLASS.'>' . $l_privmsgs_text . '</a></center>';


}

?>
主題已鎖定

回到「官方認證風格」