Jump to content

Showing the solved Topics in green


Stanny

Recommended Posts

Really like the way you marked your solved topics  ;)

 

May i asked you a question ?......How have you done that,on our own forum we are using the Topic solved modification by author SiNaN And we would like to apply the same way of highlighting the Solved topics.

 

Would someone be so friendly to tell me how to set this

 

Friendly regards Stanny

 

 

Link to comment
Share on other sites

TBH, I'm not sure what the SiNaN mod does differently than the one we brewed up (in fact SMF got their panties in a wad when we tried to submit ours a long time ago.) However, we pretty much just check against the post information in a loop within the template and add a CSS class if it is solved.

Link to comment
Share on other sites

changed in index.css /* Color for background of *topics* requiring approval */.approvetbg

 

/* Sticky topics get a different background */
.stickybg
{
   background: #625349;
}
.stickybg2
{
   background: #625349;
}
/* Solved topics get a different background */
.solvedbg
{
background: #66FF33;
}
.solvedbg2
{
   background: #66FF33;
}

 

changed in MessageIndex.template.php

foreach ($context['topics'] as $topic)
	{
		// Is this topic pending approval, or does it have any posts pending approval?
		if ($context['can_approve_posts'] && $topic['unapproved_posts'])
			$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
		// We start with locked and sticky topics.
		elseif ($topic['is_sticky'] && $topic['is_locked'])
			$color_class = 'stickybg locked_sticky';
		// Sticky topics should get a different color, too.
		elseif ($topic['is_sticky'])
			$color_class = 'stickybg';
                        // Solved topics should get a different color, too.
                        elseif ($topic['is_solved']) $color_class = 'solvedbg'; 
                     // Locked topics get special treatment as well.
		elseif ($topic['is_locked'])
			$color_class = 'lockedbg';
		// Last, but not least: regular topics.
		else
			$color_class = 'windowbg';

Unfortunately it does not work  :-[

Link to comment
Share on other sites

You need to implement the solved background in the following pages

- Themes/default/css/index.css

- Themes/default/MessageIndex.template.php

- Themes/default/Recent.template.php

 

On an added note, you must give a solved both CSS clasess

class = 'windowbg solvedbg";

 

I'm moving this to Third Party software since this is more of a coding question rather than a comment or suggestion.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.