Have the same Message Icon for replies as that of the starting post

Started by jack_1985, December 28, 2015, 02:37:22 PM

Previous topic - Next topic

jack_1985

Hi everyone!

I have a bit of a dilemma and I would be very happy if someone would be willing shed some light on this subject. For SMF 2.0.11.

When someone posts a new topic they have the option to select a message icon from a dropdown menu. (For example, I have now chosen the question mark icon).
However, every time someone posts a reply, they have to select the icon all over again. The icon chosen by the OP for the thread isn't automatically selected for replies.

I find this a bit strange, so I would like to make the modification that the message icon from the starting post is automatically selected when you are replying.
(Alternatively, not being able to change it at all and just use the same icon automatically for replies would also be fine).

Could someone please tell me how I would achieve this adjustment or point me in the right direction?  Thank you very much for your support! :)

margarett

In concept it's more or less easy ;)

Sources/Post.php, find:
CASE WHEN ml.poster_time > ml.modified_time THEN ml.poster_time ELSE ml.modified_time END AS last_post_time
Replace with:
CASE WHEN ml.poster_time > ml.modified_time THEN ml.poster_time ELSE ml.modified_time END AS last_post_time, mf.icon

Find:
list ($locked, $context['notify'], $sticky, $pollID, $context['topic_last_message'], $id_member_poster, $id_first_msg, $first_subject, $lastPostTime) = $smcFunc['db_fetch_row']($request);
Replace with:
list ($locked, $context['notify'], $sticky, $pollID, $context['topic_last_message'], $id_member_poster, $id_first_msg, $first_subject, $lastPostTime, $first_icon) = $smcFunc['db_fetch_row']($request);

Find:
// By default....
$context['use_smileys'] = true;
$context['icon'] = 'xx';

Replace with:
// By default....
$context['use_smileys'] = true;
$context['icon'] = !empty($first_icon) ? $first_icon : 'xx';


That works for the full reply. Quick reply needs other kind of "love"
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jack_1985

That solution works perfectly for the full reply! Thanks a lot! :)

Advertisement: