Former Member
inherit
guest@proboards.com
225992
0
Nov 25, 2024 20:33:37 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 3, 2017 16:28:10 GMT -8
this kind of stuff needs to be done on the server, people trying to canvas over it, clearly don't understand what Javascript is. If the feature is not baked in, it cannot be 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 Jul 3, 2017 16:36:36 GMT -8
It CAN be done @synthtec, the only issue with doing it with JS is the fact that people in the know will be able to circumvent the code.
|
|
Former Member
inherit
guest@proboards.com
225992
0
Nov 25, 2024 20:33:37 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 3, 2017 16:48:15 GMT -8
Todge you know yourself, javascript is a frontend language, and implies NO security model. Sure you can mask certain things, but we both know it's not an ideal option. You are no fool, iv'e see some of the plugins you have made, you cannot honestly tell me, masking is a good alternative. ? Your point is it works for the average joe soap, right? Most of the users are quite good with tech and will have Zero problem overriding your safe guards.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 3, 2017 17:22:02 GMT -8
Yup, both 'display: none' and 'visibility: hidden' will hide the cell, all we have to do is try and work out why the plugin isn't doing it for you... I notice that the post that has refused to disappear is quoting another post.. Is this the case with ALL the posts that are not being removed? No. It has nothing to do with quoting. That one just happened to have a quote in it. It's the member that doesn't "hide". None of their posts "hide "whether they contain a quoted post or not.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 3, 2017 17:26:38 GMT -8
Todge you know yourself, javascript is a frontend language, and implies NO security model. Sure you can mask certain things, but we both know it's not an ideal option. You are no fool, iv'e see some of the plugins you have made, you cannot honestly tell me, masking is a good alternative. ? Your point is it works for the average joe soap, right? Most of the users are quite good with tech and will have Zero problem overriding your safe guards. For the record, I KNOW that JS can be circumvented, and I KNOW as a plugin it won't run on the mobile version... but TPTB have decreed that it will NOT be an option, so I'm going with the "a rickety fence, even with a few holes in it, is better than no fence at all" theory. As I mentioned previously though, I do have it set so the forum won't load without Javascript enabled... so on a regular PC most "cafe grade" users won't be able to get around it. ETA: It would be nice if TPTB at PB would implement this as an option, considering that the power to block is already a built in feature... but it's their call to do or not do things and while I disagree in this instance, I do respect their right to make that call.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 7, 2017 23:52:20 GMT -8
Todge, I finally got it tested as the ONLY plugin running (all other plugins unchecked), and it's got the same problem... some are blocked, some aren't (same ones as when I tested it before, I used them because of known results using them). There was one MINOR difference this time that I didn't notice previously (could have just missed it though)... on the ones where the post WAS removed, the signature remained... present, parsed for space, and visible. ETA: re-tested with all plugins running and it is leaving the signature then too. I just somehow missed them previously, I guess.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 8, 2017 2:35:04 GMT -8
This would take it out of the realm of plugins, but... I just had a thought, is there a simple JS snippet that could be used where I would manually input blocking members into a footer/header as necessary?
I'm not a Javascript coder, but something simple like this (written as best that I can describe it) seems doable:
table { Member1, Member2 Member3, Member4 }
Do {until end of table reached if { variable-that-displays-"Welcome [Member Name]" = first-in-line-on-table if { variable-for-post-posted-by = second-in-line-on-table display: none } /if } /if } Loop
Using their "@name" , not their displayed-name that they can easily change
Just a thought...
|
|
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 Jul 8, 2017 7:15:34 GMT -8
This is a hack approach and requires template modification, but you can make the following adjustments: - In the Forum Wrapper template, change
<body> to
<body class="useris-$[current_user.username]">
- In the Thread > Post List template, change
<tr id="$[post.content_id]" class="$[post.content_class]{if $[post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if}"> to
<tr id="$[post.content_id]" class="$[post.content_class]{if $[post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if} postby-$[post.created_by.username]">
- In the Forum Wrapper template, immediately before
</head> insert
<style> .useris-syonidv .postby-richardintn { display: none; } .useris-hrcftw .postby-lovetrump { display: none; } </style>
where each rule hides posts by the member with the red username from the member whose username is in blue. You can include as many rules as you like.
Alternatively, you can add the rules to a global .CSS component of one of your plugins (omit the <style> and </style> in this case), which gives you the benefit of not having to modify the forum wrapper for every single theme every time you want to change the rules.
I've never used the mobile version of PB, hence I don't know whether it respects templates and/or CSS components of plugins. I suspect it supports neither.
The usual disclaimers apply: This is all client-side magic; it can be easily circumvented by anyone with a modicum of browser know-how. It also requires template modification (at the very least for steps 1 and 2), hence you'll get a crash course in Proboards template editing. a.k.a. "template detention", as you make identical changes to all 125 themes on your forum. If you limit yourself to 6 hours of sleep per day, you should be able to finish by the end of July. On the plus side: no plugins or scripts involved, and no need to look up numeric user IDs. Finally, in case it isn't obvious from the CSS, the hack completely hides the posts, removing them from the layout. If you want placeholder content, that's also possible, so just ask.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 8, 2017 16:09:48 GMT -8
I'm guessing that would have to go on each individual theme though... That's a bit TOO unwieldy to deal with as members need adding to it and/or removing from it (the initial install of it wouldn't be a big deal... I've installed changes across all themes before, just took a few hours... but they were all "one and done" because once done they are all left alone, this would need amending each time there's a change... doing that to all themes every time is just too time-prohibitive).
|
|
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 Jul 8, 2017 16:32:05 GMT -8
I'm guessing that would have to go on each individual theme though... That's a bit TOO unwieldy to deal with as members need adding to it and/or removing from it (the initial install of it wouldn't be a big deal... I've installed changes across all themes before, just took a few hours... but they were all "one and done" because once done they are all left alone, this would need amending each time there's a change... doing that to all themes every time is just too time-prohibitive). If you use the alternate version of step 3, it's a one-time install. The only thing you'd need to do to add/remove blocks beyond that point is edit the CSS component of whatever plugin is hosting the CSS.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 8, 2017 17:19:38 GMT -8
I'm guessing that would have to go on each individual theme though... That's a bit TOO unwieldy to deal with as members need adding to it and/or removing from it (the initial install of it wouldn't be a big deal... I've installed changes across all themes before, just took a few hours... but they were all "one and done" because once done they are all left alone, this would need amending each time there's a change... doing that to all themes every time is just too time-prohibitive). If you use the alternate version of step 3, it's a one-time install. The only thing you'd need to do to add/remove blocks beyond that point is edit the CSS component of whatever plugin is hosting the CSS. Can I put the CSS in a header or footer (the Global, or maybe the General one), instead of a plugin (I wouldn't want to risk screwing up a properly functioning plugin by editing it in any way, plus if I update the plugin for some reason in the future {the next "photobucket fiasco" perhaps?}, this edit would vanish)?
|
|
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 Jul 8, 2017 22:03:24 GMT -8
If you use the alternate version of step 3, it's a one-time install. The only thing you'd need to do to add/remove blocks beyond that point is edit the CSS component of whatever plugin is hosting the CSS. Can I put the CSS in a header or footer (the Global, or maybe the General one), instead of a plugin (I wouldn't want to risk screwing up a properly functioning plugin by editing it in any way, plus if I update the plugin for some reason in the future {the next "photobucket fiasco" perhaps?}, this edit would vanish)? You can. Or create a new plugin, which is what I would do. It's generally a good idea to have a "tweaks" plugin that contains any miscellaneous modifications to a forum not associated with any plugin. Your call.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 9, 2017 2:29:22 GMT -8
I'll look into this later tomorrow. Time for me to be getting my paperwork in order now, so I can head home.
I'll set it up in a "test theme" that I have then, see if it works.
|
|
inherit
210338
0
Nov 21, 2024 20:26:10 GMT -8
RichardInTN
472
June 2014
richardintn
|
Post by RichardInTN on Jul 9, 2017 18:54:46 GMT -8
Looks like that might just work (too bad it has to be done in themes and can't be done in a header or footer though).
(won't affect "Mobile Version" though... as expected)
|
|
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 Jul 10, 2017 5:23:27 GMT -8
Looks like that might just work (too bad it has to be done in themes and can't be done in a header or footer though). (won't affect "Mobile Version" though... as expected) Mobile isn't even your biggest problem. They need only view your forum while logged out and the posts are right there. If you're fine with using scripts, you can dump (() => { let block_list = [ { blocker: 'syonidv', blockee: 'richardintn', blockee_id: 123 }, { blocker: 'vegan4ever', blockee: 'meatluvr82', blockee_id: 2000 } ];
function seenoevil() { block_list.forEach( rule => { if( proboards.data('user').username !== rule.blocker ) return;
$(`.mini-profile a.user-link[href$="/${rule.blockee_id}"]`).closest('.post').css( 'display', 'none' ); $(`div.quote[author="@${rule.blockee}"]`).html( '...' ); } ); }
$( seenoevil ); proboards.on( 'afterSearch', seenoevil ); proboards.on( 'pageChange', seenoevil ); })(); into a plugin JS component, or wrap it in a <script> tag and dump it into a global header/footer. No template mods required. Adding/removing rules should be self-explanatory. The script will also redact a blockee's quotes from other members' posts.
|
|