News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

Global Announcements

Started by JayBachatero, August 15, 2006, 02:39:18 PM

Previous topic - Next topic

JayBachatero

Link to Mod
Rate this Mod

Features
+ Log Who's Online Actions.
+ BBC and Smileys.
+ Status indicator to admin page to indicated if mod is disabled or not.
+ Ability to quick enable/disable Global Announcement.
+ Ability to send a newsletter for Global Announcement.
+ Added spellcheck support.
+ Added support for Admin Modification Menu Section mod.
+ Setting to set the default order.
+ UTF-8 support
+ Print support
+ Preview the announcement before it's made.

Legend
! Bug fixes
+ Feature addition

Changelog
Version 1.0
! Fixed bug with preview leaving Subject and boards behind. (GlobalAnnouncements.php, GlobalAnnouncements.template.php)
! Fixed bug with $settings var being overwritten and causing the install to give a white page. (ga_install.php)

Version 0.4
! Cleaned up query on MessageIndex to work with the new sorting method. (install.xml)
+ Added the ability to preview the Global Announcement before you submit it. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php, language entries)
+ Added credits page (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php, language entries)

Version 0.3
! $modSettings and $settings variables were not in the global scope causing spellcheck support to be disabled. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
! Hidden form for spellcheck was missing (GlobalAnnouncementsAdmin.template.php)
! If the id of the GA entered is not valid output an error. (GlobalAnnouncements.php)
! Make sure that the number of vies is actually counted and not replaced by 1 (GlobalAnnouncements.pgp)
+ Added a new settings page (GlobalAnnouncementsAdmin.php, GlobalAnnouncements.template.php)
+ Added language entries for changes above.
+ UTF-8 support has been added. (GlobalAnnouncementsAdmin.php)
+ Added print page. (GlobalAnnouncements.php, GlobalAnnouncements.template.php)
+ Added setting to set the default order (This is for the default order for entries that do not have an order) (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added support for Admin Modification Menu Section mod.  (install.xml - Subs.php)
! Fixed issue with the ALTER TABLE query. (install.php)
! Added missing apostrophe for query. (GlobalAnnouncementsAdmin.php)
! Fixed undefined index: admin_areas_other error. (install.xml - Subs.php)

Version 0.2
+ Added entries for Who's Online. (Who.php, Modifications.english.php)
+ Added BBC and Smileys to template. (Subs-GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php, GlobalAnnouncementsAdmin.php)
+ Added status indicator to admin page to indicated if mod is disabled or not. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added ability to quick enable/disable Global Announcement. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added ability to send a newsletter for Global Announcement. (ManageNews.php, GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added spellcheck support. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added a "preview" link.  This will link to the actual announcement.  The preview feature is still not in. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
! Fixed bug with the JS confirm box. (GlobalAnnouncementsAdmin.template.php)
! Fixed the issue with the column size. (GlobalAnnouncements.template.php)
! Changed the search possition to add the $context['allow-admin']. (install.xml)
! Don't show the Global Announcements template is there are none. (GlobalAnnouncements.template.php)


Add to custom theme

<edit file>
$themedir/MessageIndex.template.php
</edit file>
<search for>
// Create the button set...
$normal_buttons = array(
</search for>
<add before>
// Global Announcements...
if (isset($context['globalAnnouncements']) && count($context['globalAnnouncements']) != 0)
{
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>
<td colspan="7" class="titlebg">Global Announcements</td>
<tr>
<tr>
<td class="catbg3" width="9%" colspan="2"></td>
<td class="catbg3">', $txt[70], '</td>
<td class="catbg3" width="14%">', $txt[109], '</td>
<td class="catbg3" width="4%" align="center">', $txt[110], '</td>
<td class="catbg3" width="4%" align="center">', $txt[301], '</td>
<td class="catbg3" width="22%">Time</td>
</tr>';

// Loop through the Global Announcements
foreach ($context['globalAnnouncements'] as $globalAnnouncement)
{
echo '
<tr class="windowbg2">
<td align="center">
<img src="', $settings['images_url'], '/post/' .$globalAnnouncement['ga']['icon']. '.gif" alt="" />
</td>
<td align="center">
<img src="', $settings['images_url'], '/post/exclamation.gif" alt="" />
</td>
<td ' ,$globalAnnouncement['ga']['enabled'] == 0 ? 'style="background-color: #e9e9e9; color: #8d8d8d;"' : 'class="windowbg"', '>
<a href="' ,$globalAnnouncement['ga']['href'], '" >', $globalAnnouncement['ga']['subject'], '</a>
</td>
<td>
', $globalAnnouncement['member']['link'], '
</td>
<td align="center" class="windowbg">
--
</td>
<td align="center" class="windowbg">
', $globalAnnouncement['ga']['views'], '
</td>
<td>
', $globalAnnouncement['ga']['time'], '
</td>
</tr>';
}

echo '
</table>
</div><br />';
}
</add before>
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

PrizeLive.com

Have any screenshots available?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

Assistance

it doesnt use custom Announcement Icons


"This is the order in which the Global Announcement will display in. Leave blank to use default sorting method."
thats a great feature for sure
ty
~playing poker~

deadpoeticstar

Possibly rewrite it so its on the menu side with packages and newsletters placing it between News and Newsletters and Packages

JayBachatero

Quote from: SurfExcelerator.com on August 15, 2006, 02:41:11 PM
Have any screenshots available?
No no screenshots.

Quote from: Assistance on August 16, 2006, 06:42:29 AM
it doesnt use custom Announcement Icons
You mean that the icon selection doesn't work?

Quote from: deadpoeticstar on August 16, 2006, 08:47:27 AM
Possibly rewrite it so its on the menu side with packages and newsletters placing it between News and Newsletters and Packages
The reason as to why I did it this way is becuase you can give moderators and other members the ability to post announcements.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

deadpoeticstar

hmmmm not a real fan of something like letting the users post announcements

Vinspire

#6
Quote from: SurfExcelerator.com on August 15, 2006, 02:41:11 PM
Have any screenshots available?

I am posting this screenshot on behalf of Jay :)

The admin CP interface



This is how it look like in the board



Thank again to Jay for creating such a great mod :)

JayBachatero

Quote from: deadpoeticstar on August 16, 2006, 11:12:00 AM
hmmmm not a real fan of something like letting the users post announcements
Well I made a separate permission for it instead of just tying it to just admins.

Thanks Vinspire for the screen shots.  I'll see if I can make some for the default theme as well.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

deadpoeticstar

its cool i mean all of our reasons aren't the same so do what you think is right

JayBachatero

If you want to put it on that location I can tell you what yo do.  It's a small simple change.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

HighlanderICT

Great mod, BUT ... I would prefer to have a menu entry somewhere in my admin panel - this doesnt appear to add that anywhere ... any ideas how to do that ?

(I have the admin modification menu installed if that helps)

www.CaleyThistleOnline.com [nofollow]
The Red and Blue are coming for You

Søren Bjerg

A "Mods" section was added to my administration bar, with a link to the administration area of this modification, below the "Maintenance" section when I installed it... and I don't even have that other modification installed 8).
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

HecKel

I don't known if do you remember the problem in my forum, but now I known that the server does have PHP 5.0, is this an issue?

HecKel
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

qtime

thx great mod!!!!
A very good tool, to avoid posting stickies in many boards with the same text!

L.G.S

Cool mod, but how could I have it UNDER the page numbers?
(Just above the forum topics themselves)
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


JayBachatero

Quote from: HighlanderICT on August 16, 2006, 04:32:04 PM
Great mod, BUT ... I would prefer to have a menu entry somewhere in my admin panel - this doesnt appear to add that anywhere ... any ideas how to do that ?

(I have the admin modification menu installed if that helps)
It should be the last option there.  Also the Admin Modification Menu is optional.  What I did was TLM wrote a mod that it would support my mod and his mod since both mods add "Mod" category to the menu so this mod just makes it into one section if the mod is installed.

Quote from: HecKel on August 16, 2006, 05:41:24 PM
I don't known if do you remember the problem in my forum, but now I known that the server does have PHP 5.0, is this an issue?

HecKel
Umm I don't remember.  Can you refresh my mind?

Quote from: L.G.S on August 16, 2006, 06:23:08 PM
Cool mod, but how could I have it UNDER the page numbers?
(Just above the forum topics themselves)
That was my first approach but if a board doesn't have post it wont show it and it would take some modification to show it.  I just rather chose to show it separately.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

HecKel

I gave you an admin account on my forum and you tried to install your mod, but you can (like me) so this is you last pm that you sent to me

Quote from: Jay The Code MonkeyIt seems like something went haywire.  Ask your host if they have made changes to PHP recently.

So, now I known that my server hasn't yet PHP 5.0...

HecKel
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

JayBachatero

Ohhhhhh.  That.  Well it was doing this for every mod.  You can give it a shot now.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Assistance

about the icons

in 1.1RC2 you can have custom post icons
like the thumbs up, standard, lamp, etc, etc

well I dont have those, as I have custom icons that I have set through the Smileys and Message Icons section.

the list of icons shows the default icons that is shipped with SMF


its not a huge concern for me, as I just uploaded new icons with the same name as the default, but for others and I am sure you want your mod to be on ^^
~playing poker~

JayBachatero

I was looking into this but it becomes a pain to support it sine the message icons can be for specific boards and so on.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: