News:

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

Main Menu

Little Topic Solved improvement

Started by NanoSector, May 03, 2012, 06:16:31 PM

Previous topic - Next topic

NanoSector

I might have to take another attempt on this, I'll keep this in my unread posts :)

Thanks for bumping.

Arantor: Yeah this does require some template editing in the regular SMF.
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."

Antechinus


NanoSector

Quote from: Antechinus on February 12, 2013, 05:47:00 AM
Not much template editing.
Not much indeed but it does require some editing.
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."

NanoSector

#23
Based on Sinan's mod:

Sources/MessageIndex.php
Find:
t.id_last_msg, t.approved, t.unapproved_posts,

Add after:
t.is_solved,

----------

Find:
'is_posted_in' => false,

Add after:

'is_solved' => (bool) $row['is_solved'],


Themes/(theme)/MessageIndex.template.php
Find:
// Last, but not least: regular topics.
else
$color_class = 'windowbg';


Add before:
// Solved topics are greener.
elseif ($topic['is_solved'])
$color_class = 'solvedbg';


Themes/(theme)/css/index.css
At the end of the file, add:
.solvedbg
{
background: #66FF33;
}
.solvedbg2
{
   background: #66FF33;
}


Screenshot is attached.

EDIT: If you want it to work in Unread Replies and Unread Topics

Sources/Recent.php
Find:
m.id_topic, t.id_board, b.id_cat,

Add after:
t.is_solved,

----------

Find:
'message' => $row['body'],

Add after:
'is_solved' => (bool) $row['is_solved'],

----------

Find:
ms.id_topic, t.id_board, b.name AS bname,

Add after:
t.is_solved,

----------

Find:
'is_posted_in' => false,

Add after:
'is_solved' => (bool) $row['is_solved'],

Themes/(theme)/Recent.template.php
This operation needs to be done twice!
Find:
if (strpos($topic['class'], 'locked') !== false)
$color_class .= 'lockedbg';


Add after:
if ($topic['is_solved'])
$color_class = 'solvedbg';
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."

Acans

Awesome Yoshi!

Gave it a quick spin and works perfectly. :) Plus tried it with a lighter green for curve, almost the same as SD.
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

NanoSector

Thanks snow :)

The lighter background indeed looks better. Care to share the hex code? :)
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."

Acans

"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

4Kstore


¡¡NEW MOD: Sparkles User Names!!!

Arantor

Can you use quick moderation to mark a bulk of topics solved? (That'd be a neat improvement)

NanoSector

Quote from: Arantor on February 12, 2013, 02:56:06 PM
Can you use quick moderation to mark a bulk of topics solved? (That'd be a neat improvement)
No idea, I'd have to take a read through the code. On this site you can't, at least.

Thanks 4K :)
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."

Arantor

I know, but it'd be a neat improvement - and it would likely encourage updating the qmod code to be hookable in 2.1 (it's not a small job)

Matthew K.


NanoSector

I don't know how the qmod code works, honestly. I'd have to take a look at that sometime :)

Thanks Labradoodle :)

Any chances of this being applied on this site or...?
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."

Arantor

The qmod code is horrid because it has to cope with qmod as icons as well as with checkboxes.

French

Completely forgotten to go on to find a solution, but this is a neat one thanks for sharing Yoshi2889  ;)

NanoSector

Not a problem :)

Arantor: If it were me I'd separate the code for that...
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."

French

#36
For the interested  ;)
Our users can choose from several themes, the text in one of the themes was not easy to read, so had to modified this in themes/css/index.css

#messageindex td a {
    color: #647969;
}


Antechinus

You think that is easy to read? IMO, you would have had a hard time making it less readable.

Irisado

Way too garish for me French!  The clashing colours make my eyes hurt.  Yoshi's version conveyed the same effect in a less overtly bright manner.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

NanoSector

Quote from: Irisado on February 18, 2013, 11:50:53 AM
Way too garish for me French!  The clashing colours make my eyes hurt.  Yoshi's version conveyed the same effect in a less overtly bright manner.
Sorry, I just picked a random green colour and inserted it O:)
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."

Advertisement: