Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: Jim R on June 13, 2006, 01:33:57 PM

Title: Announcements like IPB's
Post by: Jim R on June 13, 2006, 01:33:57 PM
I searched and found a similar request over a year ago, but it had no responses. 

I'm interested in seeing if when starting a Topic is started it is also started on other Boards of choice.  For me this would only be an Admin feature. 

As I am posting, much like when I check to have Replies sent to my email, I could check the other Boards this Topic would be posted.
Title: Re: Post on multiple boards with one post...
Post by: anunlike on June 13, 2006, 02:52:52 PM
I'd be interested in this, as a mod.

There are some things that I'd like to post in more than one board, as well.
Title: Re: Post on multiple boards with one post...
Post by: Jim R on June 13, 2006, 03:00:43 PM
Quote from: anunlike on June 13, 2006, 02:52:52 PM
I'd be interested in this, as a mod.

There are some things that I'd like to post in more than one board, as well.

It was your topic that I saw which didn't get a response.   :)
Title: Re: Post on multiple boards with one post...
Post by: anunlike on June 13, 2006, 03:50:49 PM
Yeah, I figured. :)

I thought that it was the "Global Announcement and Super Sticky" mod that did the same thing. I found that after I posted my request. So, I decided to drop it.

But, I never actually got around to using that mod, so I'm not sure if that was it or not. But, it doesn't seem be available anymore, anyway.
Title: Announcements like IPB's
Post by: michaelper22 on June 14, 2006, 11:57:49 AM
IPB has this feature in My Controls, if you are an administrator, (at least in version 2.1.6), that lets you make an announcement that appears in every category listing. Here are some screenshots:
http://s1.simpload.com/061444903112ecca9.jpg (http://s1.simpload.com/061444903112ecca9.jpg)
http://s1.simpload.com/06144490313bae02e.jpg (http://s1.simpload.com/06144490313bae02e.jpg)
http://s1.simpload.com/0614449031875d461.jpg (http://s1.simpload.com/0614449031875d461.jpg)
http://s1.simpload.com/0614449031adb8c0e.jpg (http://s1.simpload.com/0614449031adb8c0e.jpg)
http://s1.simpload.com/0614449031d25aa66.jpg (http://s1.simpload.com/0614449031d25aa66.jpg)
I don't know how complicated this would be, but if you could get it done, I would be so thankful.

Note: I made the above screenshot from an actual IPB powered forum. Whatever is in those pictures may be copyrighted by IPS.
Title: Re: Announcements like IPB's
Post by: Ben_S on June 14, 2006, 02:15:05 PM
Wouldn't mind something like that.
Title: Re: Announcements like IPB's
Post by: H on June 14, 2006, 04:04:04 PM
I certainly wouldn't mind something like this.

Every forum software I have used before SMF has had this feature
Title: Re: Announcements like IPB's
Post by: anunlike on June 15, 2006, 01:52:04 AM
I'd also like it. It'd be very helpful, indeed.
Title: Re: Announcements like IPB's
Post by: Remaker on June 17, 2006, 02:16:34 PM
That's a nice feature.
Title: Re: Announcements like IPB's
Post by: HarryWx on June 18, 2006, 01:39:26 PM
This i have requested already and as said by others is very much needed and look's great. the new phpbb3 released in beta now even has it however the older 2.0+ series dont. Hopefully this will be seen here soon.
Title: Re: Announcements like IPB's
Post by: H on June 18, 2006, 01:45:21 PM
Quote from: HarryWx on June 18, 2006, 01:39:26 PM
This i have requested already and as said by others is very much needed and look's great. the new phpbb3 released in beta now even has it however the older 2.0+ series dont. Hopefully this will be seen here soon.

I believe the global sticky mod already offers some of this functionality for SMF ;)
Title: Re: Announcements like IPB's
Post by: michaelper22 on June 18, 2006, 01:59:19 PM
Quote from: huwnet on June 18, 2006, 01:45:21 PM
I believe the global sticky mod already offers some of this functionality for SMF ;)
I don't know what that mod does, because I never got it running sucessfully.  I would probably use it if it I could get it applied to my forum.
Title: Re: Announcements like IPB's
Post by: anunlike on June 18, 2006, 04:31:16 PM
I believe the "Global Announcements & Super Sticky" mod was removed along time ago. If it's there, I can't seem to find it.
Title: Re: Announcements like IPB's
Post by: MrTeck on June 20, 2006, 08:04:52 AM
Yes, very usefull!!!
I hope can see it not as mod, integrated within the SMF core.
News fader is fine, but this is for diferent purposes.

:)
Title: Re: Announcements like IPB's
Post by: eriktm on June 20, 2006, 08:21:22 AM
That had been a good feature...
Title: Re: Announcements like IPB's
Post by: nperry on June 20, 2006, 08:24:35 AM
Would love to see this being a feature!
Title: Re: Announcements like IPB's
Post by: H on June 20, 2006, 12:44:06 PM
Quote from: anunlike on June 18, 2006, 04:31:16 PM
I believe the "Global Announcements & Super Sticky" mod was removed along time ago. If it's there, I can't seem to find it.

I believe it was made by Anguz (http://www.simplemachines.org/community/index.php?action=profile;u=76) and is available for download on his site
Title: Re: Announcements like IPB's
Post by: MrTeck on June 21, 2006, 04:55:29 AM
I never found it  :-[
Title: Re: Announcements like IPB's
Post by: JayBachatero on June 22, 2006, 01:22:22 AM
One question.  Who can add global announcements?  Only admin or forum moderator?  Also what is the best way to abbreviate GlobalAnnouncements?
Title: Re: Announcements like IPB's
Post by: michaelper22 on June 22, 2006, 09:14:11 AM
Quote from: JayBachatero on June 22, 2006, 01:22:22 AM
One question.  Who can add global announcements?  Only admin or forum moderator?  Also what is the best way to abbreviate GlobalAnnouncements?
I think that it should be determined by a new permission. That would solve that problem at least. And as for abbreviating it, GlobAnnounce, is that good?
Title: Re: Announcements like IPB's
Post by: JayBachatero on June 22, 2006, 12:27:48 PM
Ok so new permission it it.  I'll give the name abbreviation a shot.
Title: Re: Post on multiple boards with one post...
Post by: windirect on June 27, 2006, 12:32:56 PM
Hi,
I too need Global Announcement and Super Sticky mod please.  ;)
Title: Re: Post on multiple boards with one post...
Post by: Skipdawg on June 27, 2006, 05:06:39 PM
Someone was working on this but I forget who. And have seen nothing further on it for awhile till your post. Would be a great mod or feature.
Title: Re: Post on multiple boards with one post...
Post by: Scubasteve on June 27, 2006, 07:30:31 PM
I had used the supersticky mod before i moved to rc2, it worked great.
Title: Re: Post on multiple boards with one post...
Post by: Jim R on June 27, 2006, 07:35:24 PM
Quote from: Scubasteve on June 27, 2006, 07:30:31 PM
I had used the supersticky mod before i moved to rc2, it worked great.

Does Supersticky work on select forums or just all of them?

It's not really what I was talking about when I started this thread.  I'm not really looking to make big announcements with this feature.  I'm looking to put content in specific positions that SSI then takes in varied directions with varied outputs.
Title: Re: Post on multiple boards with one post...
Post by: Scubasteve on June 27, 2006, 07:52:23 PM
I dont honestly remember
Title: Re: Post on multiple boards with one post...
Post by: JayBachatero on June 27, 2006, 07:55:25 PM
I am working on the Global Announcements mod.
Title: Re: Post on multiple boards with one post...
Post by: Jim R on June 27, 2006, 08:06:52 PM
Quote from: JayBachatero on June 27, 2006, 07:55:25 PM
I am working on the Global Announcements mod.

Can you give me the skinny on how it will work? 

Can I choose the boards it goes to?  Will they be regular posts or something else?

You're a good man.
Title: Re: Post on multiple boards with one post...
Post by: JayBachatero on June 27, 2006, 08:15:49 PM
You can select the boards that they can go to and it will only show them is you are allowed to see that board.  They will not be regular posts.  Members CAN NOT reply to the Global Announcements.  I got the Admin part done.  I need to work on the other stuff.  I am having some problems right now with the permission of who can see the global announcement.  Until I get that working the mod is at a complete stop :(.
Title: Re: Post on multiple boards with one post...
Post by: windirect on June 27, 2006, 09:56:44 PM
Quote from: JayBachatero on June 27, 2006, 07:55:25 PM
I am working on the Global Announcements mod.

Great  :)
Title: Re: Post on multiple boards with one post...
Post by: HecKel on June 29, 2006, 06:10:08 AM
You are working that for RC2 1.1? Can you write some version for 1.0.7?

HecKel
Title: Re: Post on multiple boards with one post...
Post by: JayBachatero on June 29, 2006, 09:44:55 PM
I am working on one for 1.1 RC2.  I would have to be persuaded to do it for 1.0.7 also.  At this point I am supporting the 1.1 line.  There has to be a good reason for me to back port it.
Title: Re: Announcements like IPB's
Post by: HarryWx on July 03, 2006, 04:20:55 PM
Quote from: huwnet on June 18, 2006, 01:45:21 PM
Quote from: HarryWx on June 18, 2006, 01:39:26 PM
This i have requested already and as said by others is very much needed and look's great. the new phpbb3 released in beta now even has it however the older 2.0+ series dont. Hopefully this will be seen here soon.

I believe the global sticky mod already offers some of this functionality for SMF ;)
Yes i am aware of that. My idea is to have it that way in the core of the system ( Come standard with a fresh install of SMF ) instead of a mod.  ;)
Title: Re: Post on multiple boards with one post...
Post by: JayBachatero on July 05, 2006, 12:50:44 AM
Update on this.  Compuart helped me sort out a logic for the permissions and I've made a few advancements on the mod.  I have the admin side all set and done.  I did the MessageIndex also.  Now for the announcements themselves.  Hopefully I can have a beta out by tomorrow if I don't get called in to work.
Title: Re: Announcements like IPB's
Post by: JayBachatero 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.
Title: Re: Announcements like IPB's
Post by: RBH on July 11, 2006, 10:58:54 PM
something real quick jay, when you click the delete button and it asks "are you sure you want to delete?" even if you click cancel it deletes the announcement.

so far i love it and it works just how i was expecting and wanted. thanks! :D
Title: Re: Announcements like IPB's
Post by: etdwh on July 11, 2006, 10:59:30 PM
Jay,

Nice work  :D
This is something really needed in SMF. This replaces the Super Sticky mod, and also helps do what i was trying to do here: http://www.simplemachines.org/community/index.php?topic=97666.0 (http://www.simplemachines.org/community/index.php?topic=97666.0)

On thing i noticed, which happens when i try the Super Stick mod myself, the column sizes are not the same.
It might be because i installed the Sticky First Post mod. Here is how it looks like
(http://i18.photobucket.com/albums/b139/etdwh/globalmod.jpg)

Nice to have:
-A way to preview what has been typed. Im currently composing in a normal post page, and then copying to the announcement mod.

Nice job. Thanks for the mod
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 11, 2006, 11:10:06 PM
Quote
On thing i noticed, which happens when i try the Super Stick mod myself, the column sizes are not the same.
It might be because i installed the Sticky First Post mod. Here is how it looks like
Damn it.  It's been a pain getting those aligned,  I tried the default from the regular message index and it was out of alignment too.  What I have now it aligns good on my PC.  If you can get it to align good let me know what percentaged you used.

Quote
-A way to preview what has been typed. Im currently composing in a normal post page, and then copying to the announcement mod.
I was thinking about this too.  If I do add it I would have to rip it out of SMF's post template since JS is not me.  I will see if I get something done by this weekend.

I'm also thinking about adding the ability to Announce the Global Announcement.  That shouldn't be too hard to do.

Title: Re: Announcements like IPB's
Post by: RBH on July 11, 2006, 11:31:46 PM
this made it look better for me jay.....still a hair off but any other adjustments made it a hair the other way. ???

<td class="catbg3" width="9%" colspan="2"></td>
<td class="catbg3">', $txt[70], '</td>
<td class="catbg3" width="13%">', $txt[109], '</td>
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 11, 2006, 11:36:10 PM
Quote from: RBH on July 11, 2006, 11:31:46 PM
this made it look better for me jay.....still a hair off but any other adjustments made it a hair the other way. ???

<td class="catbg3" width="9%" colspan="2"></td>
<td class="catbg3">', $txt[70], '</td>
<td class="catbg3" width="13%">', $txt[109], '</td>

I'll try this.  Yea when you adjust one side then the other just gets discombobulated.

EDIT:  This seems to be working for me.

<td class="catbg3" width="9%" colspan="2"></td>
<td class="catbg3">', $txt[70], '</td>
<td class="catbg3" width="14%">', $txt[109], '</td>
Title: Re: Announcements like IPB's
Post by: PrizeLive.com on July 12, 2006, 12:08:41 AM
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.......!
Title: Re: Announcements like IPB's
Post by: 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.
Title: Re: Announcements like IPB's
Post by: PrizeLive.com on July 12, 2006, 12:16:37 AM
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?
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 12, 2006, 12:49:36 AM
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.
Title: Re: Announcements like IPB's
Post by: JayBachatero 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.
Title: Re: Announcements like IPB's
Post by: PrizeLive.com on July 12, 2006, 01:10:39 AM
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?
Title: Re: Announcements like IPB's
Post by: RBH on July 12, 2006, 01:13:46 AM
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. ;)
Title: Re: Announcements like IPB's
Post by: JayBachatero 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.

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).
Title: Re: Announcements like IPB's
Post by: PrizeLive.com on July 12, 2006, 01:29:10 AM
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
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 13, 2006, 02:08:09 AM
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);
.
Title: Re: Announcements like IPB's
Post by: ghostfreak on July 18, 2006, 05:31:46 AM
Can't wait to test the next release :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 18, 2006, 11:12:55 AM
Hopefully it should be out by next week.
Title: Re: Announcements like IPB's
Post by: ladyshanae on July 22, 2006, 08:27:54 AM
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 :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 23, 2006, 01:51:31 AM
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.
Title: Re: Announcements like IPB's
Post by: HecKel on July 23, 2006, 12:30:20 PM
Where is the last version of this mod? I want to try this :)

HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 23, 2006, 07:17:28 PM
This is the post.  There are a few changes that are not there.
http://www.simplemachines.org/community/index.php?topic=93129.msg641425#msg641425
Title: Re: Announcements like IPB's
Post by: HecKel on July 23, 2006, 07:42:37 PM
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
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 23, 2006, 07:47:15 PM
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.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 23, 2006, 08:14:04 PM
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.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 23, 2006, 10:17:22 PM
+ 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. 
Title: Re: Announcements like IPB's
Post by: etdwh on July 23, 2006, 11:18:43 PM
Jay,

Is it possible to order the announcements?
Eg, i would like the "rules" announcements to be first and shown in all boards, but a second, "post in this format" announcement to appear second in only 2 boards.
Currently, its "last in-first displayed"..at least thats what i see. Most simple change i can think of is to make the first announcement appear first. Just a thought...
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 24, 2006, 12:04:16 AM
You can change it in MessageIndex.php

Code (find) Select

ORDER BY ga.time DESC


Code (replace) Select

ORDER BY ga.ID_GA ASC
Title: Re: Announcements like IPB's
Post by: GameCube on July 24, 2006, 09:23:40 AM
can you show me the link to this mod?
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 24, 2006, 02:27:35 PM
http://www.simplemachines.org/community/index.php?topic=93129.msg641425#msg641425
Title: Re: Announcements like IPB's
Post by: Vinspire on July 25, 2006, 03:02:12 PM
Awesome features. Thanks a lot Jay :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 25, 2006, 03:03:13 PM
Expect another beta out tonight.  I'm heading to work now.
Title: Re: Announcements like IPB's
Post by: PrizeLive.com on July 25, 2006, 03:10:13 PM
Quote from: Jay The Code Monkey on July 25, 2006, 03:03:13 PM
Expect another beta out tonight.  I'm heading to work now.

Sounds good. Thanks Jay!
Title: Re: Announcements like IPB's
Post by: Vinspire on July 25, 2006, 03:10:32 PM
Quote from: Jay The Code Monkey on July 25, 2006, 03:03:13 PM
Expect another beta out tonight.  I'm heading to work now.

I just installed it a while ago ... But a better beta would be awesome.

Anyway, Jay ... I couldn't find the code to edit this mod to get it working with Helios Theme :(
Title: Re: Announcements like IPB's
Post by: HecKel on July 25, 2006, 03:34:38 PM
Quote from: Jay The Code Monkey on July 25, 2006, 03:03:13 PM
Expect another beta out tonight.  I'm heading to work now.

awsome :D I can't wait to try this new release :D

HecKel
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 25, 2006, 06:53:05 PM
me too, looking forward.....
^^  gambate!!
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 12:41:12 AM
Ok here it is as promissed.

Uninstall the other version before installing this one.

+ 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)

I still need to add the ability to preview the announcement.  Another hting is the ability to sort the announcements on a specific order.

I think that is all for now.  I might have missed a few other changes.
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 05:34:56 AM
Thanks to Jay...

the GA looks greats, installed smoothly and layout is very nice! have a look the following photo...
(http://i13.photobucket.com/albums/a286/fallenangel4/GB.jpg)

thanks ya!

*oh yes, i dont know if there's some small bug or what...
when i click add GA , the IE will said there's an error occurred as you see in the following, does it happen to someone else too? or it is my own IE problem?  please advise me how to overcome this...thanks!

(http://i13.photobucket.com/albums/a286/fallenangel4/bugs.jpg)
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 07:44:52 AM
oh no... :'(
it didnt work well for me... i still cannot type chinese word...
also why the GA is appear below the childboard?
I thought it will be like the 'super sticky' , as a thread appearing on the top of the board, not being its own board alone....

(http://i13.photobucket.com/albums/a286/fallenangel4/GBpost.jpg)

anyway, still appreciate very much... also i really like the layout and the function in the GA control panel... hope all the problem can be fixed soon....

thanksssss
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 01:10:52 PM
k_4_kelly can you please post the message here in chinese?  I want to do some testing.  I will look into the js error.

EDIT:  I don't see an error in the JS Console.  Can you copy and paste the error here?
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 01:52:31 PM
k_4_kelly upload this file to Source dir.  You will have to add the chinese announcements again.
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 02:27:01 PM
Quote from: Jay The Code Monkey on July 26, 2006, 01:10:52 PM
k_4_kelly can you please post the message here in Chinese?  I want to do some testing.  I will look into the js error.

EDIT:  I don't see an error in the JS Console.  Can you copy and paste the error here?


Hello Jay,
thanks for your reply.  the Chinese word i was trying to type is as following and the meaning is about the 'global board rules and the renewed date!'

[必閱]Mywalker 人在英國論壇大 版規與原則 (28 May 2006 更新)

the error of the JS console is:
(http://i13.photobucket.com/albums/a286/fallenangel4/JSerror.jpg)

cos i m using print screen, so the message in the pop up window cannot be shown
however, i translate to English, and the meaning is roughly as below:

Line: 332
Character:6
Error: Must have type, string or number
Code: 0
URL: *as you see from the photo above*

)))Thanks!(((

Quoteupload this file to Source dir.  You will have to add the chinese announcements again.
I will try it now

thanks~~



Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 02:33:33 PM
Quote from: Jay The Code Monkey on July 26, 2006, 01:52:31 PM
k_4_kelly upload this file to Source dir.  You will have to add the chinese announcements again.

i uploaded the file and tried already,
when i click add GA after i typed all the message,

the error occurred:

Fatal error: Call to undefined function: () in /home/mywalker/public_html/forum/Sources/GlobalAnnouncementsAdmin.php on line 208
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 02:34:20 PM
Do you get the same error when making a post in the Post screen not quick reply?

Also I know what is causing the UTF-8 errors.  Not sure how to fix it if the file I gav eoyu doesn't work.  For some reason $func is not getting passed over.  I made it a global also.  Works on my test site but not on another site.

EDIT:  Damnnnnnnnn it.  Need to look for a fix.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 02:36:42 PM
Ok on the mean time change

Code (find GlobalAnnouncementsAdmin.php) Select

$_POST['subject'] = strtr($func['htmlspecialchars']($_POST['subject'], ENT_QUOTES), array("\r" => '', "\n" => '', "\t" => ''));
$_POST['body'] = $func['htmlspecialchars']($_POST['body'], ENT_QUOTES);


Code (replace) Select

$_POST['subject'] = strtr(htmlspecialchars($_POST['subject'], ENT_QUOTES, 'UTF-8'), array("\r" => '', "\n" => '', "\t" => ''));
$_POST['body'] = htmlspecialchars($_POST['body'], ENT_QUOTES, 'UTF-8');


Find and replace twice.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 03:00:48 PM
Ok forget that.  Use this file
Title: Re: Announcements like IPB's
Post by: HecKel on July 26, 2006, 03:07:41 PM
Hi!

I've got this error when I tried to install this last release...

(http://img108.imageshack.us/img108/7078/errorvx4.th.jpg) (http://img108.imageshack.us/my.php?image=errorvx4.jpg)

My forum is in Portuguese, só the (bad)translation is: Error on modification

How the error is on install.xml I don't known what could be...

HecKel
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 04:35:20 PM
Quote from: Jay The Code Monkey on July 26, 2006, 03:00:48 PM
Ok forget that.  Use this file

Hello Jay,

I have uploded the second file u attached
and it works great now! the chinese word is appearing correctly now!  :) thanks a lot
see the photos:

(http://i13.photobucket.com/albums/a286/fallenangel4/GAfix.jpg)

(http://i13.photobucket.com/albums/a286/fallenangel4/GApost.jpg)
Title: Re: Announcements like IPB's
Post by: K_4_kelly on July 26, 2006, 05:06:56 PM
QuoteDo you get the same error when making a post in the Post screen not quick reply?

sorry, i just saw your question and notice the problem..
yes, there's no quick reply function and even the reply button in the post...

haha, another headache for you  ;)

------
oh yes, i tried the functions, and there's the check list... hope can have the fully working GA mod soon^_^
i dont know how to write a mod, this is only what i can do, hope it helps ^^ thx anyway!

+ Added entries for Who's Online. (Who.php, Modifications.english.php) DONT KNOW
+ Added BBC and Smileys to template. (Subs-GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php, GlobalAnnouncementsAdmin.php) YES
+ Added status indicator to admin page to indicated if mod is disabled or not. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php)YES
+ Added ability to quick enable/disable Global Announcement. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php) YES
+ Added ability to send a newsletter for Global Announcement. (ManageNews.php, GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php) NONE
+ Added spellcheck support. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php) NONE
+ Added a "preview" link.  This will link to the actual announcement.  The preview feature is still not in. (GlobalAnnouncementsAdmin.php, GlobalAnnouncementsAdmin.template.php) YES


Title: Re: Announcements like IPB's
Post by: JayBachatero on July 26, 2006, 10:02:52 PM
Heckel what package are you using?  Use this one.

K_4_kelly,  The question about errors with posting was because the post page uses $func but later on I found out that I was using something thst is only in RC3.  That's whe happens when you use CVS build :P.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 27, 2006, 02:36:34 PM
Ok I just found out that the spellcheck support was not working dues to a few things that I missed.  It will be fixed inthe next release 0-3.  Not sure when that will be since I still have to add the order stuff.  Hopefully I can get it out by this weekend.
Title: Re: Announcements like IPB's
Post by: HecKel on July 27, 2006, 04:35:59 PM
Hi!

Jay, the error continue here...

I tried to perform the install.xml and I find that this operation(in Subs.php) fails:

<operation>
<search position="before"><![CDATA[
if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}
]]></search>
<add><![CDATA[

//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>',
),
);
}
]]></add>
</operation>


And I find that $modSettings['modlog_enabled'] don't exist in my Subs.php..., any idea?

HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 27, 2006, 11:17:21 PM
Ummm weird.   You are on RC2 right?
Title: Re: Announcements like IPB's
Post by: HecKel on July 28, 2006, 08:36:59 AM
Yes..., I upgraded last week.

HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 28, 2006, 10:17:16 AM
Can you post up the Subs.php file?
Title: Re: Announcements like IPB's
Post by: HecKel on July 28, 2006, 02:39:42 PM
http://www.nomorepasting.com/paste.php?pasteID=65891

You can see here.

Tnks, HecKel
Title: Re: Announcements like IPB's
Post by: colleenbbr on July 30, 2006, 12:28:12 PM
I was just browsing this forum and came across this post. I just wanted to say YOU ROCK Jay! Thank you for another awesome mod :D
Title: Re: Announcements like IPB's
Post by: colleenbbr on July 30, 2006, 11:03:08 PM
Ok, I *thought* this installed properly. It shows up just as you posted here in my admin section, yet when I add an announcement it is not showing up on my forums? I checked and it is enabled...am I missing something somewhere in my cpanel maybe?

Any advice would be greatly appreciated :D
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 01:22:47 AM
What theme are you using?  If your theme has a custm MessageIndex.template.php you need to edit that to add the theme stuff to it.
Title: Re: Announcements like IPB's
Post by: HecKel on July 31, 2006, 05:29:32 AM
Jay, any ideia about my problem?

Sorry be boring :(

HecKel
Title: Re: Announcements like IPB's
Post by: colleenbbr on July 31, 2006, 09:20:28 AM
Thanks for the reply :D

I am using the Classic theme. Can you tell me what I need to add/change?

Thanks, you rock!
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 11:55:43 AM
Sorry about that HecKel.  I totally forgot about that.  I looked at the file before I went to work and forgot to reply.  The file is imcomplete.  Just email it to me.  [email protected]

lisaTFG in MessageIndex.template.php for the classic theme.
Code (find) Select

if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<table width="100%" cellpadding="6" cellspacing="0" border="0" class="tborder" style="border-width: 1px 1px 0 1px;">
<tr>
<td align="left" class="catbg" width="100%" height="24">
<span class="smalltext">', $context['description'], '</span>
</td>
</tr>
</table>';
}


Code (add after) Select

// 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 />';
}

Title: Re: Announcements like IPB's
Post by: colleenbbr on July 31, 2006, 12:12:49 PM
Thank you so much Jay!!! It is working perfectly now, you are the best!!
Title: Re: Announcements like IPB's
Post by: HecKel on July 31, 2006, 12:49:59 PM
I allready email you my Subs.php, my real name is Gil Sousa, so that's not spam :p

HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 03:45:33 PM
Actually you posted he file to a pastebin site :P.  I'll look at it in a bit the one you sent me.
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 03:49:16 PM
HecKel I just looked at the Source file and everything looks ok.  Not sure why it's not installing.  Can you PM me a test admin account?
Title: Re: Announcements like IPB's
Post by: Nordoelum on July 31, 2006, 06:14:15 PM
This looks like an great mod for SMF. But really, this should be implanted into SMF itself. And why would someone even want to email an board announcment? Why do even have an board announcement when you can just send out an email? That is the reason in the first place. I consider board announcment as an litle info post, where you might post some guidelines for how to not get cracked, or something like that. With email notifications, you can send some news about that the board is back online after an upgrade or cracked.

You can also use board announcement when you want to inform about some new features after an upgrade or something.

Even though, i give this mod my two cent.

Birger :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 06:22:34 PM
Well I've never used a global announcement feature until wrote this mod so what ever feature request that I got I added it.  Since the ability to email members was asked for I added it.  It was just a small change for it since I used SMF's built in feature.

Is everything else good though?
Title: Re: Announcements like IPB's
Post by: HecKel on July 31, 2006, 06:24:28 PM
Quote from: Jay The Code Monkey on July 31, 2006, 03:49:16 PM
HecKel I just looked at the Source file and everything looks ok.  Not sure why it's not installing.  Can you PM me a test admin account?

My forum is in Portuguese, do you want an admin account there, thats right? Ok, I'll create one and then I PM you with the forum url and the account settings :)

tnks, HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 06:26:10 PM
Yea an admin account there.  Also i guess you will have to translate the language file but I suggest you wait till final.
Title: Re: Announcements like IPB's
Post by: HecKel on July 31, 2006, 06:29:04 PM
PM sent :)

Yes, I will translate and than I put here the correct translation :)

HecKel
Title: Re: Announcements like IPB's
Post by: JayBachatero on July 31, 2006, 07:08:05 PM
Responded to PM. 

Oh that would be great if you provided the translated strings. :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 02:12:18 AM
It's that time again.  Remember to uninstall the mod if you had it installed before.  If all goes well this will be the last beta before final.

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)

EDIT:  If you had a previous version installed please run this query in phpMyAdmin.

ALTER TABLE {$db_prefix}global_announcements
ADD gaOrder
INT(10) UNSIGNED NOT NULL DEFAULT '999'

Replace {$db_prefix} with your prefix.  By default it's smf_

EDIT2: Forgot an apostrophe in a query.  Fresh file uploaded.  If you want to do a manual change do.
In GlobalAnnouncementsAdmin.php
Code (find) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder])", __FILE__, __LINE__);

Code (replace) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder]')", __FILE__, __LINE__);


EDIT 3:  Ok I repackaged the mod and added the above fixes.  So you wont have to run the query if you install this version.  Also fixed an undefined index.  Incompatibility with another mod.  More details on that on later on.
Title: Re: Announcements like IPB's
Post by: TLM on August 01, 2006, 02:35:01 AM
(2:33:25 AM) *******:      ALTER TABLE {$db_prefix}global_announcements
      ADD gaOrder
         INT(10) UNSIGNED NOT NULL DEFAULT '999'
(2:33:38 AM) *******: can you please reply and tell them to run that query after they install it
(2:33:45 AM) *******: i closed the browser

Just the messenger, been working with Jay on this sorta, so again, follow his words, im just the messenger.  He says he will fix that flaw tommarow.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 05:36:12 AM
I'm getting the following error when I try to add a ga (using your version 0.3 on SMF RC2 default theme)

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0)' at line 3
Bestand: /usr/local/psa/home/vhosts/waaromgod.nl/httpdocs/newforum/Sources/GlobalAnnouncementsAdmin.php
Regel: 233
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 10:34:44 AM
ikbenivo is this a fresh install of you have the mod installed before?

TLM thanks for posting the message.  Updated post.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 10:37:40 AM
a fresh install...
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 10:43:26 AM
Ok in GlobalAnnouncementsAdmin.php
Code (find) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder])", __FILE__, __LINE__);

Code (replace) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder]')", __FILE__, __LINE__);


That's what happens when you try to rush somehting out >_<.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 11:06:59 AM
works. Thanks mate!
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 11:18:02 AM
Ok good.  I updated the package above to reflect on this fix.  Please report any other issues.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 11:35:22 AM
I will, thanks for this great mod.
Is it also possible to make excisting topics global announcements?
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 11:39:16 AM
That would be more of a Super Sticky mod.  Something that I will look into and add to my todo list.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 11:41:24 AM
that would be awesome! A lot of users are looking for such a mod...
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 11:49:43 AM
That would have to wait a month or so though since I already have my plate full.
Title: Re: Announcements like IPB's
Post by: ikbenivo on August 01, 2006, 12:02:17 PM
:D
I can wait, it's your free time mate! They have to wait!
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 12:05:36 PM
On the mean time you can do more testing with this mod so that I can get final out soon :P.
Title: Re: Announcements like IPB's
Post by: Vinspire on August 01, 2006, 01:36:22 PM
Jay, i've gotten this error when i go into the sub-board

Unknown column 'ga.gaOrder' in 'field list'
File: /home/korobox/public_html/forum/Sources/MessageIndex.php
Line: 675


I am using SMF 1.1 RC 2 and this error occur only with the latest GlobalAnnouncements_0-3a.tar mod.
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 02:05:25 PM
Umm that error is caused by not running the query that I provided.  I fixed this in the 0-3b version.  Install that one or run the query.
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 02:36:13 PM
Also something that I would appreciate is it you check the help messages and so on.  I suck at explaining things at time :P.
Title: Re: Announcements like IPB's
Post by: Vinspire on August 01, 2006, 06:13:42 PM
Quote from: Jay The Code Monkey on August 01, 2006, 02:05:25 PM
Umm that error is caused by not running the query that I provided.  I fixed this in the 0-3b version.  Install that one or run the query.
I did run a query that you provide in phpmyadmin before i post up the error but it gave me an error too .... :P

Anyway, maybe i will try again later or maybe just use the 0.2b till the final one is out :)

Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 10:34:07 PM
Can you please PM me an admin account for the forum and phpMyAdmin access.
Title: Re: Announcements like IPB's
Post by: Vinspire on August 01, 2006, 11:26:56 PM
Quote from: Jay The Code Monkey on August 01, 2006, 10:34:07 PM
Can you please PM me an admin account for the forum and phpMyAdmin access.
Nvm Jay ... I think i will just wait for the final release as i am not in a rush for this mod :P

Oh ... Thanks for the offer sir :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 01, 2006, 11:39:17 PM
Umm just check if the column was added.  is best to check now since the mod uninstall leaves the tables and data.
Title: Re: Announcements like IPB's
Post by: Vinspire on August 03, 2006, 03:47:23 AM
Quote from: Jay The Code Monkey on August 01, 2006, 11:39:17 PM
Umm just check if the column was added.  is best to check now since the mod uninstall leaves the tables and data.

Jay, i tried ur code but it came out error that it couldn't find the query but i tried installing GlobalAnnouncements_0-3b.tar.gz and everything seems to work very fine but i dont understand ur instruction on this statement.

EDIT2: Forgot an apostrophe in a query.  Fresh file uploaded.  If you want to do a manual change do.
In GlobalAnnouncementsAdmin.php
Code (find) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder])", __FILE__, __LINE__);

Code (replace) Select

INSERT INTO {$db_prefix}global_announcements
(ID_MEMBER, time, icon, subject, body, enabled, countViews, gaOrder)
VALUES ('$ID_MEMBER'," . time() . ", '$_POST[icon]', '$_POST[subject]', '$_POST[body]', '$_POST[enabled]', '$_POST[countViews]', '$_POST[gaOrder]')", __FILE__, __LINE__);
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 03, 2006, 12:56:00 PM
If you have 0.3b installed then you're good.  That was an error in 0.3.  I had '$_POST[gaOrder]) instead of '$_POST[gaOrder]')
Title: Re: Announcements like IPB's
Post by: Vinspire on August 03, 2006, 01:45:40 PM
Quote from: Jay The Code Monkey on August 03, 2006, 12:56:00 PM
If you have 0.3b installed then you're good.  That was an error in 0.3.  I had '$_POST[gaOrder]) instead of '$_POST[gaOrder]')

I didnt see any error ... Everything work smoothly.
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 03, 2006, 01:58:34 PM
Ok so that's good.  Next release should work fine for you also.  If you ahve any errors in error log just let me know.
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 07, 2006, 12:20:58 AM
Ok here is another release.  This one is just one feature addition and some code cleaning.

Ver 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)

Same as before remove other mod then install this one.  If everything goes well this will be the last release before final.  Aka 1.0
Title: Re: Announcements like IPB's
Post by: Vinspire on August 07, 2006, 12:30:21 AM
Jay, is it possible to make it like a pinned topic where we could have more than 1 post in the global announcement thread ?
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 07, 2006, 11:24:24 AM
Vinspire can you please explain this a bit more?  Also if it does get added it wont be any time soon.  I reached a feature frozen state and just doing bug testing and code cleaning for now.  Have a few other mods that I want to do ;).
Title: Re: Announcements like IPB's
Post by: Vinspire on August 07, 2006, 11:29:22 AM
Quote from: Jay The Code Monkey on August 07, 2006, 11:24:24 AM
Vinspire can you please explain this a bit more?  Also if it does get added it wont be any time soon.  I reached a feature frozen state and just doing bug testing and code cleaning for now.  Have a few other mods that I want to do ;).

What i mean is ... Is it possible to add more post in the global announcement thread ?

3 separate post in 1 global announcement thread or smthing like that coz sometimes the thread might contain a long infos you know ?

Example : The forum rules & regulations :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 07, 2006, 12:13:53 PM
Oh ok I got it now.  At the moment no it's not possible.  When ever I have time AFTER final is released I'll look into it and see what I can do since it would require template changes and so on.
Title: Re: Announcements like IPB's
Post by: ghostfreak on August 10, 2006, 06:12:59 AM
What would the code changes if someone wanted this cod in a custom template?
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 10, 2006, 12:18:39 PM
Ghostfreak take a look at this post.
http://www.simplemachines.org/community/index.php?topic=93129.msg663800#msg663800
Title: Re: Announcements like IPB's
Post by: Cool Surfer on August 13, 2006, 02:35:29 AM
will this feature be there is 1.1rc3 ?  :P
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 14, 2006, 01:04:40 AM
Quote from: Cool Surfer on August 13, 2006, 02:35:29 AM
will this feature be there is 1.1rc3 ?  :P
Nope.
Title: Re: Announcements like IPB's
Post by: SleePy on August 14, 2006, 06:53:11 PM
Wow.. Cool jay.

I just found this..
I want it but tested it on one of my 20 smf test sites (dont ask).
Everything installs ok but I found a bug..
If you add a GA and hit preview before adding it it removes the subject field and seems to deselect the selected boards..
That is the only bug I see right now.. Ill let you know more as I test it.
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 14, 2006, 09:01:36 PM
Umm I thought I fixed that.  I'm going to look into it when I get a chance.
Title: Re: Announcements like IPB's
Post by: K_4_kelly on August 16, 2006, 02:57:46 AM
good job!!..
i installed the new version 1.0
installed smoothly without error and works like a charm...

thanks ya! :)
Title: Re: Announcements like IPB's
Post by: JayBachatero on August 16, 2006, 03:07:23 AM
Glad to hear everything went fine.  All new discussion should go on the mods topic.
http://mods.simplemachines.org/index.php?mod=419