Clever quote testing

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
User avatar
canonknipser
Registered User
Posts: 1713
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Clever quote testing

Post by canonknipser » Sun Dec 10, 2017 8:54 pm

3Di wrote:
Sun Dec 10, 2017 7:59 pm
extension the duty to eventually do some magic here.
No need for any "Extension magic", if only the post_id would be referenced.
  • If a user is renamed, the new name will show up.
  • If a user is deleted with posts retaining, the quote would show "Guest" or the former username - depends on the implementation, both informations are present in the quoted post
  • If a post is deleted, no user is shown, but the quote is still there
  • If the post owner is changed via mcp, the new user will show up
3Di wrote:
Sun Dec 10, 2017 7:59 pm
Btw the present behaviour has been always this way, as far as I remember.
The present behaviour is completly new, the old behaviour was (and is still working):
[quote]something[/quote]
something
[quote="Name"]something with a name[/quote]
Name wrote:something with a name
Now you have 4 parameters
[quote=3Di]the user name[/quote]
3Di wrote:the user name
[quote=3Di post_id=14883006]the post_id[/quote]
3Di wrote: the post_id (only together with the user name)
[quote=3Di time=1512935970]the time[/quote]
3Di wrote:
Sun Dec 10, 2017 7:59 pm
the time as a unix timestamp (only together with the user name)
[quote=3Di user_id=177467]the user_id[/quote]
3Di wrote:the user_id (only together with the user name)
It is not self explaining to a "normal" user how to built those parameters when writing a "clever quote" by pressing the quote-button in posting area.
The name is quite easy: "Enter the user name you want to quote after a equal sign" - but what about the others? post_id and user_id may work for a experienced or "clever" user, but the time as a unix timestamp?
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
Ger
Recognised Extension Developer
Posts: 1792
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Clever quote testing

Post by Ger » Mon Dec 11, 2017 9:37 am

canonknipser wrote:
Sun Dec 10, 2017 8:54 pm
No need for any "Extension magic", if only the post_id would be referenced.
  • If a user is renamed, the new name will show up.
  • If a user is deleted with posts retaining, the quote would show "Guest" or the former username - depends on the implementation, both informations are present in the quoted post
  • If a post is deleted, no user is shown, but the quote is still there
  • If the post owner is changed via mcp, the new user will show up
While this would be ideal for always up-to-date references, it would mean that all that information what's currently fetched while posting (parsing, happens only once), would have to happen every time when displaying (rendering) a post. That's could mean quite some extra load for viewtopic when you have 20 posts on a page with each of them one or more quotes. Just count the quote blocks on this page. Before changing this I would recommend some load tests.

PS: wouldn't this discussion be better off at Area51?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3341
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Clever quote testing

Post by HiFiKabin » Mon Dec 11, 2017 9:41 am

Having thought about it overnight, I can not see this ever being made workable.

As Ger states, you would have to check all quoted text within a post. That might be a quote from the previous post, the previous page, the first post, another topic, the list goes on.

To check one post against the whole database (as wound be required) would probably slow your server considerably. Checking several posts may totally crash it.

User avatar
JoshyPHP
Code Contributor
Posts: 972
Joined: Mon Jul 11, 2011 12:28 am

Re: Clever quote testing

Post by JoshyPHP » Mon Dec 11, 2017 9:54 am

You can make it work efficiently but you'd have to pay for it with an increase in code complexity and development/maintenance cost. You can use a cache for post data, prepopulate the cache using the data from viewtopic events that contain all the required info for the posts displayed on the page and fetch the other quoted posts all at once. That's between 0 and 2 simple queries depending on the context, but it doesn't work when a post is displayed in search results or basically anywhere that's not viewtopic.

That's an extension that would probably take a couple of days to write and test. I noticed nobody mentioned controlling the current user's permissions to access the quote post's data.
I wrote the thing that does BBCodes in 3.2.

User avatar
AmigoJack
Registered User
Posts: 5390
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Clever quote testing

Post by AmigoJack » Mon Dec 11, 2017 10:44 am

グリーン ヒル ゾーン wrote:
Thu Nov 29, 1973 9:33 pm
nobody mentioned
While we're at it: parameter flooding is also accepted.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
canonknipser
Registered User
Posts: 1713
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Clever quote testing

Post by canonknipser » Mon Dec 11, 2017 11:59 am

JoshyPHP wrote:
Mon Dec 11, 2017 9:54 am
increase in code complexity
JoshyPHP wrote:
Mon Dec 11, 2017 9:54 am
controlling the current user's permissions to access the quote post's data.
Just make it simpler - use only the post-id as a backlink to the quoted post, discard user-id and time. The informations on user profile and posting time can be obtained when the user clicks the backlink to the originating post. If the post is not accessible (deleted, permissions missing etc.) the current viewtopic.php will check that like in any other post link inside the board.
And the notification "Someone quoted you ..." can still be triggered.
HiFiKabin wrote:
Mon Dec 11, 2017 9:41 am
you would have to check all quoted text within a post
You mean the quoted text is a kind of "protected area"? That would make the system much too complicated. Leave it as it is - don't check the quoted text. What happens if the source of the quoted text is edited? Change the quote the same way?
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3341
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Clever quote testing

Post by HiFiKabin » Mon Dec 11, 2017 12:05 pm

canonknipser wrote:
Mon Dec 11, 2017 11:59 am
HiFiKabin wrote:
Mon Dec 11, 2017 9:41 am
you would have to check all quoted text within a post
You mean the quoted text is a kind of "protected area"? That would make the system much too complicated. Leave it as it is - don't check the quoted text. What happens if the source of the quoted text is edited? Change the quote the same way?
Exactly the problem I was attempting to highlight.

User avatar
JoshyPHP
Code Contributor
Posts: 972
Joined: Mon Jul 11, 2011 12:28 am

Re: Clever quote testing

Post by JoshyPHP » Mon Dec 11, 2017 12:09 pm

@canonknipser It's the same complexity whether it's 1 piece of information or 10. You still need a cache, still need to prepopulate, etc...

I meant that by entering arbitrary values for post_id you could find out whether a post exists (possibly in a forum you don't have access to), who posted it and when.
I wrote the thing that does BBCodes in 3.2.

User avatar
canonknipser
Registered User
Posts: 1713
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Clever quote testing

Post by canonknipser » Mon Dec 11, 2017 12:36 pm

@joshyphp: my intention was: Don't check the post-id in-deep, just create a link to the post without forum and topic - viewtopic.php?p=14883576#p14883576
In that case, there should be no need to cache, no need for permissions checking etc.
Why do you need a link to the quoted users profile? If you feel the need for it, make sure the linked value is correct and can not be manipulated by changing a different parameter (user_id). Otherwise, go to the linked post and check the user's profile from there (if you have the permissions to access to post or the profile ...)
Why do you need to quoted posts time? If you really feel the need to display the time, use a text string (with the boards default datetime format?) a regular user can understand (as long we don't have a working WYSIWYG editor) - not a unix timestamp. From a programmers point of view, I understand the benefit of a timestamp, but unix timestamp are "black magic" to regular users
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
Ger
Recognised Extension Developer
Posts: 1792
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Clever quote testing

Post by Ger » Mon Dec 11, 2017 2:16 pm

canonknipser wrote:
Mon Dec 11, 2017 12:36 pm
Why do you need to quoted posts time? If you really feel the need to display the time, use a text string (with the boards default datetime format?) a regular user can understand (as long we don't have a working WYSIWYG editor) - not a unix timestamp. From a programmers point of view, I understand the benefit of a timestamp, but unix timestamp are "black magic" to regular users
Well, take an international board like this very one. People are visiting phpBB.com from each and every timezone, so you need converting to somewhat understand how long ago a posts was. Unix timestamp is the best approach.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

User avatar
P_I
Registered User
Posts: 860
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: Clever quote testing

Post by P_I » Mon Dec 11, 2017 2:40 pm

OP here.
Ger wrote:
Mon Dec 11, 2017 9:37 am
PS: wouldn't this discussion be better off at Area51?
A two part answer. Now that the discussion has moved from the nature of the problem into possible design solutions then yes it would be better off in Area51. Unfortunately the design team has closed the ticket as 'Invalid' and therefore the whole point of discussion is therefore probably moot.

My last comments on the matter since the ticket is now closed. I'm not in agreement with the decision and still believe this is a bug that should be addressed as some point. Rather than continuing to argue the point, I accept their decision with the following caveat.

Hopefully the design team will review all the comments and suggestions in this topic should they ever decide to change the design and functionality of how phpBB's quoting feature works. As I would expect, those of us well versed on how phpBB works and who are used to manually typing in BBCode will probably take a different viewpoint on the nature of this problem. I'm trying to think of the problem from the perspective of the more general phpBB forum user who doesn't care about how it works and the potential confusing or "spooky" behavior that could arise from some, likely uncommon but still very real, scenarios.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
canonknipser
Registered User
Posts: 1713
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Clever quote testing

Post by canonknipser » Mon Dec 11, 2017 2:58 pm

Ger wrote:
Mon Dec 11, 2017 2:16 pm
Unix timestamp is the best approach
Right, when you really, really, really need it - but who looks at the time? It is a redundant information in a quote - if you want the original posting time, click the link to the original post.


Most people will look only at the quote text, may be some of them at the username.

So, just 1 one parameter (post_id) added to the OLD (3.0 / 3.1) implementation would be enough. No need for time and user_id, IMHO.

The original approach for having the username changed in quotes when renaming a user would not be solved, but this is the same as in 3.0 and 3.1

To solve that, i think we need a more intelligent quote system, maybe with a separate table (quote_id, quote_text, qoute_orginal_post_id, quote_user_id ...) like the attachment system - or a more intelligent user rename system changing also post content, not only profile data.

edit:
P_I wrote:till believe this is a bug that should be addressed as some point
...
should they ever decide to change the design and functionality of how phpBB's quoting feature works.
:thumbsup:
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
AmigoJack
Registered User
Posts: 5390
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Clever quote testing

Post by AmigoJack » Mon Dec 11, 2017 3:46 pm

The parameter flooding lives on in the database, as I'm finding my own post by a keyword that nowhere is output - now I know how to ruin other boards.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

LaxSlash1993
Registered User
Posts: 181
Joined: Sat Sep 22, 2012 2:20 am

Re: Clever quote testing

Post by LaxSlash1993 » Thu Dec 28, 2017 6:01 pm

canonknipser wrote:
Sun Dec 10, 2017 8:54 pm
3Di wrote:
Sun Dec 10, 2017 7:59 pm
extension the duty to eventually do some magic here.
No need for any "Extension magic", if only the post_id would be referenced.
  • If a user is renamed, the new name will show up.
  • If a user is deleted with posts retaining, the quote would show "Guest" or the former username - depends on the implementation, both informations are present in the quoted post
  • If a post is deleted, no user is shown, but the quote is still there
  • If the post owner is changed via mcp, the new user will show up
I think that he means leave it to an extension to do. We find the stock behavior useful for two reasons:

- Sometimes we'll quote from hidden boards to public boards, and would like the smart quote information retained.

- When we delete posts, we'll log it by quoting the post in a hidden board. Smart quoting is useful so that we can retain info on who posted it originally.

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: Barrnet, stevemaury and 31 guests