News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Separate the sticky topics

Started by Costa, January 09, 2012, 01:25:14 PM

Previous topic - Next topic

Costa

Link to the mod

Link to Mod

Author: Costa
Type: New Feature
Latest version: 1.0.1
Compatible with: SMF 2.1.x

Screenshot
On the Modification's Page.

Languages available
English (UTF-8 and non UTF-8)
Portuguese PT (UTF-8 and non UTF-8)
Portuguese BR (UTF-8 and non UTF-8)
Dutch (UTF-8 and non UTF-8) - by Doctor Deejay

If you want, post your translation and I will add asap.

Support & comments
If you have a problem with this mod, want to comment, or have any question, please post to the modification support topic and I will reply as soon as possible.

License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Robert.


Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."


Eclipse16V

I worked with:
SMF 2 in German

Shop:
SID Giessen

Storman™

Interesting mod - might give it a try, many thanks  ;)

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

live627

Works with both "Started By Column" and "Separate Replies and Views Column" :D

Costa

Quote from: live627 on January 16, 2012, 01:51:40 AM
Works with both "Started By Column" and "Separate Replies and Views Column" :D
Good to know that :D
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Robert.

Here is the Dutch translation:

$txt['costa_topico_fixo'] = 'Belangrijke topics';
$txt['costa_topico_normal'] = 'Normale topics';

:)

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Michael Pfaff

Love this mod, Costa.

What code would I need to add / change to make "Sticky Topics" and "Normal Topics" to be white text?

Costa

Quote from: Michael Pfaff on January 17, 2012, 07:51:32 PM
What code would I need to add / change to make "Sticky Topics" and "Normal Topics" to be white text?

After install the mod, search this in ./Themes/Theme Name/MessageIndex.template.php
$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if ($topic['is_sticky'] && !$stickybar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_fixo'], '</strong>
</td>
</tr>
';
$stickybar = true;
}
elseif (!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_normal'], '</strong>
</td>
</tr>
';
$normalbar = true;
}


And replace with this.
$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if ($topic['is_sticky'] && !$stickybar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong><span style="color: white;">', $txt['costa_topico_fixo'], '</span></strong>
</td>
</tr>
';
$stickybar = true;
}
elseif (!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong><span style="color: white;">', $txt['costa_topico_normal'], </span>'</strong>
</td>
</tr>
';
$normalbar = true;
}


Quote from: Michael Pfaff on January 17, 2012, 07:51:32 PM
Love this mod, Costa.
Thank you :)
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."


Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

MadTogger

Very simple straight forward and excellent MOD, thank you.  :)

MadTogger

Just a quick ask.

Would it be possible to add a 'Locked Topics' heading?

This I think is a little complicated as for instance in my forum I have 'Locked Topics' that are not stickied and some 'Locked Topics' that are stickied.

What I was thinking is that if a topic is:

Sticky - Goes under Sticky Topics heading.
Sticky & Locked - Goes under Sticky Topics heading.
Locked - Goes under Locked Topics heading.
All other topics - Go under the Normal Topics heading.

Regards..,

MT

DBan

Hi, I have this in a custom theme, is there any way to edit the bar that shows 'Normal' and 'Sticky' topics?

Thanks in advance :)

Jessica.

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

live627

Quote from: DBan on April 14, 2012, 10:26:24 AM
Hi, I have this in a custom theme, is there any way to edit the bar that shows 'Normal' and 'Sticky' topics?

Thanks in advance :)
Change what? Text Search for the text in ./Themes/default/languages/Modifications.english.php and change them. The single quotes wrapping thee text must be retained, though!

Advertisement: