PHPBB本版軟體說明
phpBB 3.02 + RSS + WYSIWYG 編輯器
| 主程式 PHPBB 3.0.2 | |
| RSS 訂閱 | |
| WYSIWYG 編輯器 | |
| 合併 |
| 主程式 PHPBB 3.0.2 | |
| RSS 訂閱 | |
| WYSIWYG 編輯器 | |
| 合併 |
includes/functions.php -- 為了文章中正確顯示附件名
includes/functions_upload.php -- 為了上傳附件時往數據庫中添加正確的realname
includes/functions_posting.php -- 為了在發表過程中正確顯示附件名
#
#-----[ 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 ]-----
#
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'] . '&t=1');
$download_link .= '&mode=view';
#
#-----[ REPLACE WITH ]-----
#
- 代碼: 選擇全部
$l_downloaded_viewed = 'VIEWED_COUNT';
$thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1');
//$download_link .= '&mode=view';