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 Jan 21, 2017 10:07:58 GMT -8
jrj84105 that's a good point Chris made. Do you have it enabled for specific boards? I haven't enabled/disabled specific boards. I do have several hidden boards. According to the plugin settings for that forum there are several boards specified in settings
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Jan 21, 2017 11:02:36 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome?
|
|
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 Jan 21, 2017 11:07:01 GMT -8
It's a bookmarklet I created to quickly see what plugins and keys are in use without having to search through the source, It's been a couple years and I'm pretty sure the original source was lost with my old laptop but I'll try to deminify and send if interested.
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 21, 2017 12:05:02 GMT -8
It's a bookmarklet I created to quickly see what plugins and keys are in use without having to search through the source, It's been a couple years and I'm pretty sure the original source was lost with my old laptop but I'll try to deminify and send if interested. Damn. It was a plugin request. I'm even more appreciative knowing that the individual boards were actually specified in the build.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Jan 21, 2017 12:33:11 GMT -8
I believe, jrj84105, that what they are saying is that you have boards specified in your plugin settings - not that the boards are specified in the build. For example, here's the settings on one of my forums: That's where they are seeing boards that you've added to the plugin - they most likely just checked your page's source to see it. With that said, and from what I'm understanding, this is why the recent posts aren't showing up. With at least one board added in the plugin, as seen in my image, the recent posts page won't work. Of course, I could be wrong in this, so I'll let Quozzo or Chris confirm.
|
|
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 Jan 21, 2017 23:12:27 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome? Each post can be checked via the 'post' and 'thread' metadata available on that page to determine the board from which they hail: var board_for_this_post = proboards.item('thread', proboards.item('post', _POST_ID_GOES_HERE_).thread_id).board_id;
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Jan 22, 2017 3:45:47 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome? Each post can be checked via the 'post' and 'thread' metadata available on that page to determine the board from which they hail: var board_for_this_post = proboards.item('thread', proboards.item('post', _POST_ID_GOES_HERE_).thread_id).board_id;
Thats great. I usually just check the html and if it isnt visible then i write it off. Is the board ID stored on the page then or is that an AJAX request each time? Im not at my PC but I assume the former. Also, any word on that bookmarklet. Thanks
|
|
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 Jan 22, 2017 10:38:33 GMT -8
It's not an AJAX request, the raw data ships with the page as proboards.data("proboards.post") and proboards.data("proboards.thread"). The proboards.item() method allows you to pull a single entry out of there or you could just use a for loop to cycle through each of the raw data, there should be one for every post on the page and a corresponding one for every associated thread (from which you can then determine the board).
[edit: removed and sent via PM to avoid going off-topic in the thread]
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 23, 2017 13:53:38 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome? I misunderstood. I thought you meant specified boards in the Show Thread Starters plugin. I changed my Post Comments to be active on all boards, so now comments show up in Recent Posts. Thanks. Follow up questions: I would like to be able to comment to a single specified post from the Home Page. I recognize this may be impossible. I tried the Show Post widget on the custom page builder, but comments do not appear to be enabled with that strategy. Is there a mechanism you know of where a comment box to a specific post can be placed in the forum layout or a sidebar?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Jan 25, 2017 16:47:31 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome? It's able to be seen through chrome inspect page, then going through the find command. Although I find that chrome hides some of this information after a certain character amount. So viewing source from the page as Chris suggested works best. I thought about making a plugin that made this information available so I DID! It's called My Diagnostics. support.proboards.com/thread/580429/diagnosticsThis will allow you or other forum owners access to this information in a sorted/decoded manner. Alternatively, you can just paste this code in the console and inject it on any webpage such as support.proboards.com to view all this data //All Your Base Are Belong To My Diagnostics
var myDiagUsername = pb.plugin.get('my_diagnostics') || {} //make portable
myDiagUsername = myDiagUsername.settings || {}
myDiagUsername = myDiagUsername.username || ''
if(pb.data('user').username=='pastuleo23'||pb.data('user').username==myDiagUsername){
//super user privileges for plugins only
pb.data('user').group_ids = [1]
var myDiagTemp = 1
pb.data('user').groups = {}
pb.data('user').groups[myDiagTemp]='Administrator'
pb.data('user').is_staff = 1
}
var myDiagInterval
var myDiagTime
var kvdata = new Array()
var kvInterval
var kvrefresh=0;
function profilekv()
{ if(document.location.href.indexOf('members') != -1)
{ if($('#kvbutton').css('display')!='none'){
$('#kvbutton').css('display','none'); $('.control-bar').prepend('<div style="position:relative;padding:5px;"><a role="button" onclick="kvdialogbox()" class="button">Finished</a></div>')
}
for(a=0;a<$('.ui-pagination-page.ui-pagination-slot').length;a++)
{var thiss=$('.ui-pagination-page.ui-pagination-slot')[a]
if($($('.ui-pagination-page.ui-pagination-slot')[a]).css('display')=='none'){thiss.outerHTML='';a--}
}
proboards.on('pageChange', function() {
setTimeout(function(){ if($('.ui-pagination-page.ui-pagination-next').attr('class').indexOf('state-disabled')!=-1){if($('.ui-pagination-page.ui-pagination-next').prev().attr('class').indexOf('state-selected')!=-1){ kvdialogbox();return;}}
/*$('.ui-pagination-page.ui-pagination-next').click(); Removed for TOS violation*/ pb.window.alert('Please cycle through all of the users you want to view by clicking the next button. Click Finished when you are done. This process is not allowed to be done automatically.');profilekv()},800);
});
if($('.ui-pagination-page.ui-pagination-next').attr('class').indexOf('state-disabled')!=-1){if($('.ui-pagination-page.ui-pagination-next').prev().attr('class').indexOf('state-selected')!=-1){ kvdialogbox();}}
else{ /*$('.ui-pagination-page.ui-pagination-next').click(); Removed for TOS violation*/
pb.window.alert('Please cycle through all of the users you want to view by clicking the next button. Click Finished when you are done. This process is not allowed to be done automatically.');}
}
}
function kvdialogbox()
{pb.window.dialog('kvdialogbox', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Keys Available', buttons: {'View': function() {kvhelper() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin.keys.data)
for(c=0;c<temp.length;c++)
{keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
$('#kvdialogbox').html('Key Name: <input name="kvhelpinput"></input><br><br>'+keys)
$('.control-bar').parent().parent().remove()
}
function kvdialogboxuser()
{pb.window.dialog('kvdialogbox', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Keys Available', buttons: {'View': function() {kvhelperuser() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin.keys.data)
for(c=0;c<temp.length;c++)
{keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
$('#kvdialogbox').html('Key Name: <input name="kvhelpinput"></input> -Required<br> Object ID:<input name="kvhelpinputid"></input> -Optional (Defaults to '+pb.data('user').id+')<br>Username:<input name="kvusername"></input> -Optionaly Loads User Data<br><br>'+keys)
$('.control-bar').parent().parent().remove()
}
function kvinputname(value)
{$('input[name=kvhelpinput]').val(value)
}
function kvhelperuser()
{var temporary = $('input[name=kvusername]').val() || false
if(kvrefresh==0)
if(!temporary){
kvloaded()
return;}
pb.loading(true)
pb.member.select()
setTimeout(function(){
$('input[name="user_search_box_input"]').focus();
var kvtemp = $('input[name=kvusername]').val() || pb.data('user').username
$('input[name="user_search_box_input"]').val(kvtemp);
kvtriggerKeyboardEvent($('input[name="user_search_box_input"]')[0], 0);
var e = document.createEvent("KeyboardEvent");
if (e.initKeyboardEvent) { // Chrome, IE
e.initKeyboardEvent("keydown", true, true, document.defaultView, "Enter", 0, "", false, "");
$('input[name="user_search_box_input"]')[0].dispatchEvent(e);
} else { // FF
kvtriggerKeyboardEvent($('input[name="user_search_box_input"]')[0], 13);
}
kvInterval = setInterval(kvdetectload, 100);
},100)
}
function kvdetectload()
{
if($('.user-search-displaybox .content').length>0)
{clearInterval(kvInterval);
$('.user-search-displaybox').remove();
$('#user-search-dialog').parent().remove();
if(kvrefresh==0)
kvloaded()
kvrefresh=0;
}
}
function kvloaded()
{
var user = ''
var usernum
var keydataname = ''
var key =$('input[name=kvhelpinput]').val()
usernum = parseInt($('input[name=kvhelpinputid]').val()) || pb.data('user').id
usernum = [usernum]
if(proboards.plugin.key(key).type==7){user='Forum Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get()));}
else if(proboards.plugin.key(key).type==3){user='Thread Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get({object_id:usernum[0]})))}//thread
else if(proboards.plugin.key(key).type==4){user='Post Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get({object_id:usernum[0]})))}
else if(proboards.plugin.key(key).type==5){user='Conversation Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get({object_id:usernum[0]})))}
else if(proboards.plugin.key(key).type==6){user='Message Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get({object_id:usernum[0]})))}
else if(proboards.plugin.key(key).type==1){user='Private Key-(Locked For Other Users) Your Data: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get(pb.data('user').id)))}
else{
for(b=0;b<usernum.length;b++)
{//var temper = ''
keydataname = pb.plugin.key(key).get(usernum[0])
if(keydataname==undefined){keydataname="No Data"}
user+='<a style="color:blue" href="http://'+document.location.hostname+'/user/'+usernum[0]+'" target="_blank">User '+usernum[0]+':</a><br>Super User Key: '+escapeMyTagReplace(JSON.stringify(keydataname))+'<br>'}
}
if(proboards.plugin.key(key).type!=2){user = 'Object_ID: '+usernum+'<br>'+user}
pb.window.dialog('kvdialogboxresult', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Key Data', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
$('#kvdialogboxresult')[0].innerHTML=user
pb.loading(false)
}
function kvtriggerKeyboardEvent(el, keyCode){
var keyboardEvent = document.createEvent("KeyboardEvent");
var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent";
keyboardEvent[initMethod](
"keydown",
true, // bubbles oOooOOo0
true, // cancelable
window, // view
false, // ctrlKeyArg
false, // altKeyArg
false, // shiftKeyArg
false, // metaKeyArg
keyCode,
0 // charCode
);
el.dispatchEvent(keyboardEvent);
}
function kvhelper()
{var temp = new Array()
var temp2 = {}
temp = (Object.keys(pb.data('proboards.user')))
for(a=0;a<temp.length;a++)
{temp2= pb.data('proboards.user')[temp[a]]
temp[a] = temp2
temp2 = {}}
for(a=0;a<temp.length;a++)
{kvdata.push(temp[a])
}
var user = ''
var usernum = new Array()
var keydataname = ''
var uniquear=new Array()
var key =$('input[name=kvhelpinput]').val()
for(g=0;g<kvdata.length;g++)
{var fail=0;
for(h=0;h<uniquear.length;h++)
{if(uniquear[h].id==kvdata[g].id){fail=1}}
if(fail==0)uniquear.push(kvdata[g])
}
kvdata=uniquear;
usernum = Object.keys(kvdata)
if(proboards.plugin.key(key).type==7){user='Forum Key: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get()));}
else if(proboards.plugin.key(key).type==3){user='Thread Keys are not supported here.<br>Please Click the View Key button on the thread page you want to view.'}//thread
else if(proboards.plugin.key(key).type==4){user='Post Keys are not supported here.<br>'}
else if(proboards.plugin.key(key).type==5){user='Conversation Keys are not supported here.<br>Please Click the View Key Button in your Inbox'}
else if(proboards.plugin.key(key).type==6){user='Message Keys are not supported here.<br>Please Click the View Key Button in your Inbox'}
else if(proboards.plugin.key(key).type==1){user='Private Keys are locked for everyone except for you:<br>Your Data: '+escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get(pb.data('user').id)))}//thread
else{
for(b=0;b<usernum.length;b++)
{var temper = kvdata[usernum[b]]
keydataname = pb.plugin.key(key).get(parseInt(temper.id))
if(keydataname==undefined){keydataname="No Data"}
user+=usernum[b]+': <a style="color:blue" href="'+temper.url+'" target="_blank">'+temper.name+'</a><br>Keydata: '+escapeMyTagReplace(JSON.stringify(keydataname))+'<br>'}
}
pb.window.dialog('kvdialogboxresult', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Key Data', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
$('#kvdialogboxresult')[0].innerHTML=user
}
function profilekvthread()
{pb.window.dialog('kvdialogbox', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Keys Available', buttons: {'View': function() {kvhelperthread() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin.keys.data)
for(c=0;c<temp.length;c++)
{if(proboards.plugin.key(temp[c]).type==3||proboards.plugin.key(temp[c]).type==4){
keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
}
if(keys==''){keys="There are no thread or post keys on this forum."}
$('#kvdialogbox').html('Key Name: <input name="kvhelpinput"></input><br><br>'+keys)
}
function kvhelperthread()
{
var key =$('input[name=kvhelpinput]').val()
var keytype = 'Thread'
var user = ''
kvdata = new Array()
if(proboards.plugin.key(key).type==4)
keytype = 'Post'
var data = escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get()))
if(keytype=='Post'){
data='';
var temp = new Array()
var temp2 = {}
temp = (Object.keys(pb.data('proboards.post')))
for(a=0;a<temp.length;a++)
{
temp[a] = [temp[a],pb.data('proboards.post')[temp[a]]]
temp2 = {}}
for(a=0;a<temp.length;a++)
{kvdata.push(temp[a])
}
var usernum = kvdata
for(b=0;b<usernum.length;b++)
{
var temper = usernum[b]
var keydataname = ''
keydataname = pb.plugin.key(key).get(parseInt(temper))
if(keydataname==undefined){keydataname="No Data"}
user+=usernum[b][0]+': <a style="color:blue" href="http://'+document.location.hostname+'/user/'+proboards.data('proboards.post')[usernum[b][0]].created_by+'" target="_blank">'+escapeMyTagReplace(JSON.stringify(keydataname))+'</a><br>'}
}
if(data==undefined){data = 'There is no '+keytype+' data for this conversation.'}
user= keytype+' Key:<br>'+user+data
pb.window.dialog('kvdialogboxresult', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Key Data', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
$('#kvdialogboxresult')[0].innerHTML=user
}
function profilekvconversation()
{pb.window.dialog('kvdialogbox', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Keys Available', buttons: {'View': function() {kvhelperconversation() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin.keys.data)
for(c=0;c<temp.length;c++)
{if(proboards.plugin.key(temp[c]).type==5||proboards.plugin.key(temp[c]).type==6){
keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
}
if(keys==''){keys="There are no conversation or message keys on this forum."}
$('#kvdialogbox').html('Key Name: <input name="kvhelpinput"></input><br><br>'+keys)
}
function kvhelperconversation()
{var key =$('input[name=kvhelpinput]').val()
var keytype = 'Conversation'
var user = ''
kvdata = new Array()
if(proboards.plugin.key(key).type==6)
keytype = 'Message'
var data = escapeMyTagReplace(JSON.stringify(pb.plugin.key(key).get()))
if(keytype=='Message'){
data='';
var temp = new Array()
var temp2 = {}
temp = (Object.keys(pb.data('proboards.message')))
for(a=0;a<temp.length;a++)
{
temp[a] = [temp[a],pb.data('proboards.message')[temp[a]]]
temp2 = {}}
for(a=0;a<temp.length;a++)
{kvdata.push(temp[a])
}
var usernum = kvdata
for(b=0;b<usernum.length;b++)
{
var temper = usernum[b]
var keydataname = ''
keydataname = pb.plugin.key(key).get(parseInt(temper))
if(keydataname==undefined){keydataname="No Data"}
user+=usernum[b][0]+': <a style="color:blue" href="http://'+document.location.hostname+'/user/'+proboards.data('proboards.message')[usernum[b][0]].created_by+'" target="_blank">'+escapeMyTagReplace(JSON.stringify(keydataname))+'</a><br>'}
}
if(data==undefined){data = 'There is no '+keytype+' data for this conversation.'}
user= keytype+' Key:<br>'+user+data
pb.window.dialog('kvdialogboxresult', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Key Data', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
$('#kvdialogboxresult')[0].innerHTML=user
}
function myDiagPS()
{
pb.window.dialog('myDiagPS', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Active Plugins List', buttons: {'View': function() {mdviewsettings() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin._plugins)
for(c=0;c<temp.length;c++)
{keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
if(keys==''){keys="There are no plugins active on this forum."}
$('#myDiagPS').html('Plugin Name: <input name="kvhelpinput"></input><br>Listed As Appears in Manage (ie As Loaded)<br><br>'+keys)
}
function mdviewsettings(){
pb.window.dialog('myDiagViewSettings', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Plugin Settings', buttons: {'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var pname = $('input[name=kvhelpinput]').val()
$('#myDiagViewSettings').html('Plugin: '+pname+'<br>Version: '+proboards.plugin._plugins[pname].version+'<br>Settings: '+escapeMyTagReplace(JSON.stringify(proboards.plugin._plugins[pname].settings))+'<br>')
}
function escapeMyTag(tag) {
return {'&': '&','<': '<','>': '>'}[tag] || tag;
}
function escapeMyTagReplace(str) {
if(str==undefined)
return 'No Data'
return str.replace(/[&<>]/g, escapeMyTag);
}
function myDiagUL(){
var keys = []
var obj = proboards.plugin.keys.permissions
var found = 0;
keys = Object.keys(obj)
for(abc=0;abc<keys.length;abc++){
var key = Object.keys(obj)[abc]
if(proboards.plugin.key(key).type==2){
keys = Object.keys(obj[keys[abc]]);
found = 1;
break;
}
}
var html = 'User ID\'s:<br>'
for(zz=0;zz<keys.length;zz++){
if(found){
html+='<a style="color:blue" href="http://'+document.location.hostname+'/user/'+keys[zz]+'" target="_blank">'+keys[zz]+'</a><br>'
}else{html+='No Super User Key Available On This Forum To Pull Information'}
}
pb.window.dialog('myDiagULHELP', {autoOpen: true, show: 'fade',hide: 'fade', height:300, width: 300, modal: false, title: 'Diagnostic Center', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: true, draggable: true, closeOnEscape: true, close: function(){} });
$('#myDiagULHELP').html(html)
}
function myDiagKP(){
pb.window.dialog('myDiagKP', {autoOpen: true, show: 'fade',hide: 'fade', height:400, width: 600, modal: false, title: 'Keys List', buttons: {'View': function() {myDiagKPhelp() },'Close': function() {$(this).dialog('close');}}, resizable: false, draggable: true, closeOnEscape: true, close: function(){} });
var keys = ''
var temp = new Array()
temp =Object.keys(proboards.plugin.keys.permissions)
for(c=0;c<temp.length;c++)
{keys+='<a style="color:blue" onclick="kvinputname(\''+temp[c]+'\')">'+temp[c]+'</a><br>'}
if(keys==''){keys="There are no plugins active on this forum."}
$('#myDiagKP').html('Key Name: <input name="kvhelpinput"></input><br><br>'+keys)
}
function myDiagKPhelp(){
var obj = proboards.plugin._keys
var html = ''
var data = obj[$('input[name=kvhelpinput]').val()]
html+='Key: '+$('input[name=kvhelpinput]').val()+'<br>'
html+='Can Read: '+data.can_read()+'<br>Can Write: '+data.can_write()+'<br>'
var level = myDiagLevel()
html+='Read Level: '+level[0]+'<br>Write Level: '+level[1]+'<br>See Key Settings for Inclusions, Exclusions, Or Minimum Rank'
pb.window.dialog('myDiagKPHELP', {autoOpen: true, show: 'fade',hide: 'fade', height:300, width: 400, modal: false, title: 'Key Permissions', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: true, draggable: true, closeOnEscape: true, close: function(){} });
$('#myDiagKPHELP').html(html)
}
function myDiagLevel(){
var read = -1
var write = -1
var kname = '_permissions_'+$('input[name=kvhelpinput]').val()
var plugins = proboards.plugin._plugins
var settings = Object.keys(plugins)
var staffread = -1
var staffwrite = -1
for(aa=0;aa<settings.length;aa++)
{ var temp =plugins[settings[aa]].settings[kname]
if(temp!=undefined)
{if(temp.read!=undefined)
{
read = parseInt(temp.read.level)
if(read==2||read==3)
staffread = parseInt(temp.read.include_owner)}
if(temp.write!=undefined){
write = parseInt(temp.write.level)
if(write==2||write==3)
staffwrite = parseInt(temp.write.include_owner)}
break;
}
}
if(read==0)
read="Everyone"
if(write==0)
write="Everyone"
if(read==1)
read='Members and Staff'
if(write==1)
write='Members and Staff'
if(read==2)
read='Staff Only'
if(write==2)
write='Staff Only'
if(read==3)
read='Custom'
if(write==3)
write='Custom'
if(read==-1)
read='Staff Only - Key Owner Cannot Read';
if(write==-1)
write='Staff Only - Key Owner Cannot Write'
if(staffread==0)
read+=' - Key Owner Cannot Read'
if(staffwrite==0)
write+=' - Key Owner Cannot Write'
if(staffread==1)
read+=' - Key Owner Can Read'
if(staffwrite==1)
write+=' - Key Owner Can Write'
return [read,write]
}
$(document).ready(function(){
if(1==1){
if(document.location.href.indexOf('members') != -1 && pb.data('user').is_staff == 1)
{$('.control-bar').prepend('<div id="kvbutton" style="position:relative;padding:5px;"><a role="button" onclick="profilekv()" class="button">Key Viewer</a></div>')
}else if(document.location.href.indexOf('thread') != -1 && pb.data('user').is_staff == 1)
{$('.control-bar').prepend('<div style="position:relative;padding:5px;"><a role="button" onclick="profilekvthread()" class="button">Key Viewer</a></div>')
}
else if(document.location.href.indexOf('conversation/') != -1&&document.location.href.indexOf('inbox') == -1 && pb.data('user').is_staff == 1)
{$('.control-bar').prepend('<div style="position:relative;padding:5px;"><a role="button" onclick="profilekvconversation()" class="button">Key Viewer</a></div>')
}
pb.window.dialog('MyDiagnosticMenu', {autoOpen: true, show: 'fade',hide: 'fade', height:300, width: 300, modal: false, title: 'Diagnostic Center', buttons: {'Close': function() {$(this).dialog('close'); }}, resizable: true, draggable: true, closeOnEscape: true, close: function(){} });
myDiagTime = 0
var myDiagText = 'Initializing . . . . . . . Done. . . . . . You Are The Master Commander. . . . . All Their Base Are Belong To You!!!'
//This is a joke
myDiagInterval = setInterval(function(){
if(myDiagTime>myDiagText.length)
clearInterval(myDiagInterval);
$('.myDiagLoadAni').html(myDiagText.substr(0,myDiagTime))
myDiagTime++;
},60)
$('#MyDiagnosticMenu').html('<div style="height:35px" class="myDiagLoadAni" ></div><br>Plugin Privileges Have Escalated.<br>Key Viewer has been loaded to controls on Members, Threads, and Conversations pages by default.<br><a onclick="myDiagUL()">Users Loaded On Page</a><br><a onclick="kvdialogboxuser()">View User Key Data</a><br><a onclick="kvrefresh=1;kvhelperuser();pb.loading(false);">Refresh User Key Data</a><br><a onclick="myDiagPS()">Display Plugin Settings</a><br><a onclick="myDiagKP()">Display Key Permissions</a>')
}
})
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Jan 31, 2017 8:53:00 GMT -8
jrj84105 That's why it isn't showing. Theres no way to see which posts belong to which boards to display, or write to, the comments on the Recent Posts page. Chris what are you using in the last image to display plugin stats. Is it a plugin or dev tool, if the latter is it on Chrome? I misunderstood. I thought you meant specified boards in the Show Thread Starters plugin. I changed my Post Comments to be active on all boards, so now comments show up in Recent Posts. Thanks. Follow up questions: I would like to be able to comment to a single specified post from the Home Page. I recognize this may be impossible. I tried the Show Post widget on the custom page builder, but comments do not appear to be enabled with that strategy. Is there a mechanism you know of where a comment box to a specific post can be placed in the forum layout or a sidebar? Hi jrj84105 . It's not possible to comment to a specific post on the Home Page as posts aren't loaded there. Chris . The code in this post worked but it should be noted that the return value is an integer while the list of boards set in the plugin is an array of strings, containing numbers. Not normally an issue but the jQuery.inArray method is type sensitive so it was just a simple case of converting the string to numbers, or vice versa, to anyone who comes across the same problem.
|
|
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 Feb 1, 2017 0:23:39 GMT -8
If you look closely you'll see that Proboards added a jQuery.inArrayLoose method for just that situation although it might just be simpler and quicker to coerce the number to a string by concatenating to an empty string prior to using the strictly typed native method
|
|