Advertisement:

Author Topic: Global Announcements  (Read 202048 times)

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Global Announcements
« on: August 15, 2006, 02:39:18 PM »
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
Code: [Select]
<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>
« Last Edit: August 29, 2006, 12:26:30 PM by Jay The Code Monkey »
Follow me on Twitter

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

Offline PrizeLive.com

  • Full Member
  • ***
  • Posts: 683
    • PrizeLive.com
Re: Global Announcements
« Reply #1 on: August 15, 2006, 02:41:11 PM »
Have any screenshots available?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

Offline Assistance

  • Jr. Member
  • **
  • Posts: 343
  • Gender: Male
Re: Global Announcements
« Reply #2 on: August 16, 2006, 06:42:29 AM »
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~

Offline deadpoeticstar

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
    • My Blog
Re: Global Announcements
« Reply #3 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

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #4 on: August 16, 2006, 11:03:52 AM »
Have any screenshots available?
No no screenshots.

it doesnt use custom Announcement Icons
You mean that the icon selection doesn't work?

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

Offline deadpoeticstar

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
    • My Blog
Re: Global Announcements
« Reply #5 on: August 16, 2006, 11:12:00 AM »
hmmmm not a real fan of something like letting the users post announcements

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Global Announcements
« Reply #6 on: August 16, 2006, 11:46:17 AM »
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 :)
« Last Edit: August 16, 2006, 11:47:51 AM by Vinspire »

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #7 on: August 16, 2006, 12:04:05 PM »
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

Offline deadpoeticstar

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
    • My Blog
Re: Global Announcements
« Reply #8 on: August 16, 2006, 02:03:14 PM »
its cool i mean all of our reasons aren't the same so do what you think is right

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #9 on: August 16, 2006, 02:17:59 PM »
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

Offline HighlanderICT

  • Semi-Newbie
  • *
  • Posts: 17
  • Gender: Male
    • CaleyThistleOnline
Re: Global Announcements
« Reply #10 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)
www.CaleyThistleOnline.com
The Red and Blue are coming for You

Offline Søren Bjerg

  • Jr. Member
  • **
  • Posts: 228
  • Gender: Male
  • Dragoon!
    • RUNE HORDES dot INFO
Re: Global Announcements
« Reply #11 on: August 16, 2006, 04:42:24 PM »
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).

Offline HecKel

  • Sr. Member
  • ****
  • Posts: 774
  • Gender: Male
    • Portuguese Programming Community
Re: Global Announcements
« Reply #12 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
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Global Announcements
« Reply #13 on: August 16, 2006, 05:42:16 PM »
thx great mod!!!!
A very good tool, to avoid posting stickies in many boards with the same text!

Offline L.G.S

  • SMF Hero
  • ******
  • Posts: 2,658
  • Gender: Male
  • RuthlessIntent.com !
    • GamesandGoals.com
Re: Global Announcements
« Reply #14 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)
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #15 on: August 16, 2006, 10:10:34 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.

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?

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

Offline HecKel

  • Sr. Member
  • ****
  • Posts: 774
  • Gender: Male
    • Portuguese Programming Community
Re: Global Announcements
« Reply #16 on: August 16, 2006, 11:30:03 PM »
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 Monkey
It 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
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #17 on: August 16, 2006, 11:32:01 PM »
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

Offline Assistance

  • Jr. Member
  • **
  • Posts: 343
  • Gender: Male
Re: Global Announcements
« Reply #18 on: August 17, 2006, 02:24:12 AM »
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~

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Global Announcements
« Reply #19 on: August 17, 2006, 02:38:42 AM »
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