News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Separate the sticky topics

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

Previous topic - Next topic

DBan

#20
Quote from: live627 on April 14, 2012, 06:37:47 PM
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!

Heres what it shows on my theme:

I would like to fix the seperator (above the stickied topics and where the stickied topics and normal topics seperate). How would I go about fixing this?

EDIT: Nevermind, I found out how to do it.

Find

$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;
}


Replace with

$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if ($topic['is_sticky'] && !$stickybar)
{
echo '
<tr class="catbg">
<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="catbg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_normal'], '</strong>
</td>
</tr>
';
$normalbar = true;
}


I changed "titlebg" to "catbg" as my theme has it named differently.

Yudd

#21
Hi, I really like this mod and what it can do.

How is it possible to make this mod viewable under a custom theme?

Thanks!

I figured it out! Thanks so much for the awesome mod.

Doc.Blade

Hello,

Love this mod, it works fine on my site, but unfortunately, when i try to apply the modification to make the text white, it crashes my board view page.

It only seems to be when the <span style="color: white;">  </span> is added to the file. If i re upload the original file, it works fine. The separation is still there, that is working fine, but my board has a black background, and i cant see the text.

This is the error code i am getting:


Template Parse Error!

There was a problem loading the /Themes/default/MessageIndex.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


syntax error, unexpected '<'


It only displays that for a couple of seconds, then redirects to somewhere i have no idea about.......


I am using the latest version of SMF, and using this theme:

http://custom.simplemachines.org/themes/index.php?lemma=2211


Any help you can offer would be greatly appreciated, as i would like the text for the separator headings to show up in white.

Thank you

Doc

Doc.Blade

Well, had a little granny nap, and tried to re tackle the problem......lol

Managed to fix it.

Just in case anyone else has the same trouble, for the particular template i am using, i needed to edit the Themes/Black_20rc3/css/index.css file, and do the following:


Find:


.titlebg, .titlebg2, thead tr.titlebg th, tr.titlebg td, tr.titlebg2 td
{
color: #000;
font-family: arial, helvetica, sans-serif;
font-size: 1.1em;
font-weight: bold;
background: url(../images/theme/main_block.png) no-repeat -10px -120px;
}





Replace with:


.titlebg, .titlebg2, thead tr.titlebg th, tr.titlebg td, tr.titlebg2 td
{
color: #fff;
font-family: arial, helvetica, sans-serif;
font-size: 1.1em;
font-weight: bold;
background: url(../images/theme/main_block.png) no-repeat -10px -120px;
}





Hope this helps someone.

Cheers

Doc

electricwildflower

Just came across this works fantastic on my forums which is 2.0.5 and works well on the black storm custom theme Cheers :)

Costa

Updated to work with SMF 2.1
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."

Steve

Didn't you already do this? Or does my 1.0.1 version work for both 2.0.19 and 2.1.2?
Please do not PM me for support.

Costa

@Steve I don't think I had done that, but I wouldn't be surprised if I had. It's been a rough few weeks at work and I'm a little head over heels. I need a vacation as soon as possible.
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."

Advertisement: