Controling Global Annoncements?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
User avatar
youssef93
Registered User
Posts: 45
Joined: Sat Dec 08, 2007 7:06 pm

Controling Global Annoncements?

Post by youssef93 »

Hello,
Using the global annoncement feature posts an announcement in all the forums.
My question is: I have 5 forums (on the same board of course) and I want the global announcement to be posted on only 4 forums and not the fifth. It would be hard and boring if I just kept posting the same announcement in each and every forum and then left the fifth one. So I just want to post a global announcement in all the forums except one. Is there a way to do that?

My second question is: I still cannot customize the header of my forum : put the logo..etc. So I would be grateful if you can help me on that too.

Thank you very much for your continous support and co-opertaion.
Best regards,
Youssef - PHPBB3 user
User avatar
youssef93
Registered User
Posts: 45
Joined: Sat Dec 08, 2007 7:06 pm

Re: Controling Global Annoncements?

Post by youssef93 »

Anybody please? Can you help?
Alterno
Registered User
Posts: 218
Joined: Thu Apr 19, 2007 8:25 pm

Re: Controling Global Annoncements?

Post by Alterno »

add me to the list!
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52228
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Controling Global Annoncements?

Post by Brf »

Try this:

In viewforum.php look for:

Code: Select all

	// Obtain announcements ... removed sort ordering, sort by time in all cases
	$sql = $db->sql_build_query('SELECT', array(
		'SELECT'	=> $sql_array['SELECT'],
		'FROM'		=> $sql_array['FROM'],
		'LEFT_JOIN'	=> $sql_array['LEFT_JOIN'],
	
		'WHERE'		=> 't.forum_id IN (' . $forum_id . ', 0)
			AND t.topic_type IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ')',

		'ORDER_BY'	=> 't.topic_time DESC',
	));
replace with:

Code: Select all

	// Obtain announcements ... removed sort ordering, sort by time in all cases
	if ($forum_id == 69)
	{
		$global_sql = 't.forum_id =' . $forum_id . ' 
			AND t.topic_type = ' . POST_ANNOUNCE ;
	}
	else
	{
		$global_sql = 't.forum_id IN (' . $forum_id . ', 0)
			AND t.topic_type IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ')';
	}
	$sql = $db->sql_build_query('SELECT', array(
		'SELECT'	=> $sql_array['SELECT'],
		'FROM'		=> $sql_array['FROM'],
		'LEFT_JOIN'	=> $sql_array['LEFT_JOIN'],
	
		'WHERE'		=> $global_sql,

		'ORDER_BY'	=> 't.topic_time DESC',
	));
Where "69" is the forum_id where you do not want to see global announcements.
User avatar
Jim_UK
Former Team Member
Posts: 18479
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: Controling Global Annoncements?

Post by Jim_UK »

Moved to Mod Requests as it involves a modification of phpBB3 core files.

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!
Alterno
Registered User
Posts: 218
Joined: Thu Apr 19, 2007 8:25 pm

Re: Controling Global Annoncements?

Post by Alterno »

Could anyone make a mod to allow this from the acp?...
mjp_swe
Registered User
Posts: 18
Joined: Sat Mar 10, 2007 9:49 am

Re: Controling Global Annoncements?

Post by mjp_swe »

Would be great also if when you make a global ann. you can choose which forums it should be posted in. Because some time you want it poseted in forum 1,2,3 & 4 next time forum 1,3 & 4
User avatar
spacefish
Registered User
Posts: 173
Joined: Mon Oct 09, 2006 8:48 am

Re: Controling Global Annoncements?

Post by spacefish »

Many thanks Brf, this is exactly what we needed! :)
Locked

Return to “[3.0.x] MOD Requests”