Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Bulakbol on January 20, 2009, 12:44:54 AM

Title: Postbox Message
Post by: Bulakbol on January 20, 2009, 12:44:54 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1598)

Author: JohnyB   Mod Name: PostBoxMessage   Version: 1.0
Tested: Freshly installed SMF 1.1.7



January 27, 2009
Title: Re: Postbox Message
Post by: scenerip2k on January 20, 2009, 01:11:06 AM
nice!!!!! works great!!!
Title: Re: Postbox Message
Post by: edi67 on January 20, 2009, 04:30:19 AM
oh great as usually thx ;)

ITALIAN LANGUAGE
// PostBox
$txt['disable_smiley_box'] = 'Disabilita gli smileys nel post box';
$txt['post_box_height'] = 'Nuova altezza di default nel post box';
$txt['post_box_height_desc'] = 'Il valore di è 150px';
$txt['post_box_width'] = 'Nuova larghezza di default nel post box';
$txt['post_box_width_desc'] = 'Il valore di default è 70%';
$txt['post_box_message'] = 'Scrivi il Messaggio per gli utenti che postano';
$txt['post_box_message_desc'] = 'Puoi usare i codici BBC (bulletin board codes).';
$txt['post_box_switch'] = 'Disabilita il messaggio del post box';
$txt['post_box_switch_desc'] = 'Nascondi il messaggio agli utenti che postano.';

$helptxt['disable_smiley_box'] = 'Questo comando nasconde gli smileys nel post box.';
$helptxt['post_box_height'] = 'Questo comando abilita a cambiare l\'altezza di default del post box.';
$helptxt['post_box_width'] = 'Questo comando abilita a cambiare la larghezza di default del post box.';
$helptxt['post_box_message'] = 'Scrivi un messaggio per gli utenti che postano un messaggio. Puoi usare i codici BBC e gli smileys.';
$helptxt['post_box_switch'] = 'Questo comando disabilita la visualizzazione del messaggio agli utenti che postano nel post box.';
// PostBox
Title: Re: Postbox Message
Post by: evil-angelist on January 20, 2009, 05:46:37 AM
This goes on the 'to add list' thanks ;)
Title: Re: Postbox Message
Post by: Sudhakar Arjunan on January 20, 2009, 06:33:08 AM
It's an good mod.

could we test only for the members who try to post within a said interval of time.

Say a user post one message, and clicks on new message button with in 5 mins, we could display this post box instead of showing everytime.
Title: Re: Postbox Message
Post by: blondeamon on January 20, 2009, 04:39:08 PM
Perfect.....added it and im excited!!
Title: Re: Postbox Message
Post by: cleanfiles on January 20, 2009, 04:46:28 PM
Very useful mod, installed perfectly.  Is there a way to disable it for pm's and certain boards?
Title: Re: Postbox Message
Post by: Afro on January 20, 2009, 06:18:42 PM
weldone. seems not to be working with quickbox...any file to edit?
Title: Re: Postbox Message
Post by: Bulakbol on January 22, 2009, 09:14:22 PM
Thanks for the compliments.


@edi67
Thanks for the Italian translation.

@A.SK
Sorry, I don't know how to do it.

@cleanfiles
I'll update the mod today. Meanwhile, you can disable it by editing Post.template.php. Find
if ($context['post_box_switch'] == 'off' && $context['post_box_message'] != '')
replace with
if ($context['post_box_switch'] == 'off' && $context['post_box_message'] != '' && $context['current_action'] == 'post')

If you want to display the message only in few boards, find the board id's and replace the above line with
Quoteif ($context['post_box_switch'] == 'off' && $context['post_box_message'] != '' && $context['current_action'] == 'post' && in_array($context['current_board'], array(62, 4)))

Replace the number 62 and 4 with the board id's where you want to display the message. To exclude the boards, use
Quote... !in_array($context['current_board'], array(62, 4)

@sam_milla
The quick Reply box has its own message and different configuration, so I didn't touch it. If you want to change the message in the Quick Reply box, find $txt['quick_reply_2'] (SMF 1.1.7) or $txt['quick_reply_desc'] (SMF beta 4) from languages/index.english.php and change the text.
Title: Re: Postbox Message
Post by: TW1ST3D on January 22, 2009, 10:56:26 PM
Installed and works Perfectly on a heavily modded 1.1.7 forum..................Great Mod !!!!
Title: Re: Postbox Message
Post by: cleanfiles on January 22, 2009, 11:49:06 PM
Thanks for the reply Bulakbol, great mod :)
Title: Re: Postbox Message
Post by: Afro on January 23, 2009, 05:02:20 AM
Thanks for the reply..I did that
Title: Re: Postbox Message
Post by: xrunner on January 23, 2009, 08:03:16 AM
Damn test failed! Any suggestions?

1.     Execute Modification     ./Sources/ManagePosts.php     Test successful
2.    Execute Modification    ./Sources/Subs-Post.php    Test successful
3.    Execute Modification    ./Themes/default/Admin.template.php    Test successful
4.    Execute Modification    ./Themes/default/Post.template.php    Test failed
5.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
Title: Re: Postbox Message
Post by: cleanfiles on January 23, 2009, 05:04:52 PM
Quote from: xrunner on January 23, 2009, 08:03:16 AM
Damn test failed! Any suggestions?

1.     Execute Modification     ./Sources/ManagePosts.php     Test successful
2.    Execute Modification    ./Sources/Subs-Post.php    Test successful
3.    Execute Modification    ./Themes/default/Admin.template.php    Test successful
4.    Execute Modification    ./Themes/default/Post.template.php    Test failed
5.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
I had the same result, I installed it anyway and modified the post.template.php manually its works fine m8.
Title: Re: Postbox Message
Post by: Mick. on January 23, 2009, 05:12:44 PM
Very cool thank you.   

Hmmmm i wonder if HTML is allowed?  Maybe some 125x125 google ads

Time to tinker   lol...
Title: Re: Postbox Message
Post by: heinandar on January 23, 2009, 09:08:18 PM
how to add post box message box with WYSIWYG  RICH TEXT EDITOR. I very like your mod.
Title: Re: Postbox Message
Post by: Mick. on January 24, 2009, 12:40:54 AM
Sweet.....Google ads work.
Title: Re: Postbox Message
Post by: netco on January 25, 2009, 09:46:50 AM
ammmm

good mod :)
Title: Re: Postbox Message
Post by: Burke ♞ Knight on January 25, 2009, 09:48:55 AM
Nice Mod, my friend. :)
Title: Re: Postbox Message
Post by: Bulakbol on January 25, 2009, 08:37:23 PM
Sorry guys. I am pulling this mod out due to a conflict.

Restored but only for SMF version 1.1.7. Thanks people for understanding.
Title: Re: Postbox Message
Post by: Daniel0 on January 29, 2009, 08:57:31 AM
Would be great for SMF2 and with a per-board and per-group setting.
Title: Re: Postbox Message
Post by: Bulakbol on January 29, 2009, 09:21:56 PM
I may do that in the next update for version 1.1.7 though.  Thanks for the idea.
Title: Re: Postbox Message
Post by: Marcus Forsberg on January 30, 2009, 11:17:54 AM
Swedish translation:

Help.swedish.php:


$helptxt['post_box_rows'] = 'Det här låter dig ändra höjden på meddelandeboxen.';
$helptxt['post_box_columns'] = 'Det här låter dig ändra bredden på meddelandeboxen.';
$helptxt['post_box_message'] = 'Ange det meddelande so mvisas för medlemmar när de skriver ett inlägg. Du kan använda bbkod och smileys.';
$helptxt['post_box_switch'] = 'Det här inaktiverar visningen av meddelanden i meddelandeboxen.';


Modifications.swedish.php:


$txt['post_box_rows'] = 'Höjd på meddelandeboxen';
$txt['post_box_rows_desc'] = 'Standard är 12 rader';
$txt['post_box_columns'] = 'Bredd på meddelandeboxen';
$txt['post_box_columns_desc'] = 'Standard är 96%.';
$txt['post_box_message'] = 'Ange meddelandet som visas för medlemmar';
$txt['post_box_message_desc'] = 'Du kan använda BBkod och smileys.';
$txt['post_box_switch'] = 'Inaktivera meddelandeboxen;
$txt['post_box_switch_desc'] = 'Göm meddelandet från författare.';
Title: Re: Postbox Message
Post by: Bulakbol on February 01, 2009, 09:37:54 PM
Thanks Nas. I will update the mod today.
Title: Re: Postbox Message
Post by: wandawill on March 08, 2009, 02:57:58 PM
I got the same message. How did you fix it? thanks
Quote from: cleanfiles on January 23, 2009, 05:04:52 PM
Quote from: xrunner on January 23, 2009, 08:03:16 AM
Damn test failed! Any suggestions?

1.     Execute Modification     ./Sources/ManagePosts.php     Test successful
2.    Execute Modification    ./Sources/Subs-Post.php    Test successful
3.    Execute Modification    ./Themes/default/Admin.template.php    Test successful
4.    Execute Modification    ./Themes/default/Post.template.php    Test failed
5.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
I had the same result, I installed it anyway and modified the post.template.php manually its works fine m8.
Title: Re: Postbox Message
Post by: Bulakbol on March 28, 2009, 03:06:44 PM
@wandawill
Apologies for the late reply. Do you still need help with the Post.template.php?
Title: Re: Postbox Message
Post by: djaca on April 17, 2009, 02:12:39 PM
Greate mod...

I need help. How to put in quick reply?

Thanks...
Title: Re: Postbox Message
Post by: Bulakbol on April 19, 2009, 12:26:49 PM
@djaca
In default/languages/index.english.php, find
$txt['quick_reply_2']
and replace the contents.
Title: Re: Postbox Message
Post by: [̲̅J̲̅][̲̅U̲̅][̲̅R̲̅][̲̅E̲̅][̲̅K̲̅] ٩(×̯×)۶ on April 22, 2009, 07:22:52 PM
Hello! Can you please tell me how to change background color of Postbox in normal Reply? Its black on my forum (See 1st attach) And can you please post code that you used on this pic..i like your style on your postbox.. (See 2nd attach).. Thank you!(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fcustom.simplemachines.org%2Fmods%2Findex.php%3Faction-download%3Bmod%3D1598%3Bid%3D82908%3Bimage&hash=6c37dbe660c8cfdfe2db65bbc36c0d206df80f7d)
Title: Re: Postbox Message
Post by: Bulakbol on April 23, 2009, 01:06:06 AM
@Jurek
To change the background of the notice box, load the default/Post.template.php and look for
<td class="tborder" width="18%" height="', $context['post_box_rows'], '" valign="top" align="left" style="overflow: auto; padding: 4px; border: 1px solid red;">
replace with
Quote<td class="tborder" width="18%" height="', $context['post_box_rows'], '" valign="top" align="left" style="overflow: auto; padding: 4px; border: 1px solid red; background-color: yellow;">

Use the bulletin board codes (bbc). Here's your request.
[center][size=12pt][b]W a r n i n g[b][/size][hr][/center][list]
[li][color=blue]No double posting.[/color][/li]
[li][color=green]No flaming.[/color][/li]
[li][color=red]No Trolling.[/color][/li]
[li][color=purple]No fighting.[/color][/li]
[/list]
[center][color=red]Violators will be[br] prosecuted.

You are now warned.[/color]

[url=http://localhost/testboard/index.php/topic,314.0.html][u]Read the Rules[/u][/url][/center]


You can also use [br] instead of linebreak.
... [center][color=red]Violators will be[br] prosecuted.
[br][br]You are now warned.[/color] ...



/edited for spelling mistake.
Title: Re: Postbox Message
Post by: [̲̅J̲̅][̲̅U̲̅][̲̅R̲̅][̲̅E̲̅][̲̅K̲̅] ٩(×̯×)۶ on April 23, 2009, 03:12:31 AM
OMG man..your a God :) thank you very much.. your mod rules :)
Title: Re: Postbox Message
Post by: Bulakbol on April 23, 2009, 03:19:42 AM
lol lol. My pleasure.
Title: Re: Postbox Message
Post by: FragaCampos on April 27, 2009, 06:42:56 AM
Thanks a lot for this great mod :)

Here's the portuguese strings:

Quote<!-- default/languages/Help.portuguese.php -->
<file name="$languagedir/Help.portuguese.php">
      <operation>
         <search position="end" />
         <add><![CDATA[
$helptxt['post_box_rows'] = 'Esta op&ccedil;&atilde;o ir&aacute; alterar a altura por defeito da sua caixa de t&oacute;pico.';
$helptxt['post_box_columns'] = 'Esta op&ccedil;&atilde;o ir&aacute; alterar a largura por defeito da sua caixa de t&oacute;pico.';
$helptxt['post_box_message'] = 'Introduza a mensagem a mostrar aos utilizadores quando abrem um novo t&oacute;pico. Pode utilizar c&oacute;digo BBC e smileys.';
$helptxt['post_box_switch'] = 'Esta op&ccedil;&atilde;o ir&aacute; desactivar a exibi&ccedil;&atilde;o da mensagem na caixa de t&oacute;pico.';
]]></add>
      </operation>
   </file>
   
<!-- default/languages/Modifications.portuguese.php  -->
<file name="$languagedir/Modifications.portuguese.php">
      <operation>
         <search position="end" />
         <add><![CDATA[
$txt['post_box_rows'] = 'Nova altura da caixa de t&oacute;pico';
$txt['post_box_rows_desc'] = 'O valor pr&eacute;-definido s&atilde;o 12 linhas';
$txt['post_box_columns'] = 'Nova largura da caixa de t&oacute;pico';
$txt['post_box_columns_desc'] = 'O valor pr&eacute;-definido &eacute; 96%.';
$txt['post_box_message'] = 'Introduza a mensagem que quer ver exibida';
$txt['post_box_message_desc'] = 'Pode utilizar c&oacute;digo BBC e smileys';
$txt['post_box_switch'] = 'Desactivar a mensagem da caixa de t&oacute;pico';
$txt['post_box_switch_desc'] = 'Esconder a mensagem dos utilizadores';
]]></add>
      </operation>
   </file>


It would be great if in a future release we could choose the boards in which to show the box, from the admin panel instead of manually edit the Post.template.php.
Anyway, it works perfectly just the way it is  ;)
Title: Re: Postbox Message
Post by: Bulakbol on April 27, 2009, 11:09:07 AM
@FragaCampos
Thanks for the language translation. I'll add them to the next update/version. I will add the board id text box to where the message will appear as well.

Thanks guys for the suggestion.
Title: Re: Postbox Message
Post by: S3NTYN3L on June 12, 2009, 08:26:14 AM
How about the option to have it show for users under a certain (configurable) postcount?
Title: Re: Postbox Message
Post by: Bulakbol on June 13, 2009, 08:15:55 PM
Maybe by group. I don't have time to update my mods yet though. Thanks for the suggestion.
Title: Re: Postbox Message
Post by: technica on January 12, 2010, 08:59:53 AM
While installing it on SMF 1.1.11 I get error "The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
Title: Re: Postbox Message
Post by: pinoypetfinder on February 11, 2010, 08:02:09 AM
any update bulakbol?
or, technica have you tried installing the mod manually? might work?
Title: Re: Postbox Message
Post by: Bruno36 on May 08, 2010, 07:15:32 AM
an update is scheduled for SMF 2.0 RC3 ?
Title: Re: Postbox Message
Post by: Laza on December 04, 2010, 01:05:32 PM
Can you please update this mod for SMF 2.0 RC4  :)
Title: Re: Postbox Message
Post by: Apllicmz on June 29, 2011, 02:20:14 AM
when make to work in 2.0
Title: Re: Postbox Message
Post by: CampioneDelMillennio on August 16, 2011, 06:52:33 PM
in list for download for smf version 2.0 :-[