#FF6600
Closet Spammer
31801
0
1
Nov 22, 2024 5:29:02 GMT -8
wildmaven
Fear the Flying Flocks of Fiery Fury!!
35,651
October 2004
wildmaven
Wildmaven's Mini-Profile
|
Post by wildmaven on Oct 4, 2014 9:10:18 GMT -8
Eons ago, I was on a forum that, when you went to post your reply, a popup would sometimes appear saying, "there have been new posts since you started your reply, would you like to review them first", and you could select "yes" or "no, continue". Is such a thing possible here?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Oct 4, 2014 11:52:41 GMT -8
I'm afraid not, that would require accessing pages other then the current one, which is against the TOS.
|
|
Former Member
inherit
guest@proboards.com
195316
0
Nov 22, 2024 6:27:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 4, 2014 12:42:50 GMT -8
What I did if it's any help to you was to add the code below on the FORUM WRAPPER That shows a message saying = There Have Been New Posts Since Your Last Visit Would Like To View Them Now Clicking on the now link Takes you to the recent posts page.. Screenshots ADD YOUR FORUM URL WHERE IT SAYS IN BOLDAND CHANGE WIDTH TO SUIT YOUR FORUM YOU CAN ALSO CHANGE THE BACKGOUND COLOUR FORUM WRAPPER <br /><div class="container" id="important"> <center><div class="content-box" style="font-size: 16px; padding:10px; text-align: center; width: 980px; background: #FFFFFF"> {if !$[current_user.is_member]} <font size="3">Welcome Guest Please <a href="$[register_link.href]"><b>Register</b></a> or <a href="$[login_link.href]"><b>Login</b></a> To Gain Full Access To All Boards. <br>We Look Forward To Hearing From You</font><br> {else} <center><font size="3"><span>Welcome $[current_user.name]. You are now Logged In: </span> <a href="$[logout_link.href]"><b>Logout</b></a><br>You Have $[current_user.new_notifications] <a href=" /user/$[current_user.id]/notifications">Notifications</a> <br>There Have Been New Posts Since Your Last Visit Would Like To View Them <a href=" ADD YOUR FORUM URL HERE/posts/recent">Now</a></font></center> {/if} </div></center> </div><br> Steve
|
|
#FF6600
Closet Spammer
31801
0
1
Nov 22, 2024 5:29:02 GMT -8
wildmaven
Fear the Flying Flocks of Fiery Fury!!
35,651
October 2004
wildmaven
Wildmaven's Mini-Profile
|
Post by wildmaven on Oct 4, 2014 12:50:31 GMT -8
Thanks, Todge Oh well. @xsteveuk, that's not quite what I was going for. For example, as I'm writing this post, someone else may have posted in the thread while I was composing the post. Instead of just posting my reply, it would be nice if a little popup would come up if that happened, letting me know that I should maybe review the other post, as it may change what I was going to say.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 4, 2014 19:04:09 GMT -8
I know there were discussions in the past about including realtime notifications such as those in a Proboards plus package somewhere down the road but as Todge said, a plugin polling the server for new content like that would be against the TOS.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Oct 4, 2014 19:13:25 GMT -8
If we could get proboards.data('page').thread to include thread post count, it could be compared before and after posting to know if more then 1 post had been added
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Oct 5, 2014 15:58:59 GMT -8
proboards.data('lm_total'); will give the current thread's post count, but that won't help as you can't compare it before the new post is actually posted.
Now, if we could refresh the proboards.data and key data without refreshing the page itself, that would help with a few issues.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 5, 2014 19:34:48 GMT -8
Key data for plugins will update upon switching between bbcode and preview (ajax is sent which always returns a payload that also updates key and route data in the process) but unfortunately those are the only data categories updated without reloading the page. If you can pass the fact that a new post exists in key data then a notification system could be constructed whenever an ajax occurs by comparing newest timestamp living in a plugin key to proboards.data("page").thread.last_post_time. It wouldn't be realtime since dependent on user switching between tabs but could provide a way to deliver notification before posting which I believe was the gist of the request.
full disclosure: the wysiwyg caches previous ajax requests to cut down on traffic so switching back and forth without making a change would not generate an ajax request but instead use the cached data.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Oct 6, 2014 11:01:21 GMT -8
Switching back and forth between BBCode and Visual does not send an ajax request??
I was told to change my plugins to stop doing that automaticaly and they go and change it anyway??
Nice to know that there is a way to update the key data on the posting page though, now we need to find a way to do it in the background.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 6, 2014 12:33:07 GMT -8
Switching back and forth between BBCode and Visual does not send an ajax request?? I was told to change my plugins to stop doing that automaticaly and they go and change it anyway?? Nice to know that there is a way to update the key data on the posting page though, now we need to find a way to do it in the background. It's been that way as far back as I can remember, the cache couples the string content of that tab with any ajax response that previously converted that string of content to HTML or vice versa (this is during the life of the posting page, a reload destroys that cache). When a switch to a tab is performed the cache is then checked to see if this content already has a response and if so that cached response is used else a request is sent off for conversion.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 7, 2014 7:06:33 GMT -8
It is my sad and solemn duty to report that the key updates of which I spoke and saw earlier in the V5 development phase are still there but have been severely cut back. I suspect this is related to or occurred around the same time when there was a 15 minutes delay imposed between someone logging out and others actually seeing a change in the infocenter from that action. Such a change used to be instantaneous but now for reasons which I assume to be related to server resource conservation, there appears to be an undetermined delay between key writes and when they are acknowledged in ajax responses or just a complete decoupling under certain circumstances. The mechanism for those intra-pageload updates is still in place but it appears to be mostly wasted CPU cycles on my end now with the "_plugin_data" in the response payload being an empty object most of the time. I was able to get limited notifications when testing with dual browsers but not consistently enough to be used in production so there is a possibility it could be session cookie or IP related, something along the lines where the initiator of an action would not necessarily need notification of that action, so I will post an editable copy of the plugin here for others to play with, but I remain pessimistic that he idea still holds merit. occasionally a notification popup occurred but just too inconsistentlyexample of a WYSIWYG editor tab switch ajax response (note the empty _plugin_data yet one could determine the latest fashion accessory such as default avatar almost in realtime): {"html":"m","pb_data":{"_plugin_data":{},"default_avatar":"//images.proboards.com/v5/defaultavatar.png","insite_path":"","route":{"params":{},"name":"filter_bbcode2html"},"search_system":1,"ad_free":0},"content_score":0} btw "search_system" seems new and I would guess it is an indicator on the health of the online search system given the problems that have plagued it recently and could be useful to a plugin.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 14, 2014 12:35:21 GMT -8
Error 32 has to do with overflowing the capacity of the key being used to store the data (if I am remembering correctly) and I have a pruning algorithm in there to do garbage collection of notifications older than a certain time but I can't even remember if I finished hooking it up after realizing that I was not receiving any data from Proboards switching between accounts and browsers. I am pleasantly surprised to hear you say it is working and if that is indeed the case then that seed of hope I had that it may just require two or more people to test seems to have flourished into a blooming flower.
Like I said, there is a setting where you can set the amount of time before a notification gets tossed and if I remember it is defaulted to 5 minutes. What i can't remember is if it is even hooked up but since you say it is apparently working then I'll take a second look at it when I get some time on Friday. For now you should be able to clear the key (keys tab on plugin page in admin panel) and see if setting the time to something lower helps that situation.
EDIT
Scratch that, the 32 is a permission error, basically saying the user has no permission to write to the thread key to which they are currently composing a response, so assuming the object_id has been properly chosen by the code, the first question that comes to mind is, are these only guests getting the error when trying to post by any chance? If that is indeed the case then find this part in the JS component of the plugin
and change that first line to if(me.page.thread && proboards.data("user").is_logged_in){
* the "&& proboards.data("user").is_logged_in" part is what is being added to the line
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 16, 2014 15:21:01 GMT -8
The plugin doesn't have any walls or even a roof over it yet and was declared a lost cause when it was discovered that the land that it was being built upon was unsteady, it was definitely not meant for a production forum. That said however, I appreciate you taking the time to test it and show that it was in fact on a firmer ground that previously thought. I had posted it so others could play with it not realizing that it worked if the initiator of the data and the receiver of the data were two different people. What has changed was there apparently was an update by Proboards recently where the data which was previously sporadically received and never received if it was data created as a result of your own actions, now appears to be returned on every ajax payload regardless of whether there was a change in data and even when that data was of your own making (that's why you now get notified of your own posts). This however is actually great news for plugin authors since there is a new a source that can be checked for key updates without needing to reload the page.
The plugin wasn't written for this new uber-sweet situation (thank you Proboards and all diabetics should beware) but I did write a first draft addressing this new behavior and uploaded it late yesterday. If you wish to test it then I suggest limiting it to one skin so those who wish to test can do so by switching to that skin.Also keep in mind it is still just a skeleton and the zombies won't really get to have a proper feast until some flesh is actually added and I plan to do some fleshing out either later tonight or tomorrow (time permitting).
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Oct 16, 2014 16:57:11 GMT -8
Its still requiring it to switch editors then right?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 17, 2014 1:49:45 GMT -8
Its still requiring it to switch editors then right? Any ajax inducing action on the part of the user: switching editor tabs, page change, liking a post , bookmarking a thread, viewing participated topics, picking nose, etc.
|
|