[CDB] Live topic update

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][ALPHA] Live topic update

Post by Ger »

pkbarbiedoll wrote: Tue Oct 10, 2017 8:37 pm So if a user is on the last page, the live updates won't appear?
The opposite. :)
The check is only needed when a user is on the last page of a topic, so it's only executed on the last page. That will reduce the server load significantly while your user's will still have all the benefits.
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:

-Don't PM me for support-
kim902
I've Been Banned!
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Live topic update

Post by kim902 »

Ger wrote: Tue Oct 10, 2017 11:59 am I've updated the extension. It now has a setting for the interval to check for new posts and it only executes the check when the user is on the last page of a topic.
Also some modifications to the style and language.
Where is the settings too i have looked everywhere and dont see any ?
Hardest thing in life is accepting some one else has done it better.
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][ALPHA] Live topic update

Post by Ger »

ACP -> Tab General -> Load settings -> First block: Interval for live topic update
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:

-Don't PM me for support-
kim902
I've Been Banned!
Posts: 59
Joined: Wed Nov 09, 2016 5:49 pm

Re: [3.2][ALPHA] Live topic update

Post by kim902 »

:lol: The one place i did not look i went to post settings thanx.
Hardest thing in life is accepting some one else has done it better.
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][ALPHA] Live topic update

Post by Ger »

In an ideal world, I would have posted an update this week that asynchronously pulls and displays the actual new posts without the need of a complete reload. Unfortunately I won't be making this feature.

Reason for this is that I would have to rebuild most of viewtopic.php to make things work as they should:
  1. Check auth for visibillity (don't show unapproved or soft deleted posts to regular users)
  2. Friends/foes check
  3. Display moderator tools for posts if needed
  4. Mark read status
  5. Handle correct sort order
  6. Parse attachments
  7. Fetch user profile fields
  8. Handle notification marks (when you're quoted and show the post, mark notification as read)
  9. Handle all the 15 events in viewtopic
And probably more I've missed at this moment.
Also, It would probably make things quite difficult to keep up to date with each phpBB update.

Another thing that would be quite a PITA is that there is no separate template file for a post row, there is only 1 template file for the complete viewtopic page. Of course I could simple copy it and strip the unnecessary parts, but it will also mean that users with other style than prosilver will probably complain about errors.

All in all it comes down to the fact that viewtopic.php is quite old school in it's code, hasn't changed very much in the last decade (just a few features shoved into it).

TL;DR: functionality of this extension won't change: clicking on the bar will simply reload the viewtopic page and direct you to the first unread post.
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:

-Don't PM me for support-
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: [3.2][ALPHA] Live topic update

Post by jackennils »

That's a pitty. :(
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Live topic update

Post by Ger »

Upped to beta
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:

-Don't PM me for support-
gio73
Registered User
Posts: 64
Joined: Thu May 12, 2016 4:10 pm

Re: [3.2][BETA] Live topic update

Post by gio73 »

Nice one Ger keep up the good work ;)
Sorry for my bad English im using Google translate.
Styles
lifeguard81
Registered User
Posts: 147
Joined: Tue Dec 04, 2007 10:11 am

Re: [3.2][BETA] Live topic update

Post by lifeguard81 »

Nice job Ger, you make realy nice extensions!
Bye phpBB, hello Compo.sr A complete website package with news, forum, chat, gallery and much more!
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Live topic update

Post by Ger »

Thanks guys :)
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:

-Don't PM me for support-
User avatar
AmigoJack
Registered User
Posts: 6068
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: [3.2][ALPHA] Live topic update

Post by AmigoJack »

Ger wrote: Wed Oct 11, 2017 8:35 amI would have to rebuild most of viewtopic.php
Have you considered requesting just that and parsing the full HTML5 DOM to recognize new posts? Which should then be easily movable into the current document?
  • "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." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][ALPHA] Live topic update

Post by Ger »

AmigoJack wrote: Thu Nov 02, 2017 8:48 am
Ger wrote: Wed Oct 11, 2017 8:35 amI would have to rebuild most of viewtopic.php
Have you considered requesting just that and parsing the full HTML5 DOM to recognize new posts? Which should then be easily movable into the current document?
I have briefly considered and dismissed the idea. It would be very ugly in the first place since a single post is only a very small portion of an entire viewtopic page.
Next, it would be very hard to account for every style. Of course I know prosilver and the default phpBB output, but what about custom styles and extensions that change the expected output? It would mean I can only support a vanilla phpBB install and pray that it works on anything else. It would probably also mean that I would have quite some work explaining that over and over again even if I stated it in the requirements.

All that for a very small benefit.
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:

-Don't PM me for support-
User avatar
AmigoJack
Registered User
Posts: 6068
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: [3.2][BETA] Live topic update

Post by AmigoJack »

I don't expect any style to break the habit of having i.e. id="p14844151" in the wrapping element. This way around you don't have to take care for permissions, sort order, current page, language and whatnot - it's already rendered the way you need it. Which sounds less problematic than maintaining your own copy of /viewtopic.php.

You can still query your own PHP file to ask for new posts, which in return queries /viewtopic.php to get it fully rendered and already cuts it down to only the new posts (server side processing has only advantages: PCRE over REs in JS, saving traffic, most likely faster...).
  • "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." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Live topic update

Post by Ger »

AmigoJack wrote: Thu Nov 02, 2017 12:38 pm You can still query your own PHP file to ask for new posts, which in return queries /viewtopic.php to get it fully rendered and already cuts it down to only the new posts (server side processing has only advantages: PCRE over REs in JS, saving traffic, most likely faster...).
Using regular expressions for this kind of stuff always reminds me of Mr. Monroe:
Image
Wait, forgot to escape a space. Wheeeeee[taptaptap]eeeeee.


It's just hackish.
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:

-Don't PM me for support-
User avatar
Ger
Registered User
Posts: 2097
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Live topic update

Post by Ger »

Upped to RC, I'll submit this to the CDB within a couple of days if no issues come up.
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:

-Don't PM me for support-
Locked

Return to “Extensions in Development”