Uutiset:

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

Main Menu
Advertisement:

Got such mods?

Aloittaja eric1234, tammikuu 19, 2012, 09:13:37 AP

« edellinen - seuraava »

eric1234

I search in the modification and cant seem to find 1.

I want a mod that when i posted something on the news and announcements board, i can make a notice that will appear at the top of the forum in every forum pages with a title i prefer that link all the members to the announcements tread that i just make. Like in the attachment . Do SMF got such mods? :)


hcfwesker

Have you tried the Forum News feature in the Admin panel?

You can use bbc to add links masked over text, and they'll appear on every page.

Only thing is it wont automatically make it.  when you post the new topic, you'll have to manually create the news item link for it to appear.

eric1234

Lainaus käyttäjältä: hcfwesker - tammikuu 20, 2012, 12:10:57 IP
Have you tried the Forum News feature in the Admin panel?

You can use bbc to add links masked over text, and they'll appear on every page.

Only thing is it wont automatically make it.  when you post the new topic, you'll have to manually create the news item link for it to appear.
Eh mind to elaborate more on how to manually create the news item link for it to appear?

Arantor

Same way you'd put a link in a post, both use regular bbc.

[url=http://whatever...]Text that should be a link[/url]
Holder of controversial views, all of which my own.


NanoSector

Just go to Admin > Admin dropdown > News and Newletters (if I'm correct) and you can input everything.

For example,
Go to my site and get 50% off!
will be:
[url=http://mysite.com/]Go to my site and get 50% off![/url]

You can even input multiple items so SMF cycles through them randomly.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

hcfwesker

Also, to add, goto Admin > Theme Settings > ( chose theme name)

UNcheck this item :  Enable random news line in the forum header:

And CHECK this item : Show news fader on board index:

^ doing that will make it appear at the top of the forum in a table.  http://www.brawldomain.com/AASMF2/index.php?nowap  <-- youill see the News table at the top. 

Use the instructions from the above post to Add your links, and the news box will make them appear randomly every few seconds.

eric1234

I see. Thank you very much for that.

How that forum do that? I mean making different sentences appeared? @.@


However, the news only shown it on the home main page, not in the boards or topics >.< How can i set them to be visible in everywhere in the forum?

hcfwesker

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 02:11:55 APHow that forum do that? I mean making different sentences appeared? @.@

Where you added the News item, there's a button under the box you typed ... theres a link labeled "Click here to add another item."


LainaaHowever, the news only shown it on the home main page, not in the boards or topics >.< How can i set them to be visible in everywhere in the forum?

Hope you can handle some php editing in files.  Make the same edits in custom theme files if they have one of these 2 listed files.

Themes/default/BoardIndex.template.php

Find & Remove
// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';

foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';

echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[

// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});

// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}




Themes/default/index.template.php 

Find
// Custom banners and shoutboxes should be placed here, before the linktree.


Add AFTER
// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';

foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';

echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[

// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});

// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}


eric1234

How come i cant find the code in my themes' index.template.php
// Custom banners and shoutboxes should be placed here, before the linktree.

NanoSector

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 08:05:01 AP
How come i cant find the code in my themes' index.template.php
// Custom banners and shoutboxes should be placed here, before the linktree.
Some themes have code changes, and as such not every theme has the same comments.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

eric1234

Lainaus käyttäjältä: Yoshi2889 - tammikuu 21, 2012, 08:08:32 AP
// Custom banners and shoutboxes should be placed here, before the linktree.
Some themes have code changes, and as such not every theme has the same comments.
[/quote]
then how? @.@

NanoSector

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 09:42:20 AP
Lainaus käyttäjältä: Yoshi2889 - tammikuu 21, 2012, 08:08:32 AP
Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 08:05:01 AP
How come i cant find the code in my themes' index.template.php
// Custom banners and shoutboxes should be placed here, before the linktree.
Some themes have code changes, and as such not every theme has the same comments.
then how? @.@
Can you attach your Index.template.php here, in your next post? Thanks.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

eric1234


hcfwesker

Try placeing the code ABOVE this in that file.

// Show the navigation tree.
theme_linktree();

eric1234

#14
Is place after that code right?

haha, anyway, what if the theme only got index but no boardindex file??

Oh ya. this is the index file of my another theme .. i cant find it again >.<

Oh ya, do you got any solution of this problem? >.<

http://www.simplemachines.org/community/index.php?topic=379307.msg3258210#msg3258210

Erm, got any idea how to change the News to Notices? @.@


hcfwesker

#15
Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Is place after that code right?

Before or After, really doesnt matter.  Before shows it before the linktree, After shows it under the link tree & above the first Category listed ( as it is on my test site).  http://www.brawldomain.com/AASMF2/index.php?nowap

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IPwhat if the theme only got index but no boardindex file??

index.template code appear on all pages.  Ignore the changes to a custom themes BoardIndex file if it doesnt have one.

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Oh ya, do you got any solution of this problem? >.<

http://www.simplemachines.org/community/index.php?topic=379307.msg3258210#msg3258210

sorry, you'll have to wait for Joker to help you on that one.

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Erm, got any idea how to change the News to Notices? @.@

/languages/index.english.php  ( check default and custom theme language folders)

Find
$txt['news'] = 'News';

change to
$txt['news'] = 'Notifications';

eric1234

Lainaus käyttäjältä: hcfwesker - tammikuu 22, 2012, 12:11:58 AP
Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Is place after that code right?

Before or After, really doesnt matter.  Before shows it before the linktree, After shows it under the link tree & above the first Category listed ( as it is on my test site).  http://www.brawldomain.com/AASMF2/index.php?nowap

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IPwhat if the theme only got index but no boardindex file??

index.template code appear on all pages.  Ignore the changes to a custom themes BoardIndex file if it doesnt have one.

Thank you very much >.<

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Oh ya, do you got any solution of this problem? >.<

http://www.simplemachines.org/community/index.php?topic=379307.msg3258210#msg3258210

sorry, you'll have to wait for Joker to help you on that one.

Lainaus käyttäjältä: eric1234 - tammikuu 21, 2012, 11:20:48 IP
Erm, got any idea how to change the News to Notices? @.@

/languages/index.english.php  ( check default and custom theme language folders)

Find
$txt['news'] = 'News';

change to
$txt['news'] = 'Notifications';

hcfwesker

Why did you quote my post.  did anything help?

Advertisement: