.gpWidget { display: none; }
(function(){ // Enter Widget title then in parenthesis include the access level number // One widget: "Title(#)" // the "#" in parenthesis is the access level number of that widget // Two widgets: "Title 1(#), Title 2(#)" // separate the titles with a comma // The title must EXACTLY match the widget title before this script will work // access level: public = 1, associate = 1.5, member = 2, council = 2.5, officer = 3, super admin = 4 var widgetAccess = "Voice Chat (2), Contact Info(2), Council Updates(2.5), Officer Updates (3)" /* Don't change anything below */ ,accessIt = function(cb, t, h){ if (!cb.length) { return; } h = h || 1; // no access level = make public var access = parseInt("$block[userlevelnumber]".replace(/\s+/,''),10); if (access >= h) { cb.show(); } }, a = [], j, n = [], t, list = widgetAccess.split(','); for ( j=0; j < list.length; j++ ){ t = list[j].match(/([^(]*)\(([^)]*)/); n.push($.trim(t[1])||''); // widget name a.push($.trim(t[2])||1); // access level } $('.gpWidget').each(function(){ t = $.trim( $(this).find('.ContentBoxTitle,.ContentBoxTitleNoBackground').text() ); j = $.inArray(t,n); if (j < 0 || widgetAccess.indexOf(t) < 0) { $(this).show(); } else { accessIt($(this), n[j], a[j]); } }); }());
var widgetAccess = "Title1(#), Title2(2)"
<style type="text/css"> .tooltip, .preview, .screenshot { cursor:pointer; } #tooltip, #tooltip2, #preview, #screenshot { color:#dddddd; background:#222222; border: 1px solid #333333; padding:5px; display:none; opacity: 0.9; filter: alpha(opacity=90); text-align:left; border-radius: 1em; -moz-border-radius: 1em; -webkit-border-radius: 1em; } </style> <script src="http://www.axiomfiles.com/Files/258012/tooltip.js" type="text/javascript"></script>