1 頁 (共 1 頁)

PHPBB本版軟體說明

文章發表於 : 2008年 8月 15日, 20:51
super
phpBB 3.02 + RSS + WYSIWYG 編輯器

主程式 PHPBB 3.0.2
phpBB-3.0.2.zip
(2.38 MiB) 被下載 474 次
RSS 訂閱
phpbb3+Rss.rar
(70.43 KiB) 被下載 449 次
WYSIWYG 編輯器
phpbb3+EDIT.rar
(1.26 MiB) 被下載 457 次
合併
phpBB3.rar
(3.43 MiB) 被下載 493 次

解決 phpbb3 上傳的附加檔案, 若以中文開頭命名, 則無法正確顯示之問題

文章發表於 : 2008年 8月 27日, 03:09
super
修改以下文件
includes/functions.php -- 為了文章中正確顯示附件名
includes/functions_upload.php -- 為了上傳附件時往數據庫中添加正確的realname
includes/functions_posting.php -- 為了在發表過程中正確顯示附件名

修改後includes.zip
(33.06 KiB) 被下載 455 次

修改前includes.7z
(28.77 KiB) 被下載 467 次


#
#-----[ OPEN ]-----
#
includes/functions_content.php

#
#-----[ FIND ]-----
#
代碼: 選擇全部
'DOWNLOAD_NAME'      => basename($attachment['real_filename']),

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
'DOWNLOAD_NAME'      => mybasename($attachment['real_filename']),

#
#-----[ FIND ]-----
#
代碼: 選擇全部
    /**
    * Check if extension is allowed to be posted.

#
#-----[ BEFORE, ADD ]-----
#
代碼: 選擇全部
    function mybasename($path)
    {
    $paths = explode('/', $path);
    $temps = explode('\\', $paths[count($paths)-1]);
    $basename = $temps[count($temps)-1];
    return $basename;
    }



#
#-----[ OPEN ]-----
#
includes/functions_posting.php

#
#-----[ FIND ]-----
#
代碼: 選擇全部
$s_inline_attachment_options .= '<option value="' . $i . '">' . basename($attachment['real_filename']) . '</option>';

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$s_inline_attachment_options .= '<option value="' . $i . '">' . mybasename($attachment['real_filename']) . '</option>';

#
#-----[ FIND ]-----
#
代碼: 選擇全部
$attach_row['real_filename'] = basename($attach_row['real_filename']);

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$attach_row['real_filename'] = mybasename($attach_row['real_filename']);

#
#-----[ FIND ]-----
#
代碼: 選擇全部
'FILENAME'         => basename($attach_row['real_filename']),

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
'FILENAME'         => mybasename($attach_row['real_filename']),

#
#-----[ FIND ]-----
#
代碼: 選擇全部
'A_FILENAME'      => addslashes(basename($attach_row['real_filename'])),

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
'A_FILENAME'      => addslashes(mybasename($attach_row['real_filename'])),



#
#-----[ OPEN ]-----
#
includes/functions_upload.php

#
#-----[ FIND ]-----
#
代碼: 選擇全部
    /**
    * File Class
    * @access private

#
#-----[ BEFORE, ADD ]-----
#
代碼: 選擇全部
    function mybasename($path)
    {
    $paths = explode('/', $path);
    $temps = explode('\\', $paths[count($paths)-1]);
    $basename = $temps[count($temps)-1];
    return $basename;
    }


#
#-----[ FIND ]-----
#
代碼: 選擇全部
$name = trim(htmlspecialchars(basename($upload_ary['name'])));

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$name = trim(htmlspecialchars(mybasename($upload_ary['name'])));

#
#-----[ SAVE & CLOSE ]-----
#



--
資料來源:
http://www.phpbbchina.com/forum/viewtop ... f=5&t=1294

lightbox2

文章發表於 : 2008年 9月 8日, 03:46
super
http://www.huddletogether.com/projects/ ... /#download
http://www.phpbb.com/community/viewtopi ... 1c7512997d
http://www.phpbbchina.com/forum/viewtop ... =23&t=1565



copy lightbox to root/styles/prosilver/template/
#
#-----[ OPEN ]-----
#
styles/prosilver/template/attachment.html
#
#-----[ FIND ]-----
#
代碼: 選擇全部
<!-- IF _file.S_THUMBNAIL -->
.....
<a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a>

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
<a href="{_file.U_DOWNLOAD_LINK}" rel="lightbox[roadtrip]" title="{_file.COMMENT}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" ></a>


#
#-----[ OPEN ]-----
#
styles/prosilver/template/overall_header.html
#
#-----[ FIND ]-----
#
代碼: 選擇全部
<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>

#
#-----[ AFTER ADD ]-----
#
代碼: 選擇全部
<link rel="stylesheet" href="{T_TEMPLATE_PATH}/lightbox/css/lightbox.css" type="text/css" media="screen" />
<script src="{T_TEMPLATE_PATH}/lightbox/js/prototype.js" type="text/javascript"></script>
<script src="{T_TEMPLATE_PATH}/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="{T_TEMPLATE_PATH}/lightbox/js/lightbox.js" type="text/javascript"></script>

#
#-----[ OPEN ]-----
#
styles\prosilver\template\lightbox\css\lightbox.css
#
#-----[ FIND ]-----
#
代碼: 選擇全部
../images/

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
{T_THEME_PATH}/images/

#
#-----[ OPEN ]-----
#
includes/functions_content.php
#
#-----[ FIND ]-----
#
代碼: 選擇全部
$l_downloaded_viewed = 'VIEWED_COUNT';
$thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;t=1');
$download_link .= '&amp;mode=view';

#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$l_downloaded_viewed = 'VIEWED_COUNT';
$thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;t=1');
//$download_link .= '&amp;mode=view';


Re: PHPBB本版軟體說明

文章發表於 : 2008年 10月 12日, 15:10
super
phpbball3.0.2.zip
(5.07 MiB) 被下載 477 次

JSCookMenu_forumlist_mod_111.zip
(125.09 KiB) 被下載 422 次