|
Hidden Staff Edits v0.2.0This code hides the "edited by" text if the editor is staff so that members do not automatically know that a staff member has edited their post. The code must be updated to add staff members through the built in plugin variable system. Download:v0.2.0
Last Edit: Jan 17, 2013 2:38:35 GMT by Joe Kerr
|
Building Your Proboard, a Basic Guide to Getting Your Forum Started
Need somewhere to host files?[/url]
|
|
|
|
Maybe let them manually enter group IDs to simplify the process?
Does it hide edits on their own post?
|
|
|
|
|
1. I am not great at this so I didn't exactly know how to check the group id of the person who edited the post. I can look into that... 2. I believe right now it would....i should change that too Like I said I am not great with loops and stuff so I have to find a way to check the name back to the name of the post it's in which is something I have no idea how to do right now. I will just have to stare at some things for a while
|
Building Your Proboard, a Basic Guide to Getting Your Forum Started
Need somewhere to host files?[/url]
|
|
|
|
1) Any username link contains the class "group-##", so you can check that way. 2) How are you determining last-edit right now? There is definitely a pattern you can find from the last edit span (I think it is), back to the link before it.
|
|
|
|
|
|
1) That...makes it much more simple 2) I believe I am searching for the div tag with the last-edit id, class, or whatever it is Then I am searching inside it for the usernames... 2) Ah. So, once you get that object, we're going to walk the DOM tree. We'll want to iterate up to the first table parent, then grab the mini-profile (so that it'll be the MP for that post), and then see which user that is. So, I'd maybe do this: $(".edited_by").each(function(){ // I'm assuming your loop looks like this var table = $(this).closest("table"); var miniprofile = $(".mini-profile", table); var username_of_poster = ... // Some code here to get username from miniprofile });
|
|
|
|
|
Why don't I just post what I got right now? I don't have time to dig into it today...maybe tomorrow...hopefully $(document).ready(function() { $('.edited_by').each(function() { var staff_id = $(this).find('a').attr('href').replace(/\/user\//i,''); if( $.inArray( staff_id.toString(), proboards.plugin.get('hidden_staff_edits').settings.Stafmems ) > -1 ) { $(this).hide(); } }); }); So I checked for the edited by class, found the link and checked it too. Yea, I think I sorta see how to do it.
Last Edit: Jan 12, 2013 19:55:10 GMT by Joe Kerr
|
Building Your Proboard, a Basic Guide to Getting Your Forum Started
Need somewhere to host files?[/url]
|
|
|
|
The snipurl does not exist it says.
|
|
|
|