News:

Wondering if this will always be free?  See why free is better.

Main Menu

Global Announcements

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

Previous topic - Next topic

JayBachatero

#60
Yea if you have the permission to manage global announcements you can see disabled announcements.

Umm never thought about that feature.  I'll look into it in the future.

Scartch that.  Only admins can look at disabled ga in message index.  Minor error there since it's supposed to look into the permissions.
Follow me on Twitter

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

HecKel

This Mod is compatible with RC3?

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

Yep.  It's more compatible with RC3 than RC2 :P.
Follow me on Twitter

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

Zelnen

Quote from: Vinspire on August 16, 2006, 11:46:17 AM
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

hxxp:img216.imageshack.us/my.php?image=gbakp5.jpg [nonactive]

This is how it look like in the board

hxxp:img216.imageshack.us/my.php?image=gba2zm0.jpg [nonactive]

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

Looks really nice, i'm just downloading.
hxxp:zelnen.com [nonactive]

Crisis85

I get this error when trying to add a new announcement (the only option that I see?).

Fatal error: Call to undefined function: cache_get_data() in /home/skylow22/public_html/Sources/Subs-GlobalAnnouncementsAdmin.php on line 57

All the window shows are Announcement Icon, Subject, and Boards. There is no "add announcement" button or anything.

How do I fix this?

JayBachatero

Seems like you are not using 1.1.  Need to use SMF 1.1 RC2 or RC3.
Follow me on Twitter

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

ametzler

Has anyone got this to work with the Amber theme?  I am using RC1.1 RC3.  If so what do I need to do to get it to work?  Thanks for advice!!

Adam

L.G.S

Quote from: Jay The Code Monkey on August 20, 2006, 12:58:32 PM
Can you send me a test Admin account?

Thanks for tryin to help me Jay, after upgrading to RC3 and installing the mod the link showed.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


JayBachatero

Quote from: meldog on August 25, 2006, 11:52:05 AM
Has anyone got this to work with the Amber theme?  I am using RC1.1 RC3.  If so what do I need to do to get it to work?  Thanks for advice!!

Adam
You need to edit Display.template.php to make this work with Amber Theme.

LGS glad to hear it's working fine now.
Follow me on Twitter

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

ametzler

I was looking through the mod files.  What do I have to add in or change in the Display.template.php.  Thanks again for the help!!

JayBachatero

Add this to your MessageIndex.template.php file.


// 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 />';
}
Follow me on Twitter

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

ghostfreak

I installed this mod and now I get this message when I click on a board:

Parse error: parse error, unexpected $, expecting ')' in /home/rockcoll/public_html/board/Sources/MessageIndex.php on line 690


Help please!

http://www.xfilesforum.net - Dare To Believe?
http://www.idealforum.co.uk - The Green Blitz!

JayBachatero

Follow me on Twitter

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

S1L1C0N

I'd really love it if mods could turn any post into a Global Announcement and if I could enable this on custom themes =(

JayBachatero

To add this to a 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>


About the post thing.  That would be a super sticky.  Something that I'm going to be looking into.
Follow me on Twitter

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

niblem

I am trying to install Global Announcements Mod 1.0 Final on my website via the package manager.

Everything is okay until I click "Apply Mod" then I get this error:
QuoteInstalling this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Sources/MessageIndex.php    Test successful
3.    Execute Modification    ./Sources/ManageNews.php    Test successful
4.    Execute Modification    ./Sources/Who.php    Test successful
5.    Execute Modification    ./Sources/Subs.php    Test successful
6.    Execute Modification    ./Sources/ManagePermissions.php    Test failed
7.    Execute Modification    ./Themes/default/index.template.php    Test successful
8.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
11.    Execute Modification    ./Themes/default/languages/ManagePermissions.english.php    Test successful
12.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
13.    Extract File    ./Sources/GlobalAnnouncementsAdmin.php    
14.    Extract File    ./Themes/default/GlobalAnnouncementsAdmin.template.php    
15.    Extract File    ./Themes/default/languages/GlobalAnnouncementsAdmin.english.php    
16.    Extract File    ./Sources/GlobalAnnouncements.php    
17.    Extract File    ./Themes/default/GlobalAnnouncements.template.php    
18.    Extract File    ./Sources/Subs-GlobalAnnouncementsAdmin.php    
19.    Execute Code    ga_install.php

I am using the default theme and not sure where to go from here.  Thanks for the help in advance.

JayBachatero

You can install the mod and just edit that file manually.  Seems like a conflict with another mod.
Follow me on Twitter

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

S1L1C0N

Very cool, as soon as we can turn regular posts into global announcements i'm all over this! Subscribed.  Also I couldnt find ANYTHING anywhere on Supersticky, any links?

codenaught

Quote from: S1L1C0N on September 01, 2006, 02:19:34 PM
Very cool, as soon as we can turn regular posts into global announcements i'm all over this! Subscribed.  Also I couldnt find ANYTHING anywhere on Supersticky, any links?
There was a mod that did this awhile back, but the mod author left this place and removed his mod. I am not sure if it is supported, but I remember it was at one point after he left SMF. I think Jay is looking into releasing a separate mod for allowing normal topics to become global announcements. We even discussed myself taking a look into doing this. I think it would be great if it was completely compatable with this mod, so I will see how this mod is set up, and see what needs to be done. :)
Dev Consultant
Former SMF Doc Coordinator

S1L1C0N

That would be a godsend on SMF =) Now if someone could just come up with my other dream.....a mod to list all recent THREADS (not posts) in the past X number of days.....


e

Advertisement: