inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Nov 12, 2013 13:50:35 GMT -8
this was an idea to show you the info you'd need to work for to know what it is...
basically, I needed to know what I was looking at, so the plugin started by displaying: Plugin Developer Info: proboards.data('route').name = 'thread' //for testing the name of the current page at the very top of the page, just under the header.
I'm looking to extend this plugin to display more data you can't easily find by simply viewing the HTML of the current page, but I need input as to what exactly isn't documented that you (as a plugin developer) would like to know.
EDIT: note, this is not a plugin for all to see. it's best if you create a custom group for specific users, and set that group for those people you want to see the info.
|
|
Former Member
inherit
guest@proboards.com
201960
0
Nov 27, 2024 15:20:04 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 12, 2013 14:34:23 GMT -8
All of this stuff is in the global scope, so anyone can access it via firebug or chrome tools. Those tools are there to help you debug.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Nov 12, 2013 14:35:39 GMT -8
$.each(proboards.dataHash, function(index, value) { if(typeof value == 'string' || typeof value == 'number') { console.log(index + ': ' + value); } else { console.log(index + ':'); console.dir(value); } }); Will do pretty much anything you could want, and it already uses all the data available to the page in that way. As an added bonus, it'll display in your console instead of at the top of your forum, so it won't mess up the visuals of your forum while you're developing. Also, if you're running Javascript from a plugin, it's usually a good idea to put it in a Javascript component, rather than in script tags in a header/footer component. As a side note, if you still want it displayed to the page itself, you'll probably want to look into integrating a jQuery plugin like these or rolling your own version. That'll make it easier to see the structure of some of the more comlex JSON objects that are possible without having to hardcode in the structure.
|
|
inherit
172351
0
Sept 5, 2019 10:56:35 GMT -8
DarkPikachu
Complexity == Fun
320
October 2011
tcll
|
Post by DarkPikachu on Nov 12, 2013 15:09:40 GMT -8
Also, if you're running Javascript from a plugin, it's usually a good idea to put it in a Javascript component, rather than in script tags in a header/footer component. ah, thanx for the tip post BBC parsing though is required to be in the footer though right?? or no?? yeh, the console tends to clutter up my work area, so that's why I went for the page... thanx though and thanx, that'll come in handy
|
|