Skip to main content
Topic: Revamping mentions. (Read 2377 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Revamping mentions.

I was thinking about this stuff. Having likes constantly popping up on the mentions tab is, IMO, just a pointless PITA. They're not really "mentions" as such anyway, so it doesn't even fit with the tab title. Mentions should be reserved for when someone deliberately tags you in a post to bring your attention to it.

So that probably won't happen very often, meaning a separate tab for it is probably waste of space. It'd make more sense if mentions were in the droppy off the "My Messages" tab and just popped up a little number there instead. Getting tagged really is a kind of message (as in "Hey, check this out").

As for tracking likes, who gives a rat's? Even Farcebook, the originator of this bit of web lint, has basically now admitted that just having likes by themselves is pretty useless.

Ok, so to bring about this new golden age of less web lint would obviously require some modifications to sources. AFAICT at the moment, deleting the following from Mentions.controller.php should deal with the basics.

Code: (Remove) [Select]
			// liked messages
'like' => array(
'callback' => array($this, 'prepareMentionMessage'),
'enabled' => !empty($modSettings['likes_enabled']),
),
// likes removed
'rlike' => array(
'callback' => array($this, 'prepareMentionMessage'),
'enabled' => !empty($modSettings['likes_enabled']) && empty($modSettings['mentions_dont_notify_rlike']),
),
Along with:
Code: (Find) [Select]
			// These things are associated to messages and require permission checks
if (in_array($row['mention_type'], array('men', 'like', 'rlike')))
Code: (Replace) [Select]
			// These things are associated to messages and require permission checks
if (in_array($row['mention_type'], array('men')))
And:
Code: (Remove) [Select]
	/**
* Politley remove a mention when a post like is taken back
*/
public function action_rlike()
{
global $user_info;

// Common checks to determine if we can go on
if (!$this->_isValid())
return;

// Cleanup, validate and remove the invalid values (0 and $user_info['id'])
$id_target = array_diff(array_map('intval', array_unique($this->_validator->uid)), array(0, $user_info['id']));

if (empty($id_target))
return false;

rlikeMentions($user_info['id'], $id_target, $this->_validator->msg);
}
That should detach likes from mentions without borking anything, AFAICT. Is this right? Am I missing anything here?

Anyway, the next bit is getting the counter on the My Messages tab to recognise the mentions. What sort of syntax would work for that? Is 'counter' => 'unread_messages && mentions', going to do the job, or would it need something else?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Revamping mentions.

Reply #1

Quote from: Antechinus – As for tracking likes, who gives a rat's?
Then just go to your notifications profile page at:
http://www.elkarte.net/community/index.php?action=profile;area=notification
and select not to receive notifications when one of your messages is liked, like I did. :P

Quote from: Antechinus – Even Farcebook, the originator of this bit of web lint, has basically now admitted that just having likes by themselves is pretty useless.
I always wonder why if someone "says" a thing is correct, if I demonstrate it mathematically nobody cares. :P

Quote from: Antechinus – Ok, so to bring about this new golden age of less web lint would obviously require some modifications to sources. AFAICT at the moment, deleting the following from Mentions.controller.php should deal with the basics.
Though it seems you are talking about 1.0... well, I'm not going to touch that code any more. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Revamping mentions.

Reply #2

Quote from: emanuele –
Quote from: Antechinus – As for tracking likes, who gives a rat's?
Then just go to your notifications profile page at:
http://www.elkarte.net/community/index.php?action=profile;area=notification
and select not to receive notifications when one of your messages is liked, like I did. :P
Except that you can't do that in the current stable branch: 1.0.


QuoteThough it seems you are talking about 1.0... well, I'm not going to touch that code any more. :P
I wasn't asking you to touch that code. I was asking for information to enable me to write a mod for that code. This is the "Addons ideas and questions" board after all. I had an idea for an addon, and I had some questions about it. Ergo thread, in this board.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Revamping mentions.

Reply #3

I was just kidding on the second part. :P
Bugs creator.
Features destroyer.
Template killer.