Global announcements listed as regular topics

Makes it posible to post Global announcements, viewble in all forums

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Global announcements listed as regular topics

Postby kajin on Wed 02. Nov, 2005 07:28

I installed the mod using easymod with no hitches, but when I selected "Global announcement" in the little check box and tried posting, it came up as a Regular Post. I treied editing it, but with no luck; it still came up as a regular post.

I am running phpBB version 2.0.18 (installed the mod after the upgrade)

Can someone please help me? :(
I've already searched this entire forum for the answer, with no luck.
kajin
Poster
Poster
 
Posts: 3
Joined: Wed 02. Nov, 2005 06:24

Re: Global announcements listed as regular topics

Postby Delta221 on Wed 02. Nov, 2005 18:31

kajin wrote:I installed the mod using easymod with no hitches, but when I selected "Global announcement" in the little check box and tried posting, it came up as a Regular Post. I treied editing it, but with no luck; it still came up as a regular post.

I am running phpBB version 2.0.18 (installed the mod after the upgrade)

Can someone please help me? :(
I've already searched this entire forum for the answer, with no luck.


it was working great with my 2.0.17, but after upgrading to 2.0.18
I have the same problem as you :-(
Delta221
Poster
Poster
 
Posts: 6
Joined: Wed 07. Sep, 2005 22:29
Location: Oslo

Postby kajin on Wed 02. Nov, 2005 20:53

Well, I went over to phpBB hacks forum and found this:

The Global Announcement problem will be caused by this change to posting.php. This will also break any hack that adds new topic types.
Code: Select all
##
##----------[ FIND ]-------------------------------------
##

$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;

##
##----------[ AFTER, ADD ]-------------------------------
##

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;


For Global Announcement, that line needs to be changed to:
Code: Select all
$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;

I tried it, and it seems to have done something. Now when I try to post a global announcement, instead of it being a normal post, it just dosn't show up a t all.
kajin
Poster
Poster
 
Posts: 3
Joined: Wed 02. Nov, 2005 06:24

Postby Delta221 on Wed 02. Nov, 2005 21:08

kajin wrote:Well, I went over to phpBB hacks forum and found this:

The Global Announcement problem will be caused by this change to posting.php. This will also break any hack that adds new topic types.
Code: Select all
##
##----------[ FIND ]-------------------------------------
##

$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;

##
##----------[ AFTER, ADD ]-------------------------------
##

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;


For Global Announcement, that line needs to be changed to:
Code: Select all
$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;

I tried it, and it seems to have done something. Now when I try to post a global announcement, instead of it being a normal post, it just dosn't show up a t all.


Thanks alot friend this did the trick, now everything i back to normal. :D
Delta221
Poster
Poster
 
Posts: 6
Joined: Wed 07. Sep, 2005 22:29
Location: Oslo

Postby kajin on Wed 02. Nov, 2005 22:33

Hrm. I wonder why mine still dosn't work. Can anyone help me?

EDIT:
Finally fixed it!
I had to go to Viewforum.php and replace this:
Code: Select all
$topic_rowset = array();
$total_announcements = 0;


with this:
Code: Select all
// 2 rows deleted - Global announcement MOD



Anyways, it seems to work fine now. Hope this info helped everyone out :wink:
kajin
Poster
Poster
 
Posts: 3
Joined: Wed 02. Nov, 2005 06:24

Postby kekforce on Wed 02. Nov, 2005 23:08

I just removed the WHOLE


Code: Select all
$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;



And it works just fine now!

I'll take the less security ;)
kekforce
Poster
Poster
 
Posts: 3
Joined: Mon 04. Jul, 2005 20:19

Postby Edd on Sat 03. Dec, 2005 17:24

Hey guys I had the same problem, tried all those but still isn't fixed!!!

Any more ideas?
Edd
Poster
Poster
 
Posts: 2
Joined: Sat 03. Dec, 2005 16:56


Return to Global announcement [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron