News:

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

Main Menu

Simple Announcement Mod

Started by Chupko, January 28, 2011, 06:25:35 PM

Previous topic - Next topic

Chupko

Simple Announcement Mod





Author:
Chupavac

Languages:
English

Compatibility:
1.1.12, 1.1.13, 1.1.16, 1.1.18, 2.0.2, 2.0.4

Screenshots:

In admin panel:


When Mod Installed:

Enjoy in Mod  ;)

Masterd


Chupko


Arctos

#3
Hi,

I have a problem with using this mod in other than default theme.
I use As Theme and tryed manually instal this Mod but it not appear.
Maybe i did something wrong.

//Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], ' ';
}
              echo '
    </div>';
      echo '
<div id="news">
   <span class="smalltext"><b>', $txt[102], '</b>: <br />', $context['random_news_line'], '</span>
</div></div><br />';
//Start
//Simple Announcement Mod by Chupko
if (!empty($modSettings['annoc_enable_each']))
{
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">
', (empty($modSettings['annoc_title'])) ? $txt['annoc_title_default'] : $modSettings['annoc_title'], '</div></div>
        <table border="0" width="100%" class="tborder">
            <td class="windowbg2" valign="middle" align="left">
         ', (empty($modSettings['annoc_content'])) ? $txt['annoc_content_default'] : $modSettings['annoc_content'], '
         </td></table>';
}
// End
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

Is this placed in good place of code or maybe code itself is invalid  or something?

Oh anyway i use v1.1.12 of SMF

Chupko

can you attach the index.template.php ? :)

Arctos


Chupko

Arctos, i can't find where is error ;S


@Topic

Mod update for SMF 1.1.13 :)

Jessica.

is there some way that we'll be able to use BBCode in it in the future?
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Chupko

Maybe.. If i have a time, i will add support for bbc :)

wdlax11

hey mate... i can't get your mod to work on my forums can you help me?

Masterd


Chupko

If you use custom theme, you have to install manual.. :)

bockonocode

Simple and very useful.  awesome mod, thanks Chupko!  ;D

Chupko


brendank1

Hi Chupko & thanks for the mod, it will come in handy. I've only just installed it on SMF 1.1.13 and I get a triple announcement. As per my example below. Any suggestions please?
Regards   

Home    Help  Search  Admin  Profile  My Messages  Calendar  Media [1]  Members  Logout   

Test Announce
This is a test announcement!
Test Announce
This is a test announcement!
Test Announce
This is a test announcement!

Matthew K.

To add bbc, all you have to do is use the parse_bbc(); function.

brendank1

Well I had a play and sorted it. I think it did not uninstall properly and when I reinstalled the same mod it doubled up on what was already left behind on server. Anyway, going great guns nor so it's all good. Thanks again, I like this mod. :)

Chupko

Thank You brendank1 :)

Labradoodle-360, thanks ;)

Masterd

Quote from: Labradoodle-360 on March 09, 2011, 09:02:00 PM
To add bbc, all you have to do is use the parse_bbc(); function.

Yes, it's pretty simple.

$modSettings['annoc_content'] = parse_bbc($modSettings['annoc_content']);

Arantor

That sort of presumes the content is pushed through preparsecode() when saving it though, otherwise unexpected bad things can happen.
Holder of controversial views, all of which my own.


Advertisement: