inherit
147439
0
Oct 15, 2013 3:44:38 GMT -8
britannia
343
September 2009
britannia
|
Post by britannia on Feb 13, 2013 15:14:26 GMT -8
I have a useful code in my V4 board which stops posters starting a thread and then deleting the initial post once there have been replies. The code obviously didn't work in my V5 test board so I was wondering if there was any chance of a plugin or a new code for V5.
Thanks for any help or advice in advance.
|
|
inherit
168679
0
Nov 18, 2012 17:03:07 GMT -8
Virgil Sovereign
Latet anguis in herba.
686
July 2011
syonidv
|
Post by Virgil Sovereign on Feb 13, 2013 20:58:43 GMT -8
britannia: It's all but impossible to prevent deletion of OPs only in all contexts since Proboards doesn't attach any data to individual posts indicating their order in the threads they appear in. However, you can use the following plugin to prevent members from deleting OPs using the 'standard' method, i.e. by visiting the first page of the thread and choosing 'Delete Post' from the menu. No OP Deletion.pbp (487 B) Members will still be able to delete OPs in the other contexts in which the posts are viewable, and there are many, such as viewing a list of a member's recent posts, searching for posts, viewing the most recent posts in a forum, etc. Finally, I'll point out that this plugin is currently susceptible to an insufferable Proboards v5 bug where the data registry for a page that is accessible to scripts will not contain valid data if the page is accessed by clicking on the "control bar" that floats down on the top of the page. The problem can only be resolved by refreshing the page, or by accessing a page from any other means than the control bar. I am holding out hope that Proboards will fix this bug sometime soon and we will not have to resort to the old v4.5 methods of trying to scavenge useable page data from random scraps of markup and page URLs.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Feb 14, 2013 11:05:57 GMT -8
PB Are working on a solution to that problem VS, though it may mean a little recoding so that when pages are changed it will call a function, rather than just run a script.
I have a small code that changes the pagination links into 'real' links, so flipping from page to page will indeed cause a refresh.
|
|
inherit
168679
0
Nov 18, 2012 17:03:07 GMT -8
Virgil Sovereign
Latet anguis in herba.
686
July 2011
syonidv
|
Post by Virgil Sovereign on Feb 14, 2013 13:43:01 GMT -8
Todge, maybe you could shed some light on the subject for me. In the page hierarchy, the links look like regular links. Anchor tags with the standard href attribute. But there's no denying that the page they take you to is different from the standard page. The only way I was able to reason it was that Proboards serves up a different page based on the referrer, because the query string in the address bar definitely changes and I know of no way to do that that doesn't force the browser to send out a new HTTP request for the new page. But it almost seems as though Proboards is trying to swap in new content via AJAX, because the scripts aren't re-run, the headers and footers are missing, and the page information in proboards.data(...) is wrong. I also noticed that classes I added to the body were still present. And now your comment about the links not being 'real' links. Set me straight here, because if it's not an issue of the referrer, the only explanation I can think of is that for some perverse reason Proboards is capturing the click event before it gets to the link (which apparently has a href attribute for no reason whatsoever), somehow modifying the URL in the address bar without causing the browser to send out an HTTP request, and then reloading practically the entire page--incorrectly--via AJAX rather than simply navigating to the actual page the link points to. Is this really and truly what they've done?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Feb 14, 2013 17:20:39 GMT -8
As far as I can tell, yes. When I implied the pagination links are not 'real' links, all I meant was that they didn't send you to another page as normal, instead they seem to change some of the data displayed, the posts and the ads, but seems to ignore any other content. How they achieve this I have no idea. The only odd thing I see with the pagination links is the 'rel' attribute, 'norewrite', as far as I can tell, is not a valid value, and which would be ignored by the browser anyway.
The way I got around it was to add an onclick event to the links, surely, if PB was capturing the click event before it was getting to the link, then the onclick event I applied to them would be ignored too?
As to why it's been done this way, I'm afraid I have no idea.
|
|
inherit
168679
0
Nov 18, 2012 17:03:07 GMT -8
Virgil Sovereign
Latet anguis in herba.
686
July 2011
syonidv
|
Post by Virgil Sovereign on Feb 14, 2013 19:40:13 GMT -8
OK. I actually just looked at the AJAX activity on the page and confirmed our theory. Proboards, Proboards, Proboards... They threw us under the bus to reduce their server hit by maybe 2 KB worth of compressed data.
|
|