News:

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

Main Menu

Yet Another Global Announcements Mod (YAGAM)

Started by Nibogo, February 11, 2009, 12:47:15 AM

Previous topic - Next topic

Nibogo

Link to Mod


Yet Another Global Announcements Mod -YAGAM- v2.7.5 - NIBOGO
Powerful global announcements system , with full control of every single global announcement , YAGAM for short.





Author
:
- NIBOGO

Features:
o You can create unlimited global announcements.
o Support BBCODE and Smileys , with the powerful SMF WYSIWYG Editor
o You can allow comments for every announcement.
o Select in what board`s the announcement will appear or just select all the boards
o Set Permission for each announcement , based on membergroups
o Layout of the announcement as a normal topic.
o Simple and friendly admin panel for all the global announcements.
o You can enable/disable every announcement.
o Permission to manage and comment announcements.
o You can convert an announcement into a Topic, you choose the board and if the topic is sticky and locked.
    o Optionally you can convert the announcement's comments into replies of the new topic.
o You can convert a Topic into an Announcement and the replies into comments.
o Announcement Log, you can easily see who viewed the announcement.   
o Support for the Linktree.
o Support for the Who is online list , 'Viewing a Global Announcement'.
o Nice layout for the MessageIndex with a bar for the Global Announcements and another bar for the normal topics.
o Announcement Settings with some little options.
o Sort option based on the same Topic Sort options with subject , views and replies. Desc and Asc are supported.
o Force users to Read an Announcement if he didn't saw the announcement.
o Member Color Link Mod Support on MessageIndex and Announcement.
o SSI Functions with Announcement 'ssi_announcement(5)' and random announcement 'ssi_random_announcement()'.
o Easy manual installation , you can manually install the db with the db_yagam.php and the modifications with yagam_manual_edit.html.
o You will have an empty error log.
o Much more, a lot of interesting features.
o Support SMF 2.0 ONLY

Manual Edit:

YAGAM Manual Database Installation you only need to upload the file "db_yagam.php" and open the file on your browser:

http://www.yourforum.com/smf/db_yagam.php

Modified Files:

- /index.php
- /SSI.php
- /ssi_examples.shtml
- /Sources/ManagePermissions.php
- /Sources/MessageIndex.php
- /Sources/Admin.php
- /Sources/Display.php
- /Themes/default/Display.template.php
- /Themes/default/MessageIndex.template.php
- /Themes/default/languages/Modifications.english.php
- /Themes/default/languages/Modifications.english-utf8.php

Files Included:

- Announcements.php (Sources)
- AnnouncementsView.php (Sources)
- Subs-Announcements.php (Sources)
- Announcements.template.php (Template)
- AnnouncementsView.template.php (Template)
- Announcements.english.php (Languages)
- Announcements.english-utf8.php (Languages)
- db_yagam.php
- yagam_manual_edit.html


Planned Features:

o A lot of things added in the v2.0 so only bug fixing

Languages:
- English/English UTF8.
- Spanish_es/Spanish_latin - Spanish_es-utf8/Spanish_latin-utf8.
- Dutch/Dutch UTF8 Translated by nuva.

Compatibility:
- SMF 2.0

Special Thanks:
- Tango Icons Library: I am using an image of this icons library (Tango Icons License)

Changelog:

+ New Feature | - Feature Removed | * Changed | @ Important Info | ! Bug Fixed

Version 2.7.5 - November 17, 2017
* Better installation.

Version 2.7.4 - June 29, 2011
@ Updated for SMF 2.0

Version 2.7.3 - Apr 11, 2010
! Some additional errors in the Error Log
! Issue with the view profile permission
! Issue displaying IP's to Moderators
! Various error messages weren't loaded

Version 2.7.2 - Apr 10, 2010
! Fixed all the errors in the Error Log
! Fixed little issue with the random announcement ssi function
* Some little tweaks to the announcements on index

Version 2.7 - Mar 09, 2010
+ All the templates has been re-writted for the best Curve Experience.
+ Added SMF 2.0 RC3 Support.
+ Added Massive Quick Delete in the Announcements Admin Panel.
+ Added Spellchecker Support (Only if it's enabled in the SMF Admin Panel).
! Fixed some XHTML Validation Errors.
! Fixed Permission Verification for non-admins Deleting Announcements.
@ A lot of code has been optimized.

Version 2.6 - Jan 18, 2010
- Fixed issue with the Announcements Permissions.
- Fixed issue with Announcements Replies.
- Added Option to Convert Topic into Announcements.

Version 2.5 - Jan 08, 2010
- Added Additional Curve Support viewing an Announcement (Now we have corners like Curve).
- Little tweaks to the Add Comment Form, Now everything is centered, added support for shortcuts and the Add Comment button now has a better style.
- Added Comments Pages.
- Added option to convert comments into replies in the Make Topic Page.
- Modded all the Installation Script now added Support for PostgreSQL and SQLite plus now using the SMF 2.0 Standards and fixed a bug loading the Curve Stylesheet.
- Added a new checkbox to easily select all the membergroups when we are adding/editing announcements.
- Changed a lot of queries.
- Changed some codes to make the mod a little bit faster and most importantly with a better semanthic.
- Now when you delete an announcement, the comments and log of this announcements in deleted too.
- Fixed fatal error in the SSI.php Edit.
- Fixed missed space in the MessageIndex on Announcements Comments.
- Fixed additional bugs with the Comments as Regular Posts.
- The Announcement Log is Back now loading the users posts and now it comes with the Curve Style.
- Updated the YAGAM Version Page.

Version 2.4 - Jan 06, 2010
- Changed the Comments Layout now they look like a normal post.
- Now YAGAM is HTML Valid. This fix several issues with other mods and themes.
- Fixed errors in the Error Log.
- Removed the Pretty Urls Rule (it wasn't necessary and it wasn't update it with the last release of Pretty Urls).
- Removed the Announcement Log (Has some issues, nobody find it useful and the code is now smaller).
- Added Color to the Announcements Background (You can changed looking for .yagam on the /Curve/css/index.css file).
- Enhanced some queries with the SMF 2.0 Style.

Version 2.3 - Nov 25, 2009
- Fixed issue with the Force Read Announcement on Login.
- Fixed issue with the new Curve Layout on MessageIndex.

Version 2.2 - Nov 11, 2009
- Added Support for SMF 2.0 RC2.
- Added Support for Curve!
- Changed the Support Website now YAGAM is Powered by SMFPacks.com
- Fixed little issue with a string in English.

Version 2.1 - Oct 08, 2009
- Fixed permission bug (Thanks to Mr_Dark)
- Fixed blank page bug
- Fixed wrong string on messageindex (Reported by haerde)
- Fixed issue uploading the AnnouncementView.php and AnnouncementView.template.php files

Version 2.0 [Big Upgrade] - May 29, 2009
- A lot of changes in all the code, structure and files, too many changes to be listed here.
- Fixed more bugs.
- Added Sort Options based on the Same Topics Sort Options .
- Added Support for Member Color Link Mod on MessageIndex.
- Added Announcement Log (View who see the Announcement).
- Added Force Users to Read Announcement after Login.
- Added some improvements to the linktree and Pages Title.
- Cleaned the code of the MessageIndex Edit.
- Fixed some minor additional bugs.
- Added Global Announcements Settings with some options.
- Added Support for Sticky Topics Bar with Global Announcements and Normal Topic.
- Pretty Urls Support.
- Changed the Panel Administration now with the SMF Admin Section Layout.
- Added YAGAM Version Panel.
- Added SSI Functions with Announcement 'ssi_announcement(5)' and random announcement 'ssi_random_announcement()'.
- Much more, So many things to be included in this changelog

Version 1.1.6.2 - Feb 23, 2009
- Fixed more bugs with the new URL Style
- Changed the admin.php editing with a new position of the YAGAM Panel and Add Global Announcement subsection
- More, more and yet more bug fixing

Version 1.1.6 - Feb 23, 2009
- Fixed the Linktree and Redirect Bugs with the new URL Style
- Changed all the ManagePermissions Edit , Now the guest can comment too (with the permission of course) and the Manage YAGAM is an Administrative Permission

Version 1.1.5 - Feb 23, 2009
- Fixed Permission Bug for non-Admin Users and YAGAM Manager
- Changed all the functions of the mod (You only can see this in the code) :P
- Added Support for the Member Color Link Mod
- Changed the View Global Announcement url style from this:

http://www.forum.com/index.php?action=announcements;sa=view;id=8

to this:

http://www.forum.com/index.php?action=announcements;aid=8

Version 1.1.4 - Feb 17, 2009
- '292' Bug Fixed
- Fixed the bug with the String deleting a comment
- Fixed the bug "Fatal error: Call to undefined function template_control_richedit() in /Sources/Load.php(1944) : eval()'d code on line 538"
- Fixed some minor additional Bugs
- Fixed Bug with the YAGAM Version on the Package Manager

Version 1.1.3 - Feb 16, 2009
- Fixed the bug with automatic redirect for non-yagam manage permission membergroups
- Fixed the bug with an error on IE7 "Operation aborted"
- Fixed the bug with the Linktree on announcement view
- Added linktree on Comment Edit
- Added WYSIWYG on Add Comment and Edit Comment

Version 1.1.2 - Feb 14, 2009
- Added Spanish_es , Spanish_latin , Swedish (Nas) , German (CvH) and Turkish (Özgür´) all with UTF-8 (less Swedish)
- New ManagePermission Edit , for compatibility with other mods
- Fixed the bug with multiple "Global Announcement" Bar reporte by mgrmgrin this post
- Fixed the bug "undefined index error in error log.[$sourcedir/Announcements.php ~ line 338]" reported by Yagiz... in this post

Version 1.0 - Feb 10, 2009
- Modification Release


Marcus Forsberg

#1
Very nice mod! :D

Swedish


// YAGAM - Admin and MessageIndex Strings
$txt['yagam_admin'] = 'Globala underrättelser';
$txt['yagam_topics'] = 'Normala ämnen';
$txt['yagam_created'] = 'Skapades';
$txt['whoall_announcements'] = 'Visar en global underrättelse';
$txt['permissionname_yagam_manage'] = 'Hantera globala underrättelser';
$txt['permissionhelp_yagam_manage'] = 'Anger om användaren kan hantera globala underrättelser.';
$txt['permissionname_yagam_comment'] = 'Kommentera globala underrättelser';
$txt['permissionhelp_yagam_comment'] = 'Anger om användaren kan kommentera globala underrättelser.';
$txt['yagam_edit2'] = 'Ändra';
$txt['yagam_edit'] = 'Ändra underrättelse';
$txt['yagam_remove'] = 'Radera underrättelse';
$txt['yagam_remove2'] = 'Radera';

fords8

#2
Tryed to install this and got 2 errors on the ./Sources/ManagePermissions.php .

I have the downloads and articles and advanced reputation mod installed. Looks like these 3 mods will conflict with this one on the install.

(1st error) Mod is looking for:    

$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
'view_mlist',
'karma_edit',


My file looks like this:

$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
'view_articles',
'add_articles',
'edit_articles',
'delete_articles',
'rate_articles',
'articles_comment',
'articles_auto_approve',
'articles_autocomment',
'articles_admin',
'downloads_view',
'downloads_add',
'downloads_edit',
'downloads_delete',
'downloads_ratefile',
'downloads_comment',
'downloads_editcomment',
'downloads_report',
'downloads_autocomment',
'downloads_autoapprove',
'downloads_manage',
'view_mlist',
'karma_edit',


(2nd error) Mod is looking for:

$context['non_guest_permissions'] = array(
'karma_edit',


My file looks like this:

$context['non_guest_permissions'] = array(
// Advanced Reputation System Settings
'disable_karma_display',
'positive_karma',
'negative_karma',
'delete_karma',
'karma_edit',


Only reason I am posting this up is so others know about it. And to let you know. Great mod!

Özgür

#3
I add new announcement, but not showing announcement message body. :S

Please look attachment.

How can i fix this ?
So Long

Sudhakar Arjunan

Such a wonderful updated Mod NIBOGO.

Will install soon.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

edi67

this is one of more useful mod created for smf , global announcement must to have smf by default thx nibogo
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

edi67

one error found, trying to view globa announcement, i have this error:


Fatal error: Cannot use string offset as an array in
Quote/home/crazyzone/data/www/crazyzone.biz/Sources/Load.php(2192) : eval()'d code on line 292
please some solution ?
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Nibogo

@Nas: Thanks nas , I will update the mod later adding your translation :)

@fords8: You just have to add the yagam code after the downloads permission code , I am in my cell phone so I cant do anymore.

@ozgur: The mod install correctly?

Can you check your phpmyadmin and see the announcements table because maybe is an error with sql or with any announcement php file

@A.sk: Glad to hear that :)

@edi67: I don't know what you have that error , please try re-installing the mod.

The mod was tested on a SMF 2.0 RC1 Fresh Installation by me and the smf customization team and works pretty nice

fords8

Quote@fords8: You just have to add the yagam code after the downloads permission code

Yup I know! Once you get a chance, you going to make it so this will install even when these mods are installed?

edi67

Quote from: NIBOGO on February 11, 2009, 02:51:00 PM

@edi67: I don't know what you have that error , please try re-installing the mod.



Quote
Fatal error: Cannot use string offset as an array in  /home/crazyzone/data/www/crazyzone.biz/Sources/Load.php(2192) : eval()'d code on line 292

so strange this is line 292 of message.index.template
Quote
   if ($announcement['can_comment'] == '1')
                  echo''.$announcement['comment_total'].'';
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Özgür

Quote
@ozgur: The mod install correctly?

Can you check your phpmyadmin and see the announcements table because maybe is an error with sql or with any announcement php file

Yes, installed correctly. (2 errors from managepermission, and i fix this manuel).
This mod is worked, i know this because i test in my test site.
But in my public site not worked. This is strange :S

http://www.rockayseri.net/rk/index.php?action=announcements;sa=view;id=4
username : Sebastian / pass : 123456 please try.
So Long

Nibogo

Quote from: edi67 on February 11, 2009, 03:45:22 PM
Quote from: NIBOGO on February 11, 2009, 02:51:00 PM

@edi67: I don't know what you have that error , please try re-installing the mod.



Quote
Fatal error: Cannot use string offset as an array in  /home/crazyzone/data/www/crazyzone.biz/Sources/Load.php(2192) : eval()'d code on line 292

so strange this is line 292 of message.index.template
Quote
   if ($announcement['can_comment'] == '1')
                  echo''.$announcement['comment_total'].'';

Please attach MessageIndex.php and MessageIndex.template.php

Quote from: Özgür´ on February 11, 2009, 03:55:46 PM
Quote
@ozgur: The mod install correctly?

Can you check your phpmyadmin and see the announcements table because maybe is an error with sql or with any announcement php file

Yes, installed correctly. (2 errors from managepermission, and i fix this manuel).
This mod is worked, i know this because i test in my test site.
But in my public site not worked. This is strange :S

http://www.rockayseri.net/rk/index.php?action=announcements;sa=view;id=4
username : Sebastian / pass : 123456 please try.

Sorry but really I dont understand the turkish language

¿Bu işte bir yanlışlık var!?

This is really strange , the mod work pretty cool in all my SMF 2.0 sites :s

Lamarck

I can't install this with my custom theme (Energy theme),even manual.Could you help me?

I attach my messageindex.template.php,I have problems with this:

QuoteEncontrar          [Seleccionar]                        //
No topics.... just say, "sorry bub". if (empty($context['topics']))
echo ' <tr class="windowbg2"> <td class="catbg3" colspan="' ,
!empty($options['display_quick_mod']) ? '8' : '7' ,
'"><strong>', $txt['msg_alert_none'],
'</strong></td> </tr>'; foreach ($context['topics']
as $topic) { // Do we want to seperate the sticky and lock status out?                        Reemplazar          [Seleccionar]                        //
YAGAM starts here with the announcement bar, normal bar and the
windowclass $announcement_bar = false; $normal_bar = false;
$windowclass = "windowbg"; foreach($context['announcements'] as
$announcement) { // Ok , I have permission to see this?? $pGroups =
explode(',',$announcement['permissions']); $announcement_permission =
count(array_intersect($user_info['groups'], $pGroups)) == 0 ? false :
true; // Change the bar status only if we cant see this announcement
and we arent admin if (!$announcement_permission == true &&
!$user_info['is_admin']) $announcement_bar = true; // Lets check if the
announcement can be shown in this board $pBoards = explode(',',
$announcement['id_boards']); foreach ($pBoards as $board_announcement)
{ // Change the bar status based in the boards
if((ltrim($board_announcement) !== $board_info['id']) &&
(ltrim($board_announcement) !== '0')) $announcement_bar = false; //
Lets Add the Global Announcement Bar if(!$announcement_bar){
echo'<tr class="titlebg"><td colspan="',
empty($options['display_quick_mod']) ? '7' : '8', '" style="padding:8px
4px;"><b>'.$txt['yagam_admin'].'</b></td></tr>';

$announcement_bar = true; } // You can see this if you have permission
and the ga is enable or you are the admin if
((ltrim($board_announcement) == $board_info['id'] ||
$announcement['id_boards'] == 0) && ($announcement_permission
== true || $context['user']['is_admin'])) { echo ' <tr
class="windowbg2"> <td class="windowbg2 icon1"> <img
src="', $settings['images_url'], '/topic/normal_post.gif" alt="" />
</td> <td class="windowbg2 icon2"> <img src="',
$settings['images_url'], '/post/exclamation.gif" alt="" />
</td> <td class="subject ', $windowclass, '"> <a
href="',$scripturl,'?action=announcements;sa=view;id=',$announcement['id_announcement'],'">',$announcement['title'],
'</a><br /> </td> <td class="windowbg2
starter"> <a
href="'.$scripturl.'?action=profile;u=',$announcement['author'],
'">',$announcement['real_name'], '</a> </td> <td
class="windowbg replies">'; if ($announcement['can_comment'] == '1')
echo''.$announcement['comment_total'].''; else echo'--';
echo'</td> <td class="windowbg views">
',$announcement['views'], ' </td> <td class="windowbg2
lastpost"> '.$txt['yagam_created'].' :
',timeformat($announcement['date']), ' </td>'; if
(allowedTo('yagam_manage') &&
!empty($options['display_quick_mod'])) echo '<td class="windowbg2
moderate"><a
href="',$scripturl,'?action=announcements;sa=edit;id=',$announcement['id_announcement'],'"
title="'.$txt['yagam_edit'].'"><img
src="'.$settings['images_url'].'/buttons/modify.gif"
alt="',$txt['yagam_edit2'], '"></a> <a
href="',$scripturl,'?action=announcements;sa=deleteverify;id=',$announcement['id_announcement'],'"
title="'.$txt['yagam_remove'].'"><img
src="'.$settings['images_url'].'/buttons/delete.gif"
alt="',$txt['yagam_remove2'], '"></a> </td>';
echo'</tr>'; // Alternate the style class if
(!empty($windowclass) && $windowclass == "windowbg")
$windowclass = "windowbg2"; else $windowclass = "windowbg"; } // We
dont want a normal bar if we dont have any announcement if
($announcement_permission == false && !$user_info['is_admin'])
$announcement_bar = false; } } // No topics.... just say, "sorry bub".
if (empty($context['topics'])) echo ' <tr class="windowbg2">
<td class="catbg3" colspan="' ,
!empty($options['display_quick_mod']) ? '8' : '7' ,
'"><strong>', $txt['msg_alert_none'],
'</strong></td> </tr>'; foreach($context['topics'] as
$topic) { // The Normal Bar if($announcement_bar &&
!$normal_bar){ echo'<tr class="titlebg"><td colspan="',
empty($options['display_quick_mod']) ? '7' : '8', '" style="padding:8px
4px;"><b>'.$txt['yagam_topics'].'</b></td></tr>';

$normal_bar = true; } // Do we want to separate the sticky and lock
status out?


           

Özgür

#13
"Bu işte bir yanlışlık var!?" is "An Error Has Occurred!"

http://www.rockayseri.net/rk/index.php?action=announcements;sa=view;id=5

I change my demo user language. You login as Sebastian and 123456.

If you want admin/ftp account, i give you.

As I say Strange.. :| Because no error.. no anything. But not show announcements body.. :S
So Long

Nibogo

Quote from: Özgür´ on February 11, 2009, 06:50:34 PM
"Bu işte bir yanlışlık var!?" is "An Error Has Occurred!"

http://www.rockayseri.net/rk/index.php?action=announcements;sa=view;id=5

I change my demo user language. You login as Sebastian and 123456.

If you want admin/ftp account, i give you.

As I say Strange.. :| Because no error.. no anything. But not show announcements body.. :S


mmm , I dont know what is going on , maybe is an error with the phpmyadmin , please check if the smf_announcements table have the announcement content column , if the column exist try re-installing the mod , because should be working :s

Quote from: Lamarck on February 11, 2009, 06:12:29 PM
I can't install this with my custom theme (Energy theme),even manual.Could you help me?

I attach my messageindex.template.php,I have problems with this:
          

Try the parser , I dont have the time to do modify all the people files

Yağız...

Create or edit an announcement. Don't check Comments option.

This makes an undefined index error in error log.[$sourcedir/Announcements.php ~ line 338]

Lamarck

QuoteTry the parser , I dont have the time to do modify all the people files

Ok,thanks for your support.I can't install manually It.Uninstalling...


jkrlvgn

to the :

Fatal error: Cannot use string offset as an array in  /home/crazyzone/data/www/crazyzone.biz/Sources/Load.php(2192) : eval()'d code on line 292

issue....

I had issues similar to this....it doesn't seem to like 2.0b4 at all...  I upgraded to RC1, and it works fine now, but I had to do some other manual editing and cleaning up from previous mods.  If you had the global announcements mod installed, this might be part of the issue.

Just to note, on the comments issue, I had the same problem, so it's not just specific to certain people.


As far as you, Lamarck....it's not hard to manually install a mod...I'm using a custom template myself, and it works fairly well.  Instead of uninstalling it and moving on (...to...nothing, I might add, since this is the only other one besides the older), you can ask other people for assistance.  NIBOGO -IS- a busy guy...he can't do everything for you, though, no matter how nice he is.

If you still want help with it, let me know, and I'll help ya out.

glennk


Advertisement: