Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Mick. on October 28, 2008, 01:01:57 PM

Title: Posting Announcement
Post by: Mick. on October 28, 2008, 01:01:57 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=1484)

Posting Announcement
By Mick G., originally by Nas.

www.idesignSMF.com


(https://www.idesignsmf.com/images/idesignadvert.png) (https://www.idesignsmf.com)

(For SMF 2.0)


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1484) | Comment On This Mod (http://www.simplemachines.org/community/index.php?topic=270952.0)

Introduction
This mod allows you to spesify a message which will be displayed when your users are posting.
Message is edited in:
SMF 2.0: Admin > Configuration > Modifications > Miscellaneous

Tested
Tested on fresh installation of 2.0

Languages
o English
o Swedish
o Brazilian
I welcome new translation. Post them in the mods topic.

Support
If you need support whit this mod, use the modification thread.

Changelog
Updated to 2.0.17 on Jan 24/2021
December 2010
o Updated to RC4.
2.zip 31st March 2010
o Fixed scroller bar issue while posting.
o Added the warning message into a RED box.
1.1.5 13th June
o Fixed the "File not found"-errors on brazilian and swedish language.
o Fixed the test failed error on Post.template.php.
o Preparing for new functionallity: Different announcements on different boards. (Next version)
o Preparing for new functionallity: Make the icon infront of the announcement optional. (Next version)
1.1.4 27th May 2009
o BBC can now be used within the announcement.
1.1.3.2 23rd May 2009
o Now supports SMF 2.0 RC1-1.
1.1.3.1 30th Mars 2009
o A simple typo made the 2.0 package unable to parse and install.
1.1.3 17th Mars 2009
o Now support SMF 2.0 RC1.
1.1.2 29th October 2008
o Added brazilian language, thanks to Costa (http://www.simplemachines.org/community/index.php?action=profile;u=169940).
1.1.1 28th October 2008
o Fixed a small mistake in the installation for SMF 1.1.6.
1.1 28th October 2008
o Added support for SMF 1.1.6
o Added swedish language
1.0 25th October 2008
o Mod was submitted to the SMF Mod Site.
Title: Re: Posting Announcement
Post by: edi67 on October 28, 2008, 01:12:06 PM
seems to be intersting thx
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 01:34:03 PM
Excellent Mod, going to install now,

Please add a feature to allow to add different messages to different boards/childboards,

reason why i have one or two boards i would like a message to appear and not on other boards.

Another fab mod  :D

Thanks,
Mathew
Title: Re: Posting Announcement
Post by: Sudhakar Arjunan on October 28, 2008, 01:35:44 PM
A Very Useful mod, where no of post were high.

Thank you Nascar, for this cool mod.
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 02:00:07 PM
Hi Nascar,

I am confused,

I installed via package manager and it failed on post.template.php so i let the installation continue and i made the edit manually, strangely i found everything rite away.

anyway it said on install, it could not find a file called sources/ManageSettings.php, but just checked and that must be fore SMF 2 beta as i checked the fresh install of SMF 1.1.6 and that file does not exist.

Basically i checked all files and everything seems ok but it not appearing in admin > Feature & Settings > Basic Features

I am comfused, i checked all files and package manager seemed to have added them correctly ???

UPDATE:

I am very confused now, i uninstalled, reinstalled via package manager, edited post.template.php as PM seems to not find code for some reason but no problem as i manually edited, still not showing, it like if something is missing

Mathew
Title: Re: Posting Announcement
Post by: jossanaijr on October 28, 2008, 03:45:53 PM
Quoteanyway it said on install, it could not find a file called sources/ManageSettings.php, but just checked and that must be fore SMF 2 beta as i checked the fresh install of SMF 1.1.6 and that file does not exist.
This error occurs to me too.
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 03:48:09 PM
Quote from: jossanaijr on October 28, 2008, 03:45:53 PM
Quoteanyway it said on install, it could not find a file called sources/ManageSettings.php, but just checked and that must be fore SMF 2 beta as i checked the fresh install of SMF 1.1.6 and that file does not exist.
This error occurs to me too.

dont worry about that as it wont find it as it for SMF 2 so it ok to let it say file not found, problem i am having is nothing shows in admin.  :-\

Is anything showing in your admin ???

Mathew
Title: Re: Posting Announcement
Post by: jossanaijr on October 28, 2008, 03:51:54 PM
I did not installe it yet because I also have a
Execute Modification   ./Themes/default/Post.template.php   Test failed

and I cannot edit the php right now.
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 04:00:55 PM
mmm, what you mean you cannot edit it rite now?

if you not sure upload and i will try and add the code for you, i added it on mine no problem, package manager said error on that file for me aswell but when i manually did a find i found it immediately.

Mathew
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 28, 2008, 04:05:00 PM
If you're using SMF 1.1.6 the ManageSettings should'nt show up. Only ModSettinhs.php should.
Please attach your Modifications.english.php, ModSettings.php and post.template.php.
Both of you.
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 04:12:37 PM
Quote from: Nascar on October 28, 2008, 04:05:00 PM
If you're using SMF 1.1.6 the ManageSettings should'nt show up. Only ModSettinhs.php should.
Please attach your Modifications.english.php, ModSettings.php and post.template.php.
Both of you.

mmm, nothing about modsettings.php on the install guide here for SMF 1.1.6 : http://custom.simplemachines.org/mods/index.php?mod=1484

Also pacakge manager shows nothing about mod settings either. I think you may have forgot something.

Both post.template.php and modifications.english.php is fine, but as i said nothing in package manager when installing and in the install guide about modsettings.php

Mathew

Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 28, 2008, 04:15:33 PM
My bad.  imade the 1.1.6 version based on the 2.0 version and forgot to edit a few parts of the installation.
Give me 15 minutes..
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 04:17:02 PM
Quote from: Nascar on October 28, 2008, 04:15:33 PM
My bad.  imade the 1.1.6 version based on the 2.0 version and forgot to edit a few parts of the installation.
Give me 15 minutes..

lol, i knew it was not me as it was so simple to follow. lol.

Mathew
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 28, 2008, 04:20:38 PM
Try the new package.
If that don't work, call me muddle-headed and send me to jail...
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 04:31:05 PM
Rite, all done apart from mod settings, i do have a signature mod installed and i can't find the code it asks to find so think it because of other mods.

would you please do the edit for me?

attached is the modsettings.php file

Thanks,
Mathew
Title: Re: Posting Announcement
Post by: jossanaijr on October 28, 2008, 06:47:37 PM
I cannot find the code too in ModSettings.php.
Tried to put in the end but got an error.
File attached.
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 07:06:15 PM
Quote from: jossanaijr on October 28, 2008, 06:47:37 PM
I cannot find the code too in ModSettings.php.
Tried to put in the end but got an error.
File attached.

Hi,

Try these two, make sure you keep a backup of original, it is hit or miss but it may work, all i done was find some code relating to signature settings and i then added the code that is asks to add.

The second file has a 1 on it so take the 1 off before uploading, try them both and let me know.

Mathew

He will come to our rescue soon if no luck, i have no luck with mine but not tried what i tried on yours, will do in a min,
Title: Re: Posting Announcement
Post by: jossanaijr on October 28, 2008, 07:08:11 PM
Is yours working fine?
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 07:09:30 PM
Quote from: jossanaijr on October 28, 2008, 07:08:11 PM
Is yours working fine?

DOH! does not work, will have to wait for Nascara to do edit for us.

Mathew
Title: Re: Posting Announcement
Post by: jossanaijr on October 28, 2008, 07:15:38 PM
My problem is that I have almost 100 mods installed many of them with changes in modsettings.php
Title: Re: Posting Announcement
Post by: genieuk on October 28, 2008, 07:19:45 PM
Just updated post above,

same here so many mods and edits in that file, i did notice you had alot of mods installed i have 1155 lines of code in mine  :o

Mathew
Title: Re: Posting Announcement
Post by: Nibogo on October 28, 2008, 08:06:04 PM
Nascar maybe you can add an option to show the announce for certain groups
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 29, 2008, 01:46:14 AM
geneieuk
Use the file called ModSettings(3).php.

jossanaijr
Use the file called ModSettings(4).php.

NIBOGO
That would be possible.


{Nas}
Title: Re: Posting Announcement
Post by: islam2hamy on October 29, 2008, 01:47:33 AM
thank you for the mod  ;D

Quote from: NIBOGO on October 28, 2008, 08:06:04 PM
Nascar maybe you can add an option to show the announce for certain groups

that is good idea

i translate it into Arabic and Arabic-utf8
Title: Re: Posting Announcement
Post by: edi67 on October 29, 2008, 03:45:06 AM
Quote from: NIBOGO on October 28, 2008, 08:06:04 PM
Nascar maybe you can add an option to show the announce for certain groups

will be good addition ;)
Title: Re: Posting Announcement
Post by: forodecano on October 29, 2008, 04:02:37 AM
I have translated this mod to spanish.

The file is attached with this message.



Title: Re: Posting Announcement
Post by: jossanaijr on October 29, 2008, 04:56:25 AM
Quote from: Nascar on October 29, 2008, 01:46:14 AM

jossanaijr
Use the file called ModSettings(4).php.

From where?
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 06:08:52 AM
Quote from: Nascar on October 29, 2008, 01:46:14 AM
geneieuk
Use the file called ModSettings(3).php.
{Nas}

mmm, where is modsettings(3).php?

maybe you forgot to upload when making your post,

Thanks
Mathew
Title: Re: Posting Announcement
Post by: Costa on October 29, 2008, 08:47:54 AM
Translation to brazilian,


// Start Posting Announcement mod by Nascar
$helptxt['enable_announcement'] = 'Você quer mostrar uma mensagem no topo da caixa de resposta? <div class="smalltext">exe.: um aviso para seguir as regras</div><br />';
$helptxt['text_announcement'] = 'Mensagem para mostrar aos membros quando vão postar. Pode ser m aviso sobre as regras ou similar. <div class="smalltext">BBC não funciona, só HTML.</div><br />';
// End Posting Announcement mod by Nascar



// Start Posting Announcement mod by Nascar
$txt['enable_announcement']='Mostrar uma núncio no topo da caixa de resposta';
$txt['text_announcement']='Anúncio a mostrar <div class="smalltext">BBC não funciona, só HTML.</div>';
// End Posting Announcement mod by Nascar


Congrats Nascar, it's a very interesting mod  ;D

Farewell
-[Costa]
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 29, 2008, 09:28:55 AM
I really have to many projects going on at one time.
here's the files...


Thanks for the translations, Costa!
Title: Re: Posting Announcement
Post by: jossanaijr on October 29, 2008, 09:41:15 AM
Quote from: Nascar on October 29, 2008, 09:28:55 AM
I really have to many projects going on at one time.
here's the files...


Thanks for the translations, Costa!

Working.  Thank you!


Quote from: NIBOGO on October 28, 2008, 08:06:04 PM
Nascar maybe you can add an option to show the announce for certain groups

And perhaps different announces to different membergroups...
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 09:44:46 AM
Thank You!

One thing, look at attached image, the square box image thingy is not by side of the text it above it,

What do i do to put left hand side of text like in your sample images on mod download page?

Thank you,
Mathew
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 29, 2008, 09:46:30 AM
First, make sure you haven't added a <br> when writing the announcement.
Then, attach Post.template.php.
Then, have a cookie and wait...
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 09:53:27 AM
Quote from: Nascar on October 29, 2008, 09:46:30 AM
First, make sure you haven't added a <br> when writing the announcement.
Then, attach Post.template.php.
Then, have a cookie and wait...

Hi, have not added a <br>

Here it is

I did check the file myself and noticed <br> etc in there and i was going to remove but incase i cause something else to go wrong thought i would add it for you to edit.

Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 11:22:19 AM
is there a problem somewhere in the file?

Mathew
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 29, 2008, 11:23:40 AM
Oh, sorry. I missed this topic while checing unread topics. I'll have a look.
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 11:42:27 AM
Quote from: Nascar on October 29, 2008, 11:23:40 AM
Oh, sorry. I missed this topic while checing unread topics. I'll have a look.

Please do not apologise, i am grateful for the help, just got worried it may have been something seriously wrong lol. That's me all over a big worrier.
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 29, 2008, 11:49:56 AM
While cheking the file I couldn't find anything wrong.
You could try to use the <img> html tag in the message, and use a image you like (direct link to the image I used for the mod is http://www.YOURURL.com/Themes/default/images/icons/assist.gif).
Then use this file:
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 12:08:41 PM
Quote from: Nascar on October 29, 2008, 11:49:56 AM
While cheking the file I couldn't find anything wrong.
You could try to use the <img> html tag in the message, and use a image you like (direct link to the image I used for the mod is http://www.YOURURL.com/Themes/default/images/icons/assist.gif).
Then use this file:

Thank you,

I noticed you removed a bit of code to where it gets the image, i was changing the image anyway, it works great now, i done what you said add the <img> .

Cheers!

Mathew
Title: Re: Posting Announcement
Post by: kizer on October 29, 2008, 02:37:09 PM
Quote from: NIBOGO on October 28, 2008, 08:06:04 PM
Nascar maybe you can add an option to show the announce for certain groups

Yes that would be a very useful addition to the mod
Title: Re: Posting Announcement
Post by: genieuk on October 29, 2008, 02:45:25 PM
and to show announcement for certain boards only ;)

for example, you may have a board that has different rules, so you could put in text box,

please read rules for this board, rules for this board differs from main rules or whatever. and of course choose to display for certain boards only,
Title: Re: Posting Announcement
Post by: qtime on October 29, 2008, 04:35:29 PM
Very great modification, this will avoid changing the php code in the post php script! Very usefull!

And yes, it will be great to use it with different text on different boards. :).
Title: Re: Posting Announcement
Post by: DareDevil1990 on October 31, 2008, 04:54:34 AM
hi could anyone tell me what's action to enter its admin area...like action=misc or something ??
Title: Re: Posting Announcement
Post by: Marcus Forsberg on October 31, 2008, 05:12:36 AM
For SMF 1.1.6:
http://www.YOURSITE.COM/index.php?action=featuresettings

For SMF 2.0:
http://www.YOURSITE.COM/index.php?action=admin;area=modsettings
Title: Re: Posting Announcement
Post by: MaXiForum.cz on November 01, 2008, 05:02:57 PM
Very nice mod! :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 01, 2008, 05:09:27 PM
Thank you, MaxiPes!
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 02, 2008, 10:43:46 PM
Quote from: genieuk on October 29, 2008, 02:45:25 PM
and to show announcement for certain boards only ;)

for example, you may have a board that has different rules, so you could put in text box,

please read rules for this board, rules for this board differs from main rules or whatever. and of course choose to display for certain boards only,

yup! like for example, our forum have a classified ad section that has different board rules.

is this possible, Nascar? :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 03, 2008, 12:46:00 AM
It's possible, yes, and a good idea.
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 03, 2008, 05:57:55 AM
awesome! will be waiting for your update, Nascar. Thanks very much in advance ;D
Title: Re: Posting Announcement
Post by: Imô¿ôu2 on November 04, 2008, 12:17:49 PM
Nascar I would like to thank you for such a nice mod. I put it up there with one of the three most important mods

DeInCreasePostBox
Users Online Today
Posting Announcement

Now those are just my feelings. I was so happy with it on my SMF2 beta 4 public forum that I set to work trying to figure out how to install it on my SMF2 beta 3.1 public.

The manual install for the SMF2 beta 4 public works perfect on the SMF2 beta 3.1 public. I think that it would be really nice if you could make an updated version of the mod that would install on the SMF2 beta 3.1 public. Allot of us still have a few forums using it, while we wait for the mods to catch up.

Any ways, just a thought I had. It really is a great mod.

Respects

Imô¿ôu2
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 04, 2008, 12:40:49 PM
Thanks for the comments, Imô¿ôu2!
I'll update it for 3.1 as soon as I have time. :)
Title: Re: Posting Announcement
Post by: tonnybarros on November 04, 2008, 08:08:39 PM
How do I appear in the answer too fast.

Traduzido pelo Google.

Title: Re: Posting Announcement
Post by: HuRRR on November 05, 2008, 10:48:16 AM
Working well, very nice mod :)
Title: Re: Posting Announcement
Post by: jossanaijr on November 05, 2008, 10:50:38 AM
Quote from: tonnybarros on November 04, 2008, 08:08:39 PM
How do I appear in the answer too fast.

Traduzido pelo Google.


To use in Quick Reply too?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 05, 2008, 10:51:56 AM
You mean displaying it in the quick reply box?
Title: Re: Posting Announcement
Post by: jossanaijr on November 05, 2008, 10:54:21 AM
I think  it what he is asking for.
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 06, 2008, 02:23:07 AM
hi again nascar,
we wanted to install the theme for now (and hopefully you can update it again with the board settings option), anyway, i encounter this error -

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
2.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
3.    Execute Modification    ./Themes/default/languages/Help.brazilian.php    File not found
4.    Execute Modification    ./Themes/default/languages/Modifications.brazilian.php    File not found
5.    Execute Modification    ./Themes/default/languages/Help.swedish.php    File not found
6.    Execute Modification    ./Themes/default/languages/Modifications.swedish.php    File not found
7.    Execute Modification    ./Sources/ModSettings.php    Test failed
8.    Execute Modification    ./Themes/default/Post.template.php    Test successful

any idea what went wrong?
Title: Re: Posting Announcement
Post by: jossanaijr on November 06, 2008, 03:07:51 AM
You need to edit files manually.
Install it with errors and then edit those files with "Test failed" and "File not found" (in these case if you are using Brazilian or Swedish language; if you are using English, edition of these languages files are not necessary).
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 06, 2008, 04:39:17 AM
ooh okay, will do that now. thanks jossanaijr! :)
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 06, 2008, 04:49:48 AM
i tried it, but i can't find this on my ModSettings.php file -

array('int', 'max_signatureLength'),


attached is my ModSettings.php file, i appreciate if any of you can look and hopefully help me to fix it.. thanks in advance :)

Title: Re: Posting Announcement
Post by: jossanaijr on November 06, 2008, 05:08:44 AM
Try this but keep one backup of your original file...  ;)
Title: Re: Posting Announcement
Post by: pinoypetfinder on November 06, 2008, 05:12:07 AM
thanks a lot! working perfectly now! :D
Title: Re: Posting Announcement
Post by: Afro on November 07, 2008, 01:49:44 PM
the announcement is showing twice on my forum,
why is that?

I HAVE CORRECTED IT...
Title: Re: Posting Announcement
Post by: jossanaijr on November 07, 2008, 01:59:39 PM
Quote from: pinoypetfinder on November 06, 2008, 05:12:07 AM
thanks a lot! working perfectly now! :D
You are welcome.
Quote from: sam_milla on November 07, 2008, 01:49:44 PM
the announcement is showing twice on my forum,
why is that?
For some reason it seems that you installed  (or tried to) twice.  Some cod are duplicated and you will have to delete it manually.

Title: Re: Posting Announcement
Post by: Afro on November 07, 2008, 02:01:00 PM
How do i add the link of my rules with the html code?
i mean where i have to add the url that links to my rule?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 07, 2008, 02:13:48 PM
Which SMF version are you using?
Title: Re: Posting Announcement
Post by: Afro on November 07, 2008, 02:14:16 PM
1.1.6 v

Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 07, 2008, 02:15:33 PM
Admin > Features & Settings > Basic Settings
Scroll down a bit and you'll find a textbox and a checkbox
Title: Re: Posting Announcement
Post by: Afro on November 07, 2008, 02:20:40 PM
Quote from: Nascar on November 07, 2008, 02:15:33 PM
Admin > Features & Settings > Basic Settings
Scroll down a bit and you'll find a textbox and a checkbox

I know where that is.

I mean the code i will use to link it up with my forum rules.

like <url=link>rules</url>
Title: Re: Posting Announcement
Post by: Costa on November 07, 2008, 02:45:14 PM
 try the code this way

<a href="link">Rules</a>
Title: Re: Posting Announcement
Post by: Afro on November 07, 2008, 03:05:58 PM
Thanks
Title: Re: Posting Announcement
Post by: Costa on November 07, 2008, 03:21:44 PM
You're welcome ;)

Farewell
- Costa
Title: Re: Posting Announcement
Post by: jossanaijr on November 08, 2008, 09:14:08 AM
Hi Nascar
What is the 1.1.2 ChangeLog?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 08, 2008, 09:14:54 AM
1.1 29th October 2008
o Added brazilian language, thanks to Costa.

I see I missed ".2" in the title..
Title: Re: Posting Announcement
Post by: Burke ♞ Knight on November 15, 2008, 03:44:20 PM
Nascar, in version 1.1.2, you made a slight error in the install2.0.xml file:

Quote3.     Execute Modification     ./Themes/default/languages/Help.brazilian.php     File not found
4.    Execute Modification    ./Themes/default/languages/Modifications.brazilian.php    File not found
5.    Execute Modification    ./Themes/default/languages/Help.swedish.php    File not found
6.    Execute Modification    ./Themes/default/languages/Modifications.swedish.php    File not found

You forgot to add something when searching for those files:
error="skip"

:P

Otherwise, another fantastic mod! :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 15, 2008, 04:38:05 PM
Thank you very much, BurkeKnight. I'll update the package when I got a minute to spear.
Title: Re: Posting Announcement
Post by: Costa on November 16, 2008, 08:48:52 AM
oops!

it's portuguese_brazilian :P

I Use only Brazilian in my language files, i allways forget that :P
Sorry dudes
Title: Re: Posting Announcement
Post by: Peaches on November 25, 2008, 12:53:23 AM
Do you think that you could tell me how to link it to SMF v1.1.7?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on November 25, 2008, 03:37:09 AM
Sorry, Peaches, what exactly do you mean by linking it to 1.1.7?
Title: Re: Posting Announcement
Post by: editor1 on December 06, 2008, 09:51:19 PM
Hi nascar, great job,  :) I cant wait to start using it,
I downloaded sucessfully and applied it... and it went smooth.. do you know where i can access the mod on
1.1.7?....
I would appreciate any suggestion.
Thanks, Michael
Title: Re: Posting Announcement
Post by: Marcus Forsberg on December 07, 2008, 03:17:44 AM
You mean the admin panel?
Admin > Features & Settings > Basic settings
Title: Re: Posting Announcement
Post by: editor1 on December 07, 2008, 12:04:40 PM
Hi nascar- thank you very much- I appreciate the suggestion, unfortunately I thought that there was another way because
I am a newbie and have just lil 40 packages installed,
so I know where to look most of the time,
It's just that the configuration options didn't install? to access
the mod pac through admin,
may I ask your opinion on why the configuration
options are not showing up in:
Admin > Features & Settings > Basic settings
Title: Re: Posting Announcement
Post by: MaXiForum.cz on December 07, 2008, 05:51:07 PM
This mod and google AdSense :)
(http://megaupload.cz/mini/200/goo.jpg) (http://megaupload.cz/nahled/goo.jpg)

Really very nice mod Nascar :)
Title: Re: Posting Announcement
Post by: Burke ♞ Knight on December 07, 2008, 06:44:19 PM
You know, I never would have thought of that idea... Good thinking! :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on December 08, 2008, 12:45:16 AM
Quote from: Michael211 on December 07, 2008, 12:04:40 PM
Hi nascar- thank you very much- I appreciate the suggestion, unfortunately I thought that there was another way because
I am a newbie and have just lil 40 packages installed,
so I know where to look most of the time,
It's just that the configuration options didn't install? to access
the mod pac through admin,
may I ask your opinion on why the configuration
options are not showing up in:
Admin > Features & Settings > Basic settings

Where there any "Tes faild" on installation?

Quote from: MaxiPes on December 07, 2008, 05:51:07 PM
This mod and google AdSense :)
(http://megaupload.cz/mini/200/goo.jpg) (http://megaupload.cz/nahled/goo.jpg)

Really very nice mod Nascar :)

Nice idea, glad you liked it :)
Title: Re: Posting Announcement
Post by: foempspeedy on December 26, 2008, 12:06:26 AM
I also got those failed tests on the 2 languages.
Whats best to do, can i ignore?
If removed, it will not go right, and errors stay....
Title: Re: Posting Announcement
Post by: Marcus Forsberg on December 26, 2008, 05:10:47 AM
If it only fails on language files, ignore it.
Title: Re: Posting Announcement
Post by: JungleBunny on January 01, 2009, 07:52:11 AM
Poor poor Nascar !! :D :D :D :D :D :D
Everybody attached his wrong *.php and you can change it, lollllllllll

Using 1.1.4 and the mod is working well 8) 8) 8)

THANKS !!

PS: Like said before it would be a great addition to make different announcements to different boards.
Title: Re: Posting Announcement
Post by: qtime on January 03, 2009, 01:17:06 PM
Thanks for this great modification, very needfull!
Title: Re: Posting Announcement
Post by: Marcus Forsberg on January 03, 2009, 03:33:32 PM
Glad you liked it :)
Title: Re: Posting Announcement
Post by: bauwbas on January 12, 2009, 01:06:09 PM
Hey! I have question, why its double for me? And how i can resolve that problem.

Img:

(http://img223.imageshack.us/img223/9185/whyfq3.png)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on January 12, 2009, 02:16:38 PM
Please attach your Post.template.php file.
Title: Re: Posting Announcement
Post by: bauwbas on January 13, 2009, 09:11:41 AM
Sure
Title: Re: Posting Announcement
Post by: Marcus Forsberg on January 13, 2009, 09:29:41 AM
Try this:

Title: Re: Posting Announcement
Post by: bauwbas on January 13, 2009, 09:50:47 AM
Ty a lot, working perfectly :]
Title: Re: Posting Announcement
Post by: Marcus Forsberg on January 13, 2009, 09:52:53 AM
You're welcome.
Title: Re: Posting Announcement
Post by: Flocke on January 16, 2009, 02:55:26 PM
German:
<file name="$languagedir/Help.german.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nascar
$helptxt['enable_announcement'] = 'Möchtest du eine Nachricht auf der Beitrag schreiben-Seite anzeigen lassen?<div class="smalltext">z. B. ein Hinweis auf die Regeln</div><br />';
$helptxt['text_announcement'] = 'Nacgricht für die Mitglieder, wenn sie einen Beitrag schreiben. Kann ein Hinweis auf die Regeln oder ähnliches sein. <div class="smalltext">Html funktioniert, BB-Code nicht.</div><br />';
// End Posting Announcement mod by Nascar]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.german.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nascar
$txt['enable_announcement']='Zeige eine Nachricht auf der Beitrag schreiben-Seite';
$txt['text_announcement']='Nachricht zum Anzeigen <div class="smalltext">Html funktioniert, BB-Code nicht</div>';
// End Posting Announcement mod by Nascar]]></add>
</operation>
</file>
Title: Re: Posting Announcement
Post by: Kimmie on February 15, 2009, 09:59:47 AM
I am moving to 1.1.8 tomorrow. Are there any specific changes that need to be made to make this compatible with 1.1.8 (other than updating the package-xml file so that it can be installed/uninstalled)?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on February 15, 2009, 10:02:21 AM
No, no changes are needed.
Title: Re: Posting Announcement
Post by: Pandabeer on March 03, 2009, 07:02:57 AM
Dutch lol i sended a PM but anyways its not perfect :p


<file name="$languagedir/Help.dutch.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nascar
$helptxt['enable_announcement'] = 'Wil je een bericht boven het post gedeelte? <div class="smalltext">Zoals een waarschuwing om je aan de regels te houden.</div><br />';
$helptxt['text_announcement'] = 'Bericht om te laten zien als een lid post. Het kan bijv. een waarschuwing zijn om jezelf aan de regels te houden. <div class="smalltext">Html werkt wel, BBC niet.</div><br />';
// End Posting Announcement mod by Nascar]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.dutch.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nascar
$txt['enable_announcement']='Laat een bericht zien boven het post gedeelte.';
$txt['text_announcement']='Voer een bericht in. <div class="smalltext">HTML mag gebruikt worden. BBC niet.</div>';
// End Posting Announcement mod by Nascar]]></add>
</operation>
</file>
Title: package not compatible :|
Post by: problemwt2.0 on March 27, 2009, 11:28:21 AM
hello i'm using smf 2.0 RC1 when i uploaded the package i get the following error  :o  The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

help me please  :'(

1.1.3 version of this modificaion

well pakage parser is saying the same think then why u have wrote that it is compatible wt 2.0 ?

Sorry, but this modification does not appear to be compatible with the selected version.

Changelog
1.1.3 17th Mars 2009
o Now support SMF 2.0 RC1.
1.1.2 29th October 2008
o Added brazilian language, thanks to Costa.
1.1.1 28th October 2008
o Fixed a small mistake in the installation for SMF 1.1.6.
1.1 28th October 2008
o Added support for SMF 1.1.6
o Added swedish language
1.0 25th October 2008
o Mod was submitted to the SMF Mod Site.
Title: Re: Posting Announcement
Post by: problemwt2.0 on March 28, 2009, 05:15:59 PM
bump :)
Title: Re: Posting Announcement
Post by: problemwt2.0 on March 29, 2009, 04:39:12 PM
bump :(
Title: Re: Posting Announcement
Post by: problemwt2.0 on March 30, 2009, 10:17:01 AM
bump :'(
Title: Re: Posting Announcement
Post by: Marcus Forsberg on March 30, 2009, 01:28:09 PM
Sorry for the delay, problemwt2.0!

I made a simple typo in the package which made the 2.0 version unable to parse and install. use the new package on the mod site.
Title: Re: Posting Announcement
Post by: problemwt2.0 on March 31, 2009, 05:28:07 AM
thanx :)
Title: Re: Posting Announcement
Post by: pinoypetfinder on May 17, 2009, 12:59:31 PM
hi nas, just wanna ask if it's already possible to post announcement on just one specific board? (ie, classified section board only). or will it still show on ALL boards?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on May 27, 2009, 09:05:45 AM
pinoypetfinder, it will currently show on all boards. I might have a look at adding the functionallity you mentioned.




Would anyone be interested in testing the new package I attached? :)
Title: Re: Posting Announcement
Post by: zorro18 on June 07, 2009, 02:24:00 PM
Hi Nas,

The attached file also doesnt work for 2.0 RC 1-1. even when emulated for 2.0 RC 1.. What would be the reason.
Title: Re: Posting Announcement
Post by: pinoypetfinder on June 07, 2009, 07:59:40 PM
thanks nas! really need it right, will try it after you confirm a few things :)
the attachment should work on all smf 1.1.x version?
should i uninstall the previous version of this mod before installing the new one that you attached?
Title: Re: Posting Announcement
Post by: ke4obt on June 12, 2009, 11:42:13 PM
Nas,
I looked at the 1.1.4 version. When I tried to install it, it failed on post.template.php. I unzipped the file I got from your post and looked at the install.xml for 2.0. The only thing different I could find is that there is
Quote// If an error occurred, explain what happened.';
that it is looking for, but in the template file, there is no
Quote';
in the code.
I tried to delete that extra '; and saved the file, but I must have saved it wrong or something, because now it just says that the install failed, but everything shows as passed except for the 4 language files that it couldn't find.
I just figured I'd let you know so you can research it and fix it. I know enough to look and mostly see what's different, but the correct fixing of it is beyond me. :D

Thanks for the mod and hope you get it working soon,
Flip & Mickey (who did most of the checking)

ps - the different announcement for each board would be really nice, but not totally necessary. Just our two cent's worth (in today's economy, that equals about a half cent's worth).  :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on June 13, 2009, 03:52:23 AM
I'll look at that asap. Thanks
Title: Re: Posting Announcement
Post by: Marcus Forsberg on June 13, 2009, 07:28:26 AM
Changelog
1.1.5 13th June
o Fixed the "File not found"-errors on brazilian and swedish language.
o Fixed the test failed error on Post.template.php. (2.0 RC1-1)
o Preparing for new functionallity: Different announcements on different boards. (Next version)
o Preparing for new functionallity: Make the icon infront of the announcement optional. (Next version)
Title: Re: Posting Announcement
Post by: zorro18 on June 13, 2009, 05:55:51 PM
Quote from: Nas on June 13, 2009, 07:28:26 AM
Changelog
1.1.5 13th June
o Fixed the "File not found"-errors on brazilian and swedish language.
o Fixed the test failed error on Post.template.php. (2.0 RC1-1)
o Preparing for new functionallity: Different announcements on different boards. (Next version)
o Preparing for new functionallity: Make the icon infront of the announcement optional. (Next version)

Great..thanks..Next versions looks kool to me.. ;)
Title: Re: Posting Announcement
Post by: villasg on June 14, 2009, 08:54:00 AM
Τhanks

Greek-utf8
<file name="$languagedir/Help.greek-utf8.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nas
$helptxt['enable_announcement'] = 'Θελεις να εμφανίζεται μήνυμα στη σελίδα ποσταρίσματος ? <div class="smalltext">ΠΧ προσοχή στους κανόνες </div><br />';
$helptxt['text_announcement'] = 'Μήνυμα που θα βλέπουν τα μέλη όταν ποστάρουν. Μπορεί να είναι μια προειδοποίησή για τους κανόνες . <div class="smalltext">μπορείς να χρησιμοποιήσεις Html και BBC κοδικες.</div><br />';
// End Posting Announcement mod by Nas]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.greek-utf8.php">
<operation>
<search position="end" />
<add><![CDATA[// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Εμφανισε μια ανακοινωση ( Posting Announcement ) στην κορηφη της σελιδασ ποσταρισματος';
$txt['text_announcement']='Εμφανιζομενη ανακοινωση <div class="smalltext">μπορούν να χρησιμοποιήθουν HTML and BBC κόδικες.</div>';
// End Posting Announcement mod by Nas]]></add>
</operation>
</file>
Title: Re: Posting Announcement
Post by: pinoypetfinder on June 15, 2009, 12:33:11 PM
Quote from: Nas on June 13, 2009, 07:28:26 AM
Changelog
1.1.5 13th June
o Fixed the "File not found"-errors on brazilian and swedish language.
o Fixed the test failed error on Post.template.php. (2.0 RC1-1)
o Preparing for new functionallity: Different announcements on different boards. (Next version)
o Preparing for new functionallity: Make the icon infront of the announcement optional. (Next version)

awesome! will look forward for the next version ;D
btw nas, do we have to uninstall the previous mod if we wanted to install the most recent version? or is there a way or option to just add the new stuff without uninstalling the previous version?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on June 15, 2009, 01:49:17 PM
You'll have to uninstall the mod first.
Title: Re: Posting Announcement
Post by: FragaCampos on June 23, 2009, 09:02:51 PM
This is a great mod and as soon as we can select the board in which to use it, it will be a must have ;)

I'm lookin forward for the next version  8)
Title: Re: Posting Announcement
Post by: khaleed on July 23, 2009, 06:26:36 AM
Hi Nas

I just installed your posting announcement mod but when I go to feature and option I just cant find it. Is there any file I have to edit to make it work. :-\

FYI I m using version 1.1.10 kani theme.

Here is my site http://klia-community.com/forum (http://klia-community.com/forum)
Title: Re: Posting Announcement
Post by: khaleed on July 24, 2009, 05:41:42 AM
Bump !  :-\
Title: Re: Posting Announcement
Post by: ralliart on July 29, 2009, 11:13:35 AM
2.0 RC1.2 compatible?  :)
Title: Re: Posting Announcement
Post by: Marcus Forsberg on July 29, 2009, 11:17:35 AM
I'll fix that in a bit. :)
Title: Re: Posting Announcement
Post by: ralliart on July 29, 2009, 11:28:56 AM
Thanks Nas!  :-*
Title: Re: Posting Announcement
Post by: ~Unkn0wn~ on September 10, 2009, 11:27:49 PM
It's compatible with 1.1.10?
EDIT: Works on default theme, how do I make it work on custom theme?
Thanks
Title: Re: Posting Announcement
Post by: Marcus Forsberg on September 11, 2009, 12:45:00 AM
Quote from: ~Unkn0wn~ on September 10, 2009, 11:27:49 PM
It's compatible with 1.1.10?
EDIT: Works on default theme, how do I make it work on custom theme?
Thanks

Yes, this works in SMF 1.1.10.
Unless your theme has it's own custom Post.template.php, this should work on your custom theme too.
Title: Re: Posting Announcement
Post by: Eclipse16V on November 24, 2009, 07:44:37 AM
Please update it for SMF 2.0 RC2

Thx
Title: Re: Posting Announcement
Post by: Amendoim on January 03, 2010, 12:40:42 PM
I just test in version 2.0 RC2 .. I had to emulate my forum for RC1 to be able to install until everything installed correctly, but the problem is that does not work .. go to admin panel -> change the MOD and asset write something, no matter what the rules .. when I answer, or open a new topic does not work, nothing appears in the reply box etc. ..

What may be failing? if he installed correctly?

Tanks
Title: Re: Posting Announcement
Post by: Amendoim on January 09, 2010, 02:02:45 PM
Hello,

I tried to install the Mod "Posting Announcement" -> (http://custom.simplemachines.org/mods/index.php?mod=1484)

and it is only available for version 2.0 RC1.1, adapted installation for the 2.0rc2 and installed it properly, which did not do was install modsettings.php, but I did it without problems and functional hand!
The problem now is the "post.template.php" in the default theme, when I create a new topic, so the message should appear below the subject the message to escrevela .. but not, appears in the bottom half so .. Attached is the image:

I have to edit in another place? change of place or something?
Thanks:)
Title: Re: Posting Announcement
Post by: TheListener on January 26, 2010, 05:42:02 AM
Will this mod ever be available for 2.0 RC2?
Title: Re: Posting Announcement
Post by: Eclipse16V on January 26, 2010, 07:52:54 AM
Works nice on my 2.0RC2
Title: Re: Posting Announcement
Post by: TheListener on January 26, 2010, 07:56:49 AM
Quote from: Eclipse16V on January 26, 2010, 07:52:54 AM
Works nice on my 2.0RC2

Did you have to do any manual edits?
Title: Re: Posting Announcement
Post by: Marcus Forsberg on January 26, 2010, 09:09:54 AM
Brack1:
All of my mods are currently pending an update to SMF 2.0 RC2, but it will depend on the outcome of the recent events around here.
Title: Re: Posting Announcement [Temporaily archived]
Post by: Marcus Forsberg on February 10, 2010, 11:41:21 AM
I have marked this modification as Archived for now, as I don't have the time or interest to actively support or develop it on this very moment.
Once SimpleDesk and my other mods and projects come further along, I will update this modification for the latest version and start to support it again.

Sorry for the inconvenience.
Title: Re: Posting Announcement [Temporaily archived]
Post by: TheListener on February 10, 2010, 11:42:59 AM
Multi tasking springs to mind or finishing a job before starting another.
Title: Re: Posting Announcement [Temporaily archived]
Post by: Marcus Forsberg on February 10, 2010, 11:45:10 AM
Brack1, I am no longer as interested in this modification as I once was. I want to explore new areas and do new stuff, which I am sure you can understand.

Sorry, again.
Title: Re: Posting Announcement
Post by: Mick. on February 25, 2010, 11:20:12 PM
This mod is now converted to RC2 ;)
Title: Re: Posting Announcement
Post by: Membre on February 26, 2010, 09:05:50 AM
Spanish_es / Spanish_latin / Spanish ( add utf8 also please :) )

   <file name="$languagedir/Help.english.php">
      <operation>
         <search position="end" />
         <add><![CDATA[// Start Posting Announcement mod by Nas
$helptxt['enable_announcement'] = 'Quieres mostrar un mensaje sobre casilla de respuesta? <div class="smalltext">Ej. un aviso para respetar las reglas</div><br />';
$helptxt['text_announcement'] = 'Mensaje a mostrar a los miembros cuando escriben. Puede ser un aviso para respetar las reglas o similar. <div class="smalltext">Html y BBC funcionaran.</div><br />';
// End Posting Announcement mod by Nas]]></add>
      </operation>
   </file>
   <file name="$languagedir/Modifications.english.php">
      <operation>
         <search position="end" />
         <add><![CDATA[// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Muestra un anuncio sobre la pagina de respuesta';
$txt['text_announcement']='Anuncio a mostrar <div class="smalltext">HTML y BBC pueden ser usados.</div>';
// End Posting Announcement mod by Nas]]></add>
Title: Re: Posting Announcement
Post by: Mick. on February 26, 2010, 11:45:30 AM
thanx.... will add later ;)
Title: Re: Posting Announcement
Post by: Mick. on March 09, 2010, 12:10:31 AM
Updated for RC3
Title: Re: Posting Announcement
Post by: Blackdozer on March 13, 2010, 02:58:49 PM
Here I leave the translation in Spanish

Help.spanish.php

// Start Posting Announcement mod by Nas
$helptxt['enable_announcement'] = '¿Quieres mostrar un mensage en la parte superior en la página de nuevo tema o de responder?</div><br />';
$helptxt['text_announcement'] = 'Mensage para mostrar  a los miembros a la hora de escribir o crear un nuevo tema. <div class="smalltext">El HTML Y los bbcode están activados.</div><br />';
// End Posting Announcement mod by Nas


Modifications.spanish.php

// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Mostrar un anuncio a la hora de crear o responder un tema';
$txt['text_announcement']='Anuncio para mostrar <div class="smalltext">El HTML y los BBCODE están activados.</div>';
// End Posting Announcement mod by Nas
Title: Re: Posting Announcement
Post by: aw06 on March 30, 2010, 05:12:04 PM
This package has no Modifications.english-utf8.php or Help.english-utf8.php files... please add :)
Title: Re: Posting Announcement
Post by: aw06 on March 30, 2010, 05:43:40 PM
Installed and working .. but what's with the scroll bar it places below the input box?? How do i remove

Also for future versions , it would be good to make it so we can select which membergroups can see the warnings, and we should be able to make more than one warning, :)
Title: Re: Posting Announcement
Post by: aw06 on March 31, 2010, 09:03:14 AM
Also, can i get the announcements to be in a table like this ... see pic...

I suppose putting it in that table will get wid of the scroll bar.
Title: Re: Posting Announcement
Post by: Mick. on March 31, 2010, 09:34:39 AM
Okie -dokie.... ill look into it. ;)
Title: Re: Posting Announcement
Post by: Mick. on March 31, 2010, 10:11:47 AM
This fixes the scroller bar and puts the post warning in a red box...

Open...
Themes/default/Post.template.php


Find:
// Posting Announcement
if (!empty($modSettings['enable_announcement']))
echo '

<dl></dt>
<dl align="left">
<img src="', $settings['images_url'], '/icons/field_invalid.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b> <br /><br />
</dt>
</dt>';


Replace with:
// Posting Announcement
if (!empty($modSettings['enable_announcement']))
echo '

<dl></dt>
<div class="errorbox">
<img src="', $settings['images_url'], '/icons/field_invalid.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b></div>
</dl>
</dt>';


Title: Re: Posting Announcement
Post by: Mick. on March 31, 2010, 10:19:59 AM
Ok..... re-edited the code in my last post.   Got rid of the scroll bar.
Title: Re: Posting Announcement
Post by: aw06 on March 31, 2010, 11:57:03 AM
Quote from: bluedevil on March 31, 2010, 10:19:59 AM
Ok..... re-edited the code in my last post.   Got rid of the scroll bar.

Was wondering why the scroll bar in the first place ??? to allow if somebody types in a ridiculously long warning ?  :P
Title: Re: Posting Announcement
Post by: Mick. on March 31, 2010, 12:03:18 PM
Quote from: aw06 on March 31, 2010, 11:57:03 AM
Quote from: bluedevil on March 31, 2010, 10:19:59 AM
Ok..... re-edited the code in my last post.   Got rid of the scroll bar.

Was wondering why the scroll bar in the first place ??? to allow if somebody types in a ridiculously long warning ?  :P

No..... it was an error in the code.
Title: Re: Posting Announcement
Post by: aw06 on March 31, 2010, 12:06:03 PM
Quote from: bluedevil on March 31, 2010, 12:03:18 PM
Quote from: aw06 on March 31, 2010, 11:57:03 AM
Quote from: bluedevil on March 31, 2010, 10:19:59 AM
Ok..... re-edited the code in my last post.   Got rid of the scroll bar.

Was wondering why the scroll bar in the first place ??? to allow if somebody types in a ridiculously long warning ?  :P

No..... it was an error in the code.

OK Sir... thanks for the Fix 8)

Made edits .... looks much better now :P error logs clean :D
Title: Re: Posting Announcement
Post by: Eclipse16V on March 31, 2010, 03:36:07 PM
I have it so and it runs nice without errors

// Posting Announcement
if (!empty($modSettings['enable_announcement']))
echo '
<dl>
<dt>
<div class="errorbox">
<img src="', $settings['images_url'], '/icons/field_invalid.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b>
</div>
</dt>
</dl>';
Title: Re: Posting Announcement
Post by: Kohlteth on May 05, 2010, 02:03:50 PM
Hi,

I have 1.1.11 and don't know if I am doing something wrong but in packet manager there is no "Install Mod" button.

Can anyone please shed some light on this ?

Quote22.     Ultimate Profile      0.9.1       [ Uninstall ]  [ List Files ]  [ Delete ]
23.    Posting_Announcement    2.0    [ List Files ] [ Delete ]
24.    Personal Messages to Membergroups    1.4.1    [ Apply Mod ] [ List Files ] [ Delete ]

This is what I get ...
Title: Re: Posting Announcement
Post by: Mick. on May 05, 2010, 02:18:41 PM
Quote from: Kohlteth on May 05, 2010, 02:03:50 PM
Hi,

I have 1.1.11 and don't know if I am doing something wrong but in packet manager there is no "Install Mod" button.

Can anyone please shed some light on this ?

Quote23.     Posting_Announcement      2.0      [ List Files ]  [ Delete ]

This is what I get ...

Youre using 2.0 on a 1.1.11.   Wrong zip.

User the 1.1.5zip instead for 1.1.11

Title: Re: Posting Announcement
Post by: Kohlteth on May 05, 2010, 02:20:04 PM
Ahh thanks, I thought 2 was just an updated version, cos it mentioned the red box and stuff.

I will go try that now.
Title: Re: Posting Announcement
Post by: Mick. on May 05, 2010, 02:20:48 PM
Quote from: Kohlteth on May 05, 2010, 02:20:04 PM
Ahh thanks, I thought 2 was just an updated version, cos it mentioned the red box and stuff.

I will go try that now.

Yep.  The red box is available on RC3 only.
Title: Re: Posting Announcement
Post by: Kohlteth on May 05, 2010, 02:49:34 PM
Yup that worked ,

Only issue is somehow it installed twice so the post msg came up twice, used package manager to uninstall, so now it only comes up once (yippee) , just now have no uninstall option, but no biggie.

Thanks again for your help
Title: Re: Posting Announcement
Post by: Mick. on May 05, 2010, 02:54:31 PM
Quote from: Kohlteth on May 05, 2010, 02:49:34 PM
Yup that worked ,

Only issue is somehow it installed twice so the post msg came up twice, used package manager to uninstall, so now it only comes up once (yippee) , just now have no uninstall option, but no biggie.

Thanks again for your help

The uninstall option is not found since youre using 1.1.11 and the mod is for an earlier version of smf. 

There is a line to emulate the version on the URL in your browser but i forgot how it goes.
Title: Re: Posting Announcement
Post by: Arantor on May 05, 2010, 03:01:17 PM
Or you can use Version Emulate Dropdown (http://custom.simplemachines.org/mods/index.php?mod=2113) to do the same thing.

But the issue isn't a lack of emulation; if it's been installed twice, as far as package manager is concerned it was installed once. So uninstalling it only uninstalled once, there's still phantom code in the system. Best thing to do would be to manually remove, then reinstall.
Title: Re: Posting Announcement
Post by: Mick. on May 05, 2010, 03:08:01 PM
I could update the 1.1.5zip for 1.1.11  :P

I dont have to.   Its already ready for 1.1.11



Title: Re: Posting Announcement
Post by: KidCactus on May 19, 2010, 05:32:05 AM
Could I specify to show the announcement on a certain board, by adding something to this if statement in Post.template.php?

if (!empty($modSettings['enable_announcement']))

Maybe something like this (I'm just making the code up to show what I mean):

if (!empty($modSettings['enable_announcement']) && ($board['id'] == '24'))

Edit: Woohoo, this actually did the trick:

if (!empty($modSettings['enable_announcement']) && ($context['current_board'] == '24'))
Title: Re: Posting Announcement
Post by: KidCactus on May 19, 2010, 08:22:54 AM
I've now modded this mod on my forum to include a setting for which board (the id of the board) to show the announcement on. So, if you have this mod installed and also want to do this (be aware that you can only specify ONE board with this change):

In ./Sources/ModSettings.php

Find:


// The Posting Announcement mod
                        array('check', 'enable_announcement'),
array('large_text', 'text_announcement', '2'),


Replace with:

// The Posting Announcement mod
                        array('check', 'enable_announcement'),
array('large_text', 'text_announcement', '2'),
                        array('int', 'board_announcement'),


In ./Themes/default/Post.template.php

Find:

// Posting Announcement
if (!empty($modSettings['enable_announcement']))
echo '
<tr>
<td></td>
<td align="left">
<img src="', $settings['images_url'], '/icons/assist.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b> <br /><br />
</td>
</tr>';


Replace with:

// Posting Announcement
if (!empty($modSettings['enable_announcement']) && ($context['current_board'] == $modSettings['board_announcement']))
echo '
<tr>
<td></td>
<td align="left">
<img src="', $settings['images_url'], '/icons/assist.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b> <br /><br />
</td>
</tr>';


In ./Themes/default/languages/Modifications.english.php

Find:

// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Show an announcement on the top of the post page';
$txt['text_announcement']='Announcement to display <div class="smalltext">HTML and BBC may be used.</div>';
// End Posting Announcement mod by Nas


Replace with:

// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Show an announcement on the top of the post page';
$txt['text_announcement']='Announcement to display <div class="smalltext">HTML and BBC may be used.</div>';
// End Posting Announcement mod by Nas
$txt['board_announcement']='Board ID to display the announcement';


If someone can figure out a way to specify several boards, maybe comma separated, that would be even better if people would need the announcement on several boards.

This change of the mod works fine for me in 1.1.11, but please be aware that I won't take any responsibility for whatever issues might occur on your forum.
Title: Re: Posting Announcement
Post by: Arantor on May 19, 2010, 08:30:15 AM
Comma separated is relatively easy...

ModSettings.php
// The Posting Announcement mod
                        array('check', 'enable_announcement'),
array('large_text', 'text_announcement', '2'),
                        array('text', 'board_announcement'),


Modifications.english.php
// Start Posting Announcement mod by Nas
$txt['enable_announcement']='Show an announcement on the top of the post page';
$txt['text_announcement']='Announcement to display <div class="smalltext">HTML and BBC may be used.</div>';
// End Posting Announcement mod by Nas
$txt['board_announcement']='Board ID(s) to display the announcement';


Post.template.php
// Posting Announcement
$board_announce_this_board = false;
if (!empty($modSettings['board_announcement']))
{
$modSettings['board_announcement'] = preg_replace('~[^0-9,]~', '', $modSettings['board_announcement']);
$boards_announce = explode(',', $modSettings['board_announcement']);
$board_announce_this_board = in_array((string) $context['current_board'], $boards_announce);
}
if (!empty($modSettings['enable_announcement']) && $board_announce_this_board)
echo '
<tr>
<td></td>
<td align="left">
<img src="', $settings['images_url'], '/icons/assist.gif" /> <b>',parse_bbc($modSettings['text_announcement']),'</b> <br /><br />
</td>
</tr>';


In case anyone's curious WTF that's going, first it checks to make sure there's actually something in the modSettings[] item, if there is, strip out anything that isn't a number or a comma (like spaces), split it up into an array (which, btw, are going to be strings), then do a comparison of the current board, converted to a string so it's the right type, against the array.

Not tested though.
Title: Re: Posting Announcement
Post by: KidCactus on May 19, 2010, 08:42:06 AM
Quote from: Arantor on May 19, 2010, 08:30:15 AM
Not tested though.
I just tried your edit and I can confirm that it works like a charm. :)
Title: Re: Posting Announcement
Post by: aw06 on May 20, 2010, 08:47:11 AM
I also have this working flawlessly on 1.1.11
Title: Re: Posting Announcement
Post by: gisfreak on November 10, 2010, 04:08:39 AM
hem, how to upgrade it to latest version ?

should i uninstall it first?, coz it said failed in some file  :(
Title: Re: Posting Announcement
Post by: Vincent Volmer on March 10, 2011, 05:31:18 AM
Hello,

Is this mod updated for SMF2.0 RC5?

Thanks,

Vincent
Title: Re: Posting Announcement
Post by: Mick. on March 10, 2011, 07:19:11 AM
Quote from: Vincent Volmer on March 10, 2011, 05:31:18 AM
Hello,

Is this mod updated for SMF2.0 RC5?

Thanks,

Vincent
It installs on any RC 2.0. ;)
Title: Re: Posting Announcement
Post by: Vincent Volmer on March 10, 2011, 07:25:17 AM
Quote from: bluedevil on March 10, 2011, 07:19:11 AM
It installs on any RC 2.0. ;)

Okay!! Thanks for the great mod!

Title: Re: Posting Announcement
Post by: Mick. on March 10, 2011, 08:14:01 AM
Quote from: Vincent Volmer on March 10, 2011, 07:25:17 AM
Quote from: bluedevil on March 10, 2011, 07:19:11 AM
It installs on any RC 2.0. ;)

Okay!! Thanks for the great mod!


Thanx. Any issues post here. ;)
Title: Re: Posting Announcement
Post by: Adonix on September 29, 2015, 12:05:58 AM
Could we get any updated version for this mod :\ ?
This mod is nice but will it work with 2.0.11 SMF version Mick ?
Title: Re: Posting Announcement
Post by: br360 on September 29, 2015, 12:14:15 AM
This mod does work fine with 2.0.11.
Title: Re: Posting Announcement
Post by: Grammy on January 24, 2021, 09:30:26 PM
Okay, this is VERY nice!   :)
Title: Re: Posting Announcement
Post by: Mick. on January 24, 2021, 09:31:29 PM
Quote from: Grammy on January 24, 2021, 09:30:26 PM
Okay, this is VERY nice!   :)
Not bad eh? Easy as pie lol