News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Announcements like IPB's

Started by Jim R, June 13, 2006, 01:33:57 PM

Previous topic - Next topic

PrizeLive.com

Quote from: Jay The Code Monkey on July 11, 2006, 10:21:33 PM
Ok I finally got some time to work on this.  This is the first beta.  If there are any features that you would like to request just let me know.

Great work... testing now.......!
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

RBH

#41
hey jay, my error logs are filling up with this error

8: Undefined index: allow_admin
File: Sources/Subs.php
Line: 3161

when i went to install this mod the subs.php failed so i just manually edited it. everything is working fine but what is causing this error to fill my logs all of a sudden?

EDIT: ok, figured it out.......this part was wrong for manual edit

<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
]]></search>
<add><![CDATA[
$context['allow_admin'] .= allowedTo(array('global_announcements_admin'));
]]></add>


it says it should be before, when actually 'global_announcements_admin' should have just been added to $context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys')); unless i was just reading the instructions wrong. at any rate it is working now, sorry.

PrizeLive.com

#42
Quote from: Jay The Code Monkey on July 11, 2006, 10:21:33 PM
Ok I finally got some time to work on this.  This is the first beta.  If there are any features that you would like to request just let me know.

Ok.. I have some suggestions..

Is there anyway to choose which board a global announcement or super sticky goes to?

I'm not sure that made sense so let me try to explain...

I have several boards on my forum and want a different super sticky (thread) thats seperated from the others.. Is there anyway to do this?

EDIT: I found out how to show an announcement on select boards... However, the "global announcements" header shows on boards where no announcements will be... How can this be removed?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

JayBachatero

#43
Quote from: RBH on July 12, 2006, 12:14:52 AM
hey jay, my error logs are filling up with this error

8: Undefined index: allow_admin
File: Sources/Subs.php
Line: 3161

when i went to install this mod the subs.php failed so i just manually edited it. everything is working fine but what is causing this error to fill my logs all of a sudden?

EDIT: ok, figured it out.......this part was wrong for manual edit

<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
]]></search>
<add><![CDATA[
$context['allow_admin'] .= allowedTo(array('global_announcements_admin'));
]]></add>


it says it should be before, when actually 'global_announcements_admin' should have just been added to $context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys')); unless i was just reading the instructions wrong. at any rate it is working now, sorry.
I will look into this.  The way it it's it's supposed to be good.  I didn't want to make a replace because a replace usuall yhas conflicts with other mods.

Quote
EDIT: I found out how to show an announcement on select boards... However, the "global announcements" header shows on boards where no announcements will be... How can this be removed?
I will look at it and let you know.


Also I forgot to mention that admin can see disabled Announcements on the Message index.

EDIT RBH can you send me your Subs.php the once from the original mod install? Not the edited one.
Follow me on Twitter

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

JayBachatero

Surf so that it wont show the GA stuff if it's empty do this.

Code (find) Select

if (isset($context['globalAnnouncements']) && $context['globalAnnouncements'] > 0)


Code (replace) Select

if (isset($context['globalAnnouncements']) && count($context['globalAnnouncements']) != 0)


It should be fixed on the next release.
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

#45
Quote from: Jay The Code Monkey on July 12, 2006, 12:59:11 AM
Surf so that it wont show the GA stuff if it's empty do this.

Code (find) Select

if (isset($context['globalAnnouncements']) && $context['globalAnnouncements'] > 0)


Code (replace) Select

if (isset($context['globalAnnouncements']) && count($context['globalAnnouncements']) != 0)


It should be fixed on the next release.

Which file is that in?

Would it also be hard to make the global announcements appear like the sticky's as well? Darker background and bold font?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

RBH

just email it to ya? as for the errors, i was gonna post again and let you know when i was looking over the subs.php file i noticed that this part was inserted twice

//A new mods section for the Global Announcements.
if (allowedTo('global_announcements_admin'))
{
$context['admin_areas']['ga_admin'] = array(
'title' =>  $txt['global_announcements_mods'],
'areas' => array(
'ga_admin' => '<a href="' . $scripturl . '?action=globalAnnouncementsAdmin">' . $txt['global_announcements_admin'] . '</a>',
),
);
}


one before which i added, and 1 after which must have gotten partially installed when i first attempted is what i guess because i know i didnt add it twice........or i dont beleive i did. :D at any rate, how do you want it sent, by email? i will send tomorrow as the meds are kickin in and i am heading to bed. ;)

JayBachatero

#47
Surf that would be in MessageIndex.template.php.

RBH what other mods do you have installed?  Email me the file.

EDIT: Surf not  it wouldn't be hard to do.  Right on the file change te windowbg class to windowbg3 (I think that is the sticky class).
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

Quote from: Jay The Code Monkey on July 12, 2006, 01:26:25 AM
Surf that would be in MessageIndex.template.php.

RBH what other mods do you have installed?  Email me the file.

Ok thanks...

Also.. how could I make the text for the global announcement subject bold and the background darker? (just like a regular sticky post)..?

EDIT: I'll check it out...  :D
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

JayBachatero

RBH that error is due to the fact that you have TP installed and TP modifies that line.  I will update the mod  to look for another string that I know wont be edited.

Add
$context['allow_admin'] .= allowedTo(array('global_announcements_admin'));

Before

$context['in_maintenance'] = !empty($maintenance);
.
Follow me on Twitter

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

ghostfreak

Can't wait to test the next release :)

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

JayBachatero

Hopefully it should be out by next week.
Follow me on Twitter

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

ladyshanae

#52
This worked perfectly on my board!  Well . . . almost perfectly.

First off - no errors so far:  YAY!!!!

The only two problems I've run into:

1.  when I go to delete it if I choose cancel, it deletes anyway.
2.  if there are child boards, the global announcements are below the child board lists

:)

AWESOME - I've been waiting for this mod for ages :)

JayBachatero

#53
Umm need to look into that confirm stuff.

2.  Yea I noticed this.  I prefer it the way it is.  But we can have a vote and see what's best.

I was able to work on this yestday night and I made a few minor changes.  I added the status of the GA to the admin page.  So if it's disabled it shows a red button and if it's enabled it shows a green button.  You can change the status by clicking the link.

At this point I can't say when I will release another version since I've had to work a lot the past fwe days and sometimes working double shifts.

EDIT:  Just fixed the confirm box bug.

Also until I get this mod stable I will not make upgrade packages.  I will just make a regular install so you will have to uninstall then install new version.
Follow me on Twitter

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

HecKel

Where is the last version of this mod? I want to try this :)

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

#55
This is the post.  There are a few changes that are not there.
http://www.simplemachines.org/community/index.php?topic=93129.msg641425#msg641425
Follow me on Twitter

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

HecKel

tnks :)

By the way, I am portuguese and my forum is a Portuguese forum too. What I have to change in the mod files to install it?

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

You need to update the GlobalAnnouncementsAdmin.english.php and update it to portuguese and change the enligh part to portuguese in the file name.  Also make the changes on Modifications.english.php.
Follow me on Twitter

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

JayBachatero

#58
A question.  When sending the notification should it send part of the global announcement or the whole thing?

Also should it send to everyone that can see the boards that it's posted in or just select the membergroups from a list and email them.  No matter if they can see the announcement or not.

I'm leaning to the second option.  Not over complicate things.
Follow me on Twitter

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

JayBachatero

+ Added BBC and Smileys Menu to Add and Edit Page. (GlobalAnnouncementsAdmin.php, Subs-GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)
+ Added actions for Who's online page.

I will work on a few other things. 
Follow me on Twitter

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

Advertisement: