Page 1 of 1

Controling Global Annoncements?

Posted: Wed Feb 06, 2008 10:42 am
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

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 1:54 pm
by youssef93
Anybody please? Can you help?

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 2:00 pm
by Alterno
add me to the list!

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 2:23 pm
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.

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 2:40 pm
by Jim_UK
Moved to Mod Requests as it involves a modification of phpBB3 core files.

Jim

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 3:37 pm
by Alterno
Could anyone make a mod to allow this from the acp?...

Re: Controling Global Annoncements?

Posted: Wed Feb 06, 2008 9:47 pm
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

Re: Controling Global Annoncements?

Posted: Mon Dec 01, 2008 9:28 pm
by spacefish
Many thanks Brf, this is exactly what we needed! :)