inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 11, 2014 21:39:04 GMT -8
I dont remember why I multiplied by 2, but divide that number by 2 and compare to 64K
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 4, 2024 7:52:02 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 11, 2014 22:17:17 GMT -8
so just to see if i'm getting this right. If I divide total setting size by 2 and that's 63720 bits and that equals approximately 7.77 kb?
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 12, 2014 3:53:41 GMT -8
62.2k
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 12, 2014 3:57:04 GMT -8
And remember 64k = 65536 bytes
|
|
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 Jul 14, 2014 8:37:26 GMT -8
The limit definitely wasn't raised.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 4, 2024 7:52:02 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 20, 2014 8:27:16 GMT -8
Just a question. I wanted to add more data to the shop plug in but I wanted to make sure I had room.
name: pixeldepth_monetary_shop total settings size: 65237 bytes (63.7 kb) data size: 53928 bytes (52.66 kb)
What total do I go by when I bring up the info?
|
|
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 Aug 20, 2014 9:34:53 GMT -8
I believe it's the 'total settings size', which would indicate you're getting close to the limit.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 4, 2024 7:52:02 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 20, 2014 20:17:25 GMT -8
I believe it's the 'total settings size', which would indicate you're getting close to the limit. Thanks!
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 20, 2014 23:18:37 GMT -8
exactly that. the "data" thing was me just looking at physical memory being used by the variable storage. different variables cost different memory usage depending on what kinf of variable they are (char, int, string, float, object).
|
|
inherit
224902
0
Feb 15, 2017 12:50:39 GMT -8
Matt
2,940
September 2015
mattyboo1
|
Post by Matt on Dec 31, 2015 8:23:16 GMT -8
Plugin settings are capped at 64kb of storage. this includes not only data you have added into the settings, but the settings setups themselves. place this code in your global header or footer. it will put a little orange plug down in the pbn-tray in the bottom right corner. clicking the image will put up a dialog listing all of the plugins you have running and the storage space they take up. the more important number is the "total settings size". if that is approaching 64k, then you are going to start having issues. <script type="text/javascript"> <!-- // plugin settings size check // roughSizeOfObject function found on http://stackoverflow.com/questions/1248302/javascript-object-size // by Wormopolis // v1.01
function roughSizeOfObject( object ) {
var objectList = []; var stack = [ object ]; var bytes = 0;
while ( stack.length ) { var value = stack.pop(); if ( typeof value === 'boolean' ) { bytes += 4; } else if ( typeof value === 'string' ) { bytes += value.length * 2; } else if ( typeof value === 'number' ) { bytes += 8; } else if ( typeof value === 'object' && objectList.indexOf( value ) === -1 ) { objectList.push( value );
for( i in value ) { stack.push( value[ i ] ); } } } return bytes; }
function getSettingsSize() { var ret='';
for(pn in proboards.plugin._plugins) { var totalSize=JSON.stringify(proboards.plugin._plugins[pn]).length; var getback=roughSizeOfObject(proboards.plugin._plugins[pn]); var kconvert1=parseInt((100*totalSize/1024))/100.0, kconvert2=parseInt(100*getback/1024)/100.0; ret+='<font size="3">name: '+pn+'</font><br><font style="margin-left:15px">total settings size: '+totalSize+' bytes ('+kconvert1+' kb)</font><br><font style="margin-left:15px">data size: '+getback+' bytes ('+kconvert2+' kb)</font><br><br>'; } proboards.dialog("Plugin_Settings_Sizes", { html : ret, title : "Plugin Settings Sizes", hide: "puff", show: "fold", height : 500, width : 700, resizable : false, autoOpen : true }); } $(document).ready(function(){ $('div#pbn-bar').css('width','auto').append($('<img src="http://i197./aa250/WORMOPOLIS/02920338-e74f-4011-83a6-7902a779b33f.jpg">').css({'display':'inline-block','margin-right':'2px'}).bind('click',getSettingsSize));
}); </script>
Wormopolisis there a way to make this viewable to staff users only?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Dec 31, 2015 9:31:54 GMT -8
Change this part: To this:
|
|
inherit
224902
0
Feb 15, 2017 12:50:39 GMT -8
Matt
2,940
September 2015
mattyboo1
|
Post by Matt on Jan 1, 2016 8:23:04 GMT -8
Change this part: To this: Brian I can't find where that part is.
|
|
inherit
209486
0
Mar 6, 2016 15:03:59 GMT -8
T.C.
2,614
May 2014
tacochuck
|
Post by T.C. on Jan 1, 2016 8:49:52 GMT -8
5 lines above the closing </script> tag.
|
|
inherit
224902
0
Feb 15, 2017 12:50:39 GMT -8
Matt
2,940
September 2015
mattyboo1
|
Post by Matt on Jan 1, 2016 19:59:19 GMT -8
5 lines above the closing </script> tag. Thanks, Works perfectly! EDIT: actually is there something that can restrict it not only to just staff, but to just me ( admin )
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Jan 1, 2016 20:16:37 GMT -8
Hi, Matt. If you want it so just you has access to it, change this line: if(pb.data('user').is_staff)
to this: if(pb.data('user').id == 1)
See if that works for you.
|
|