[推薦外掛] Global announcement (全區公告) (Update 1.2.9)

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

版主: 版主管理群

主題已鎖定
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8445
註冊時間: 2004-04-30 01:54
來自: Taiwan

[推薦外掛] Global announcement (全區公告) (Update 1.2.9)

文章 心靈捕手 »

  • 前言
  • 檔頭說明
  • 修正參考
  • 效能提升
  • 外掛下載

前言:
記得本區曾有發表, 但是遍尋不著;
所以將網友相關的討論, 整理發表.


檔頭說明:

代碼: 選擇全部

############################################################## 
## MOD Title:          Global announcement 
## MOD Author:         Niels < ncr@db9.dk > (Niels Chr. R鷣) http://mods.db9.dk 
## MOD Description:    This mod, makes it posible to post global
##                     announcements viewable in all forums.
## MOD Version:        1.2.8
## MOD Compatibility:  2.0.6
## 
## Installation Level: Intermediate
## Installation Time:  15 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:      14
##      index.php
##      modcp.php
##      posting.php 
##      search.php 
##      viewforum.php 
##      admin/admin_forumauth.php 
##      admin/admin_ug_auth.php 
##      includes/auth.php
##      includes/constants.php 
##      includes/functions.php
##      language/lang_english/lang_admin.php 
##      language/lang_english/lang_main.php 
##      templates/subSilver/subSilver.cfg 
##      templates/subSilver/viewforum_body.tpl
##
## Included Files:     3
##      global_announcement_db_update.php
##      root/templates/subSilver/images/folder_global_announce.gif
##      root/templates/subSilver/images/folder_global_announce_new.gif
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
## 1. Full MOD description
## -----------
## This mod, makes it posible to post global announcements
## viewable in all forums, it suppport auth level, witch means
## you can define in forum permissions, who have right to post
## global announcements, note though that if you have given
## this rights in one forum, then it gives no meaning to restrict
## it to the same user(s) in another forum - the post is global
## Note also that once a global announcement is posted, the
## permission on the topic, will be the same as that forum
## where it is initially posted, this is useful if you wan to
## restrict your users from replying - solution is to post the
## global announcement inside a forum where the users can not
## reply, the subject of the global announcement will though
## always be visible, even though the user have no rigths , it
## is first when they try to view the topic, that the permission
## in the original forum takes over.
## There is a known isue this this mod, a global announcement
## will still "belong" to the forum where it original was posted,
## this means that if a user reply to sutch a post, then they will
## be redirected to that forum, nothing to do about that, also
## when using search, it will be displayed "as" in the original
## posted forum.
## If you wish to assign special rigths to the global announcement,
## then you may costumice the constants.php , change the value of
## HIDDEN_CAT witch a category id,. This category is hidden to all
## except ADMIN inside this category, make a forum with a empty
## name, and post the global announcement here that way preventing
## the users to se the forum, where the global announcement is posted
## make this forum "view_auth" ALL and "read_auth" ALL, all
## other settings are up to you (in current version of phpbb2,
## you can't create a forum without a name, but you can
## change/delete the name after it is created ! )
##
## 2. EasyMOD
## -----------
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## However, on alpha releases of EM and meanwhile beta or 
## final release some actions are NOT performed.
## You'll have to do them manually !
##
## 2.1 SQL commands are not performed
## -----------
## This MOD need a database update.
## Then, in any case if you install this MOD manually or using
## an alpha release of EM, please copying the *_db_update.php
## in your phpBB root directory, run it with your navigator,
## and then delete it from the phpBB root directory.
##
## Please, do it NOW! Before editing phpBB files by EM or manually!!!
## Otherwise, you may have an error message during your next
## connection.
##
## 2.2 Translation are not managed
## -----------
## Moreover, EM can not already manage actions for any other
## language than English (but language intructions are proceed
## to all installed languages in order to prevent errors).
## So the translations provided with this MOD must be installed
## manually if you need them.
##
## 3. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.db9.dk/viewtopic.php?t=17
##
############################################################## 
## MOD History: 
## 
##   2003-12-13 - Version 1.2.8
##      - phpBB template & EasyMOD compliance enhancement
##      - Chinese Traditional Taiwan, Dutch, Estonian, French,
##        German, Hungarian, Icelandic, Italian, Lithuanian
##        Polish & Spanish translations now provide with the MOD
ps.
1. 這個外掛, 可以讓使用者發表的文章, 張貼在每一個版面, 也就是[全區公告](系統管理員可以控制使用者的權限).
2. 升級至 1.2.8 後已加入中文化( big-5)


修正參考:
若是您使用 phpbb 2.0.18 以上版本安裝, 則必須做此修正!
#
#-----[ OPEN ]-----
#
posting.php

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

代碼: 選擇全部

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;
#
#-----[ REPLACE WITH ]-----
#

代碼: 選擇全部

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE )) ) ? $topic_type : POST_NORMAL;
Source: -by- doracity
http://phpbb-tw.net/phpbb/viewtopic.php?p=215847#215847


效能提升: -by- ETERNAL
http://phpbb-tw.net/phpbb/viewtopic.php?p=211452#211452


外掛下載:
http://mods.db9.dk/viewtopic.php?t=17
http://www.phpbbhacks.com/download/345
最後由 心靈捕手 於 2006-06-27 09:54 編輯,總共編輯了 1 次。
施比受有福,歡迎來信賜教,謝謝 & 再見!
祝福您 好運 ^_^
歡迎加入★★心靈捕手★★ :: 討論區!!
http://wang5555.hopto.org/phpBB3/
p.s. 奉老婆之命:在晚上十一點前,得關機睡覺!!!
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8445
註冊時間: 2004-04-30 01:54
來自: Taiwan

[轉貼] 簡易子版面的因應

文章 心靈捕手 »

本文原作者: 御津闇慈
Source: http://phpbb-tw.net/phpbb/viewtopic.php?p=188499#188499


前言:
若您之前有安裝" 簡易子版面" 的話,
則當您在安裝" 全區公告" 時, functions.php 會遇到麻煩.

以下的修改, 提供您參考:
#
#-----[ OPEN ]-----
#
includes/functions.php

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

代碼: 選擇全部

$sql="select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order  ";  
#
#-----[ REPLACE WITH ]-----
#

代碼: 選擇全部

$sql="select cat_id,cat_title 
   from ".CATEGORIES_TABLE." 
   ".(($userdata['user_level'] == ADMIN)? "" : " WHERE cat_id<>'".HIDDEN_CAT."'" )." 
   order by cat_order "; 
#
#-----[ FIND ]-----
#

代碼: 選擇全部

$sql = "SELECT cat_id,forum_id,forum_name,sort_sub,forum_sub,auth_view from ".FORUMS_TABLE."  ORDER BY cat_id,forum_order"; 
#
#-----[ REPLACE WITH ]-----
#

代碼: 選擇全部

$sql = "SELECT cat_id,forum_id,forum_name,sort_sub,forum_sub,auth_view 
   from ".FORUMS_TABLE." 
   ".(($userdata['user_level'] == ADMIN)? "" : " WHERE cat_id<>'".HIDDEN_CAT."'" )." 
   ORDER BY cat_id,forum_order"; 
#
#-----[ SAVE & CLOSE ]-----\r
#
#EoM
施比受有福,歡迎來信賜教,謝謝 & 再見!
祝福您 好運 ^_^
歡迎加入★★心靈捕手★★ :: 討論區!!
http://wang5555.hopto.org/phpBB3/
p.s. 奉老婆之命:在晚上十一點前,得關機睡覺!!!
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8445
註冊時間: 2004-04-30 01:54
來自: Taiwan

[建議] 安裝最新 1.2.9 版

文章 心靈捕手 »

代碼: 選擇全部

## MOD History: 
## 
##   2006-04-17 - Version 1.2.9
##      - Added 2.0.18+ fix
##      - Removed updatefile and added normal SQL instructions
#       - EasyMod templatefixes
##
補充說明:
1. 相容升級 phpBB 2.0.18 後的修正.
2. 移除資料庫更新檔, 新增 SQL 指令於安裝說明中.
3. 修正 EasyMod.

ps.
已經安裝 1.2.8 版者, 不必升級.
施比受有福,歡迎來信賜教,謝謝 & 再見!
祝福您 好運 ^_^
歡迎加入★★心靈捕手★★ :: 討論區!!
http://wang5555.hopto.org/phpBB3/
p.s. 奉老婆之命:在晚上十一點前,得關機睡覺!!!
主題已鎖定

回到「非官方認證外掛」