Just wanted to add one more little bug, if it's already not related to others. I got the T_STRING error from my settings file when I put hard returns in the Announcement. When I edited the file, I found 2 lines of code for the announcement separated by ";". When I made it all one long string, all was fine with the world.
It is a good tool. I'll just be careful what I enter into it.
Thanks
iambigred, firstly thanks for this add-on.
I would like to use it for further explanation of specific discussion. Is it possible (or will it be possible) to display different announcement with different discussions like an intro text of some sort? This would explain newcomers what the discussion is about, serve them with text, URLs and file links.
Sometime in the future it would be mega-fantastic if announcement would have option to be always displayed above comments form. with this, users could read and consult on some predefined text, having it always in front of them.
Best
I just stumbled upon the solution to embedding links or a mailto in the announcement. Remove the single or double quotes you have around the url or email address.
I also ran into the Parse error: syntax error, unexpected T_STRING bug. It seems to happen whenever you try to put any line breaks into the announcement and then update the announcement again. The line breaks are written into conf/settings.php the first time it is saved, and then only the first line is replaced when the announcement is updated. You end up with extra lines of text that are not enclosed in quotes, and PHP cannot parse it.
One way of dealing with it would be to use PHP's nl2br() function to convert all of the newlines to <br /> tags. Or you could just strip out newlines. Or you could replace the entire value of $Configuration['ANNOUNCE_MESSAGE']. Or ...
it says HTML is allowed but when you add html the page goes blank,
i want to add an image in the announcement is this possible ? I would think since it says accept html
ok, I just added it to the annoucement css style and it worked, would be great if it could be setup like the notice annoucement with a remove link once they read it,
There's a major issue where if you use carriage returns it breaks settings.php. I've created a workaround that's simple enough - change the input field from a text area to a single line input.
Comments
ie member group 1 - annoucement 1
member group 2 - annoucement 2
I also ran into the Parse error: syntax error, unexpected T_STRING bug. It seems to happen whenever you try to put any line breaks into the announcement and then update the announcement again. The line breaks are written into conf/settings.php the first time it is saved, and then only the first line is replaced when the announcement is updated. You end up with extra lines of text that are not enclosed in quotes, and PHP cannot parse it.
One way of dealing with it would be to use PHP's nl2br() function to convert all of the newlines to <br /> tags. Or you could just strip out newlines. Or you could replace the entire value of $Configuration['ANNOUNCE_MESSAGE']. Or ...
Thanks again!
Find the textarea and replace it with
<input style="width:400px" type="text" name="ANNOUNCE_MESSAGE" id="txtMessage" value="' . $this->ConfigurationManager->GetSetting('ANNOUNCE_MESSAGE') . ' "/>