[外掛] 增添一個新欄位在發表文章的頁面

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

版主: 版主管理群

主題已鎖定
Mac
百戰天龍馬蓋先
百戰天龍馬蓋先
文章: 2590
註冊時間: 2003-02-02 02:28
來自: MacphpBBMOD
聯繫:

[外掛] 增添一個新欄位在發表文章的頁面

文章 Mac »

下載: http://www.phpbbhacks.com/viewhack.php?id=1366

代碼: 選擇全部

################################################################################### 
## 
## Hack Title:    Add a new field to posting part 增添一個新欄位在發表文章的頁面\r
## Hack Version:  1.0.1 (phpBB 2.0.4 or lower)
## Author:     Acid
## 中文化:     Mac < ycl_6@sinamail.com >
## Support:	  http://www.phpbbhacks.com/forums/
##
## Description:   An example how you can add a new field to the posting part...
##		  ..it will be displayed above the post (post view) and below
##		  topic title (topic view).
## 在發表文章時增加主題描述(或任何你想要的用途)
## 增添的訊息將顯示在 viewtopic.php & viewforum.php
##
## Files to edit:        9
##                        language/lang_english/lang_main.php
##                        includes/functions_post.php
##                        includes/topicreview.php
##                        posting.php
##                        viewtopic.php
##                        viewforum.php
##                        templates/xxx/posting_body.tpl
##                        templates/xxx/posting_preview.tpl
##                        templates/xxx/posting_topicreview.tpl
##                        templates/xxx/viewtopic_body.tpl
##                        templates/xxx/viewforum_body.tpl
## 
################################################################################### 
## 
## Installation/Author Notes: 
## First always make a backup from the files/database that you're going to edit. 
## \r
## This hack adds new new fields to your database. 
##
## If you want to add another fields to the posting part, just duplicate the
## following actions and rename the label (but be aware of the spelling like 'extra',
## 'post_extra' or 'EXTRA' etc.)
##
################################################################################### 
## Versions:
##
## 1.0.1 - fixed some language/template bugs
## 1.0   - Release
################################################################################### 

## SQL QUERY:  (You may have to change your database prefix)

ALTER TABLE test_topics ADD topic_extra CHAR(60) NOT NULL AFTER topic_title;
ALTER TABLE test_posts_text ADD post_extra VARCHAR(60) DEFAULT NULL AFTER post_subject; 

## alternate you can use table_update.php to alter the database
## automatically (just upload and run the file)

###################################################################################
lang_main.php
[php]<?php

$lang['Extra'] = '額外資訊';
$lang['Empty_extra'] = '沒有填入額外訊息?';
$lang['Post_extra'] = '額外資訊:';

?>[/php]

修正(http://www.phpbbhacks.com/forums/viewtopic.php?t=10193
posting.php

代碼: 選擇全部

尋找: 
      $extra = $post_info['topic_extra']; 

換成: 
      $extra = $post_info['post_extra'];
~Mac
+ 關於 phpBB 使用問題請在版面發問,私人訊息提供其他不相干或是隱私的事情聯絡之用。

phpBB 官網 | 竹貓星球 | MacphpBBMOD | 我的服務
主題已鎖定

回到「非官方認證外掛」