Page 71 of 163

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 3:44 am
by WheelGuy
baloo wrote:4. I noticed that if I selected announcements on, it puts the block there even if there is no announcement. Is it possible to have it not show the block if it doesn't have an announcement to make ?
I decided to "test a theory" and found a very simple solution for this. I currently use Announcement Centre 1.1.3 on my forum and show same text to all users. Anyway, in order not to show the box when no announcements. In your overall_header or wherever you have the box to show,
change

Code: Select all

<!-- INCLUDE announcement_centre.html -->
to

Code: Select all

<!-- IF ANNOUNCEMENT_ENABLE and ANNOUNCEMENT_TEXT -->
<!-- INCLUDE announcement_centre.html -->
<!-- ENDIF -->

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 4:33 am
by baloo
Thanks for that WheelGuy. I'll give it a shot tonight.

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 5:38 pm
by zkaraca
I have v0.3.0 of this mod installed and now i want to update it. I want to undo the edits (uninstall) for version 0.3.0 and install a clean new version. But i don't have the zip file for installing 0.3.0 anymore. Can i download this somewhere?

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 5:55 pm
by lefty74
why dont you upgrade to the latest version, the upgrade instructions are in the contrib folder.

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 8:35 pm
by zkaraca
Because it is not correct or i am missing something. Upgrade from 030 to 100. There are no sql instructions for this update and i get an error:

Code: Select all

SQL ERROR [ mysql4 ]

Unknown column 'announcement_text_bbcode_uid' in 'field list' [1054]
So, i use sql of latest version to add correct tables (even unused at this point maybe) but i get it to install.

Then i get:

Code: Select all

Unknown column 'announcement_enable_guests' in 'field list' [1054]
Also when i try 100 to 100b and it says to find this:

Code: Select all

	if ( !$config['announcement_show_index'] )
	{
		include_once($phpbb_root_path . 'includes/functions_announcements.' . $phpEx);
		get_announcement_data();
	}
in includes/functions.php but there is nothing like this in functions.php so i can't continue. I searched for keyword announcement to be sure and could not find the code above. So i want to undo all edits for 030 to do a clean install.

I am not sure now :? Maybe i have version 0.2.0? I can't check version nr anywhere?

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 9:24 pm
by lefty74
with regard to not finding the part in includes/functions.php, those are the correct upgrade instructions. i can only assume that when you have been upgrading your version of phpbb that bit was removed when merging code....

below is the old version:
v 0.3.0

hope that helps you more

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 9:57 pm
by zkaraca
That is possible indeed. I tried updating phpbb to latest version and tried merging but it didn't work because all of the mods i have installed. Now i will try to fix the issues. Thank you very much ;) This is one of my favourite mods. Real nice work.

Re: ACP Announcement Centre

Posted: Mon Jan 05, 2009 10:16 pm
by lefty74
you might as well go for version 1.1.3 then ;)

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 3:10 am
by baloo
WheelGuy wrote:I decided to "test a theory" and found a very simple solution for this. I currently use Announcement Centre 1.1.3 on my forum and show same text to all users. Anyway, in order not to show the box when no announcements. In your overall_header or wherever you have the box to show,
change

Code: Select all

<!-- INCLUDE announcement_centre.html -->
to

Code: Select all

<!-- IF ANNOUNCEMENT_ENABLE and ANNOUNCEMENT_TEXT -->
<!-- INCLUDE announcement_centre.html -->
<!-- ENDIF -->
Tried that out and it works as advertised. If the ACP is set to show announcement but there is no announcement it doesn't display anything.

BUT....

A couple of things it also disables. If there is a Birthday, it will only show if there is an announcement even though "Show Birthdays as announcement even if show site announcements is set to no:" is checked Yes.

Can't seem to show a guest message if there is no registered user message.

But like I said, your quick fix did do what was advertised so thanks for that.

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 3:32 am
by WheelGuy
Give me a couple days and I'll see what I can accomplish. I'm not a programmer, but just a "trial n error" kind of person.

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 11:21 am
by lefty74
[quote="baloo
Tried that out and it works as advertised. If the ACP is set to show announcement but there is no announcement it doesn't display anything.

BUT....

A couple of things it also disables. If there is a Birthday, it will only show if there is an announcement even though "Show Birthdays as announcement even if show site announcements is set to no:" is checked Yes.

Can't seem to show a guest message if there is no registered user message.

But like I said, your quick fix did do what was advertised so thanks for that.[/quote]
why dont you just install 1.1.3 and if there are no announcements to be shown, just turn it off and enable the option to still show birthdays.

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 12:00 pm
by baloo
I have 1.13 installed today. We discussed this before. Ideally I want all guests to see an announcement all the time which says the same thing for the most part, register to access all the forums. Members see messages when they are available. Birthdays all the time to members.

That's what I am trying to achieve but I don't think ACP as it is allows that flexibility. For now I am turning off the messages which means everything works as I want it for members, but I can't control what the guests see.

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 6:35 pm
by WheelGuy
baloo,
Since you upgraded to the newer version, I posted a reply here: http://www.phpbb.com/community/viewtopi ... 0#p8308615

Re: ACP Announcement Centre

Posted: Tue Jan 06, 2009 7:06 pm
by **Danny**
Thanks, this will be really helpful! :D

Re: ACP Announcement Centre

Posted: Wed Jan 07, 2009 12:50 pm
by Jody74
I need help please. When I make the changes to language/en/common.php I get this following error.
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3769: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3771: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3772: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3773: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
This is the change I'm making:
Open: language/en/common.php
Find
Tip: This may be a partial find and not the whole line.

Code: Select All
'AND' => 'And',

Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

Code: Select All
'ANNOUNCEMENT_TITLE_GUESTS' => 'Guest Announcements local',
'ANNOUNCEMENT_TITLE' => 'Site Announcements local',
Can someone help me with this?