General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
With the current notification system I am getting a notification for the following quotation, that is when I am not quoted directly.
Is this behavior intended or is it a bug?
I think the way you'll have to fix it in 3.1 is you'll have to iterate over every quote tag with a regexp like (\[/?quote(?:=".*?"):\w+\]) and maintain a counter with the number of quote tags currently open. And of course, only notify the authors of the outermost quotes.
In 3.2, assuming my PR gets merged, I think the best way to go would be to add a method to phpbb\textformatter\utils_interface that retrieves the quotes' authors from a given text. Messages parsed with s9e\TextFormatter are stored as XML so it's easy to retrieve the outermost quote via XPath with //QUOTE[not(ancestor::QUOTE)]/@author. It may be a good idea to add a user_id parameter to quote tags too.
I'm going to write a fix for 3.2 but I'd need someone to propose a good name for the function that retrieves the names of all authors for first-level quotes. So far I'm thinking about get_quote_authors_but_not_all_of_them_really_only_the_first_level_of_quotes() but I'm open to suggestions.
JoshyPHP wrote:I'm going to write a fix for 3.2 but I'd need someone to propose a good name for the function that retrieves the names of all authors for first-level quotes. So far I'm thinking about get_quote_authors_but_not_all_of_them_really_only_the_first_level_of_quotes() but I'm open to suggestions.