Closed Bug 722143 Opened 13 years ago Closed 3 days ago

Provide simpler extensibility of stalk list and message output

Categories

(Other Applications Graveyard :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: glenjamin+bmo, Assigned: glenjamin+bmo)

Details

As discussed on IRC with Silver a couple of days ago. I failed to save the transcript so if anyone has the original convo then that would be appreciated. Add 2 new internal commands that would be fired as part of the usual message parsing flow (names subject to discussion): 1) should-trigger-stalk This command would contain the current implementation of stalk-list logic, but would make it easy to hook / replace the default behaviour 2) build-message-row This command would contain the current implementation of converting the raw message data into the DOM element for insertion onto the page. This would allow pre-hooks to modify the data, and post-hooks to modify the DOM element itself. When I find some time, I'll try and work on these features, but anyone else is welcome to jump in and do them first!
Original conversation, for reference: [2012-01-23 09:58:09] <Glenjamin> removing the core stalk hook and replacing it with a modified version of that plugin might not be a bad approach [2012-01-23 09:58:21] <Silver> If you have some time, make the is-important check into a command called hook-is-message-important or some such. :) [2012-01-23 09:58:50] <Glenjamin> command or replaceable function? [2012-01-23 10:00:36] <Glenjamin> bbl [2012-01-23 10:00:38] <Silver> Command. Internal, not user-typable, of course. They have the advantage that you can add hooks before and after either execution IIRC and they can be replaced like aliases do it. [2012-01-23 10:02:25] <Silver> If the arguments are done right, the hooks should be able to fully influence it (assuming no fighting!). [2012-01-23 10:03:11] <Silver> A similar hook called in the middle of __display with the nickname, text, etc. would be handy too. [2012-01-23 10:09:34] <Silver> I think you can do that with command hooks, anyway. Vnk uses them quite a lot. [2012-01-23 10:17:21] <Silver> I suppose we could create a 2nd CommandManager instance just for hooks too. Commands to be called hook-message-is-important and hook-message-build-row
Status: NEW → RESOLVED
Closed: 3 days ago
Resolution: --- → INCOMPLETE
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.