News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Posting Announcement

Started by Mick., October 28, 2008, 01:01:57 PM

Previous topic - Next topic

aw06

This package has no Modifications.english-utf8.php or Help.english-utf8.php files... please add :)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

#141
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, :)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

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.
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Mick.

Okie -dokie.... ill look into it. ;)

Mick.

#144
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>';



Mick.

Ok..... re-edited the code in my last post.   Got rid of the scroll bar.

aw06

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
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Mick.

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.

aw06

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
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Eclipse16V

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>';
I worked with:
SMF 2 in German

Shop:
SID Giessen

Kohlteth

#150
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 ...

Mick.

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


Kohlteth

Ahh thanks, I thought 2 was just an updated version, cos it mentioned the red box and stuff.

I will go try that now.

Mick.

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.

Kohlteth

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

Mick.

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.

Arantor

Or you can use Version Emulate Dropdown 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.
Holder of controversial views, all of which my own.

Mick.

I could update the 1.1.5zip for 1.1.11  :P

I dont have to.   Its already ready for 1.1.11




KidCactus

#158
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'))

KidCactus

#159
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.

Advertisement: