Announcements like IPB's

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

Previous topic - Next topic

Nordoelum

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

JayBachatero

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?
Follow me on Twitter

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

HecKel

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

Yea an admin account there.  Also i guess you will have to translate the language file but I suggest you wait till final.
Follow me on Twitter

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

HecKel

PM sent :)

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

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

Responded to PM. 

Oh that would be great if you provided the translated strings. :)
Follow me on Twitter

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

JayBachatero

#106
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.
Follow me on Twitter

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

TLM

(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.

ikbenivo

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

JayBachatero

ikbenivo is this a fresh install of you have the mod installed before?

TLM thanks for posting the message.  Updated post.
Follow me on Twitter

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

ikbenivo


JayBachatero

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 >_<.
Follow me on Twitter

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

ikbenivo


JayBachatero

Ok good.  I updated the package above to reflect on this fix.  Please report any other issues.
Follow me on Twitter

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

ikbenivo

I will, thanks for this great mod.
Is it also possible to make excisting topics global announcements?

JayBachatero

That would be more of a Super Sticky mod.  Something that I will look into and add to my todo list.
Follow me on Twitter

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

ikbenivo

that would be awesome! A lot of users are looking for such a mod...

JayBachatero

That would have to wait a month or so though since I already have my plate full.
Follow me on Twitter

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

ikbenivo

:D
I can wait, it's your free time mate! They have to wait!

JayBachatero

On the mean time you can do more testing with this mod so that I can get final out soon :P.
Follow me on Twitter

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

Advertisement: