[021] Real time threads [Deleted]

Suggestion:

1. The typing block should be cleared instantly after the user posts the reply.
Right now, even if the post is already posted, user x's typing is still shown for a second.

2. How about adding a sound alert when a new post is posted on the current thread the user is viewing?

3. Disconnect from the web socket when a user minimizes the browser or switches browser tabs to save server resources.
When the user returns to the browser tab, the web socket connection will be restored immediately.

4. On the typing block, any plans on showing the avatars also?
 
Hello, @rdn

You have good suggestions, but their implementation takes time. I think that updates for this add-on will go to the community fundraiser. Over time, I will create separate pages for funding.

Regards,
021
 
Hello, @rdn

You have good suggestions, but their implementation takes time. I think that updates for this add-on will go to the community fundraiser. Over time, I will create separate pages for funding.

Regards,
021
XenForo doesn't allow crowdsourcing for add-ons (or updates). I've had posts deleted because I mentioned that someone else wanted to help fund a feature, as an example.
 
XenForo doesn't allow crowdsourcing for add-ons (or updates). I've had posts deleted because I mentioned that someone else wanted to help fund a feature, as an example.
I did not find anything about this in the rules, it would be strange to prohibit developers from receiving donations for their work
 
I did not find anything about this in the rules, it would be strange to prohibit developers from receiving donations for their work

Funding features is allowed (I do it all the time), but crowdfunding isn't.
 
  • Like
Reactions: 021
Just FYI if someone wanted to make it work with guest page caching, there's a note on the page where you enable guest page caching:

View attachment 285568

Specifically this part:


A cached page doesn't have a CSRF token, so when a user is presented with a cached page, the the first thing it does is fetch a valid CSRF token for the user so they can make POST/AJAX requests. But if something else fires a request that requires a CSRF token before the CSRF token can be retrieved, you would end up with the security error. It's not hard to make sure you have a CSRF token before making the request, but it would need to be logic added to whatever is making the request. If you want it to work with guest page caching anyway...
Just to follow up with this, in case someone wants an easy way to do this (check if CSRF exists before making an AJAX/POST request immediately on page load... This is some custom JavaScript used for one of my internal addons:

JavaScript:
XF.MarketplaceOrder = XF.Element.newHandler({
		init: function ()
		{
			if (XF.config.csrf.length > 1)
			{
				this.doInit();
			}
			else
			{
				setTimeout(function(){
					this.init();
				}.bind(this), 50);
			}
		},

		doInit: function()
		{
			this.showOrder();
		},

		showOrder: function()
		{
			XF.ajax('get',
				this.options.href,
				null,
				function(data)
				{
					XF.overlayMessage(data.html.title, data.html.content);
					return;
				}
			);
		}
	});
	XF.Element.register('marketplace-order', 'XF.MarketplaceOrder');
}
(jQuery, window, document);

When the JavaScript calls init() (a standard thing in XenForo JavaScript classes), it checks if there's a CSRF token, if it's there, it proceeds. If there's not yet a CSRF token (due to something like guest page caching), it goes into a loop that checks if there's a CSRF token every 50ms and once in shows up, it proceeds (guest page caching fetches a CSRF token upon page load).

Anyway, the premise is the same for anything... wait until we have a CSRF token before triggering something that requires a CSRF token immediately on page load.
 
Is it possible to add a new reply (from another user) at the end of a thread instead of at the end of the page you are currently viewing? Or is that a Xenforo "feature"?
 
Is it possible to add a new reply (from another user) at the end of a thread instead of at the end of the page you are currently viewing? Or is that a Xenforo "feature"?
@021 -- Can you comment on this? I'm having an issue with this in a very active thread causing problems. Finding a way to fix that would be ideal without having to disable the add-on.
 
Hey @021 does this have a graceful fallback i.e. if soketi server is down then users can still reply to threads without generating front end errors?
 
Hey @021 does this have a graceful fallback i.e. if soketi server is down then users can still reply to threads without generating front end errors?
Yes, the websocket service state will not affect the forum functioning in any way
 
Top Bottom