(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]I did check the PM handler object, I think it is fair to add some hooks, Most likely directly in the data handler files, around:
https://github.com/mybb/mybb/blob/8b22ad...m.php#L470
https://github.com/mybb/mybb/blob/8b22ad...m.php#L582
https://github.com/mybb/mybb/blob/8b22ad...#L175-L176
https://github.com/mybb/mybb/blob/8b22ad...#L130-L131
Those seem like useful hooks, yes. Generally, I think the more hooks the better. Extensibility and options for extension are a very good thing.
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]Maybe none of exactly these but rather others, should probably be discussed separately.
Yes, for sure.
There are a few other hooks that would be helpful for me for MyConversations in particular, and maybe helpful for other MyBB plugin developers too - I just haven't gotten around to collating them and advocating for their addition.
In particular, I was forced to resort to an unreliable and ugly hack to implement plain-text parser output support for
quote
tags using an
mid
attribute (conversation
message
ID) as opposed to core's
pid
quote tag attribute. HTML parser output support for this attribute didn't require a hack though.
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]A hook around the following line could alone probably allow you to control the object for your plugin (idea, so you could reduce to only 1 core edit):
https://github.com/mybb/mybb/blob/8b22ad...er.php#L71
Mmm, I'm not quite sure what you're suggesting here. Can you elaborate a little?
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]This plugin works mostly because of this function without core edits (I should probably suggest some hooks on my own).
Huh. Very interesting. This plugin of yours looks like an alternative version of MyConversations, where private threads are used in place of private "conversations", leveraging, no doubt, all of the existing functionality of
showthread.php
rather than, as MyConversations does, pretty much duplicating it.
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]Some of Shade's recently released plugins also work with it.
Neat. I haven't looked too closely at those plugins yet, although I have downloaded and taken a very brief skim through Symposium.
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]https://ougc.network/entry?how-to-hide-x...s-a-thread
Thank you. I think I'm now starting to get an idea of the basics of XThreads: it makes it possible to add custom fields to core threads, and to display those fields in various ways. Does that sound like a reasonable (but more importantly, sufficiently comprehensive) description?
(2021-02-25, 11:22 PM)Omar G. Wrote: [ -> ]Interesting find, but I won't be sure for the reason, but if you can replicate maybe you could open an issue thread to track it down.
I have come to the conclusion that the explanation does not lie with MyBB but with some quirk of the
mysql
commandline client. I have reached this conclusion because even when I disable query caching altogether via
SET GLOBAL query_cache_type = OFF;
, the time for the query in question (via the
mysql
commandline client) remains at its low mark of around or under a millisecond, and doesn't revert to the initial value I saw of around 150ms. Also: as well as being unable to produce this longer execution time via MyBB's debug page, I cannot reproduce it via phpMyAdmin either. It seems to me, then, that this lengthier execution has nothing to do with the query not being cached and everything to do with the way that the
mysql
client interacts with my MariaDB server for a first query of this type. As for what
that issue is, I don't care to investigate further! I just know now that the first execution time provided to me by the
mysql
commandline client for a query cannot be trusted. The query needs to be run a second time to get the correct value.
(2021-02-25, 11:28 PM)Omar G. Wrote: [ -> ]we are free to move on
OK. I sure hope so.