home *** CD-ROM | disk | FTP | other *** search
/ theapplecollection.com / www.theapplecollection.com.tar / www.theapplecollection.com / get_url.php?counter=TheBOX&link=http:%2F%2Fwww.creativebox.net%2F.orig < prev    next >
Text File  |  2010-10-11  |  18KB  |  543 lines

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  4.  
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.   <title>CreativeBox - Design from the inside out.</title>
  8.   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9.  
  10. <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.creativebox.net/blogapi/rsd" />
  11. <link rel="alternate" type="application/rss+xml" title="Front page feed" href="/rss.xml" />
  12.   <link type="text/css" rel="stylesheet" media="all" href="/sites/default/files/css/css_61f08fad60d27134943973ad9941919a.css" />
  13. <link type="text/css" rel="stylesheet" media="print" href="/sites/default/files/css/css_95096ed5a0b43b75cc8d1400ae64da3b.css" />
  14.   <script type="text/javascript" src="/sites/default/files/js/js_bb8e06cce59085456e9d9820e7676e64.js"></script>
  15. <script type="text/javascript">
  16. <!--//--><![CDATA[//><!--
  17. jQuery.extend(Drupal.settings, { "basePath": "/", "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" } });
  18. //--><!]]>
  19. </script>
  20. </head>
  21.  
  22. <body id="creative-box" class="front not-logged-in page-frontpage one-sidebar sidebar-right browser-firefox3">
  23.   <div id="skip-nav"><a href="#content">Skip to Content</a></div>  
  24.   <div id="wrapper">
  25.     
  26. <!-- ______________________ HEADER _______________________ -->
  27.   
  28. <div id="header">
  29.     
  30.     <a id="logo" href="/">Design from the inside out</a>
  31.           
  32. <div id="navigation">
  33.  <ul class="menu"><li class="leaf first active-trail home"><a href="/" title="" id="menu-home" class="active">Home</a></li>
  34. <li class="leaf last about"><a href="/about" title="About" id="menu-about">About</a></li>
  35. </ul></div>
  36.  
  37. </div> <!-- /header -->
  38.  
  39. <!-- ______________________ MAIN _______________________ -->
  40.       
  41.         <div id="main-wrapper">
  42.         
  43.                 <div id="content">
  44.                         <div id="content-inner">
  45.  
  46.                                     
  47.                     <div id="content-area"> <!-- CONTENT AREA -->
  48.                       <div class="view view-frontpage view-id-frontpage view-display-id-page view-dom-id-1">
  49.     
  50.   
  51.   
  52.       <div class="view-content">
  53.       
  54. <div class="view-group">
  55.   
  56.   <h3>Jun 22, 2010</h3>
  57.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  58.     
  59.  <h2><a href="http://www.itworld.com/it-managementstrategy/111334/good-job-adobe-flash-team">Flash Player installer without the cruft</a></h2>
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.   
  70.   <div class="views-field-body">
  71.                 <div class="field-content"><p>John Welch explains that if you look into the package contents of the Flash Player installer you will find the true installer at the following location:</p>
  72.  
  73. <p>/Contents/Resources/</p>
  74.  
  75. <p>This installer will not force you to quit all of your browsers.</p>
  76.  
  77. <p>(via <a href="http://www.daringfireball.net/">John Gruber</a>)</p></div>
  78.   </div>
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.   
  88.   <div class="views-field-tid">
  89.           <label class="views-label-tid">
  90.         Tagged:
  91.       </label>
  92.                 <span class="field-content"><a href="/taxonomy/term/86">flash</a>, <a href="/taxonomy/term/85">mac</a></span>
  93.   </div>
  94.  
  95.  
  96.  
  97.   </div>
  98.  
  99. </div>
  100. <div class="view-group">
  101.   
  102.   <h3>Feb 22, 2010</h3>
  103.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  104.     
  105.  <h2><a href="/javascript-tips">JavaScript Tips</a></h2>
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.   
  116.   <div class="views-field-body">
  117.                 <div class="field-content"><h2>Ternary Operator</h2>
  118.  
  119. <p>When you have a simple if...else statement like the following:</p>
  120.  
  121. <pre><code>var a = true;
  122. if (a == true) {
  123.  alert("True");
  124. }
  125. else {
  126.  alert("False");
  127. }
  128. </code></pre>
  129.  
  130. <p>It may be best to use the ternary operator.</p>
  131.  
  132. <pre><code>var a = true;
  133. //(Test) ? (if) : (else);
  134. (a == true) ? alert("True") : alert("False");
  135. </code></pre>
  136.  
  137. <p>References: <a href="http://www.hscripts.com/tutorials/javascript/ternary.php">Javascript (JS) Tutorial - Ternary Operators code, syntax ccondition</a>, <a href="http://javascriptant.com/articles/28/the-conditional-operator-ternary-operactor">JavaScript Ant - The Conditional Operator (Ternary Operator)</a></p></div>
  138.   </div>
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.   
  148.   <div class="views-field-tid">
  149.           <label class="views-label-tid">
  150.         Tagged:
  151.       </label>
  152.                 <span class="field-content"><a href="/taxonomy/term/82">JavaScript</a></span>
  153.   </div>
  154.  
  155.  
  156.  
  157.   </div>
  158.  
  159. </div>
  160. <div class="view-group">
  161.   
  162.   <h3>Feb 15, 2010</h3>
  163.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  164.     
  165.  <h2><a href="/archive/2010/02/15/parse-class-values-retrieving-custom-meta-data-html-elements-class-name">Parse class values: Retrieving custom meta data from an HTML element's class name</a></h2>
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.   
  176.   <div class="views-field-body">
  177.                 <div class="field-content"><h2>The problem</h2>
  178.  
  179. <p>I had HTML that had class information on each object that signified how deeply it was indented (e.g. "indent-5"). I needed to use the value of the indent to make various comparisons in another. To solve this problem I created a simple utility function.</p>
  180.  
  181. <p>NOTE: All functions were written with a dependancy on jQuery.</p>
  182.  
  183. <h2>Original</h2>
  184.  
  185. <p>I created an array of the object's classes by splitting the string at the instance of a space. I made the assumption that the indent class would always be the first and accessed the first element of the object class array I created. I then took this string and removed the "indent-" part and parsed the rest as an integer. The result was an integer I could use for numeric comaprisons in my main function.</p>
  186.  
  187. <pre><code>function parseObjLevelNumber(obj) {
  188.     var objClass = $(obj).attr("class");
  189.     var objClassArray = new Array();
  190.     objClassArray = objClass.split(" ");
  191.  
  192.     var objLevel = parseInt(objClassArray[0].replace(/indent-/, ""));
  193.  
  194.     return objLevel;
  195. }
  196. </code></pre>
  197.  
  198. <h2>Revision 1 - RegEx</h2>
  199.  
  200. <p>When I looked at my code again I realized that my original function could be made more generic so that it could be a general purpose utility function. Since the new function could not assume an object class array position or the string that should be removed I made these two values arguments to the function.</p>
  201.  
  202. <p>When first writing this I ran into a minor problem when trying to use the RegEx string as a normal string. Apparently you need to convert a string into a RegEx variable if you want it to be used as a variable.</p>
  203.  
  204. <pre><code>function parseClassValueRegEx(obj, pos, attrName) {
  205.     var objClassArray = $(obj).attr("class").split(" ");
  206.     var attrNameRegEx = new RegExp(attrName);
  207.     var classValue = objClassArray[pos].replace(attrNameRegEx, "");
  208.  
  209.     return classValue;
  210. }
  211. </code></pre>
  212.  
  213. <h2>Revision 2 - JSON</h2>
  214.  
  215. <p>As much as the RegEx version of the function was better it still forced one to make assumptions about what position in the array the item you wanted was. I removed position as an argument and tried to find a way one could access the class attribute by name. For example if you wanted the "indent" level of an object you would only need to ask for "indent."</p>
  216.  
  217. <p>I decided that the best way to do this would be to create a JSON object that contains all the class attributes a element has.</p>
  218.  
  219. <p>I first set up my empy JSON array. I then loop through the values in the object's class array (e.g. "indent-1") and I split those values against the "-" to create another array called "keyValue." Then I push values into the JSON array with the assumption that the prefix, "[0]," will always be the key and the suffix, "[1]," will always be the value.</p>
  220.  
  221. <pre><code>function parseClassValue(obj, attrName) {
  222.     var objClassArray = $(obj).attr("class").split(" ");
  223.     var objClassValues = { };
  224.  
  225.     for (var i in objClassArray) {
  226.         var keyValue = objClassArray[i].split("-");
  227.         objClassValues[keyValue[0]] = keyValue[1];
  228.     };
  229.  
  230.     var classValue = objClassValues[attrName];
  231.  
  232.     return classValue;
  233. }
  234. </code></pre></div>
  235.   </div>
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.   
  245.   <div class="views-field-tid">
  246.           <label class="views-label-tid">
  247.         Tagged:
  248.       </label>
  249.                 <span class="field-content"><a href="/taxonomy/term/82">JavaScript</a>, <a href="/taxonomy/term/83">JSON</a>, <a href="/taxonomy/term/84">RegEx</a></span>
  250.   </div>
  251.  
  252.  
  253.  
  254.   </div>
  255.  
  256. </div>
  257. <div class="view-group">
  258.   
  259.   <h3>Jan 18, 2010</h3>
  260.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  261.     
  262.  <h2><a href="/archive/2010/01/18/prevent-loss-unsaved-data-onbeforeunload">Prevent the loss of unsaved data with OnBeforeUnload</a></h2>
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   
  273.   <div class="views-field-body">
  274.                 <div class="field-content"><p>Sometime last year I learned about the onUnload event, which is available on the "window" object. Today I thought I could use it to prevent a user from leaving a web page if, for example, there is unsaved data that will be lost. I quickly realized that it would not work. The "onunload" event happens after the user has already "unloaded" the page. I needed an event that fired before the user action and naturally came upon, "onBeforeUnload."</p>
  275.  
  276. <p>The onBeforeUnload event is Microsoft specific and is not included in the W3C specification but fortunately seems to be a de facto standard in the modern web browsers. Support is in the latest versions of FireFox, Safari, Chrome and Internet Explorer. Below is a code example and screenshots of resulting dialog boxes in Safari and Google Chrome.</p>
  277.  
  278. <p><code>window.onbeforeunload = function() {
  279.     return "There is unsaved data on this page.";
  280. }</code></p>
  281.  
  282. <p><img src="/sites/default/files/safari.png" alt="Safari Dialog" title="Safari" /><br />
  283. <strong>Safari</strong></p>
  284.  
  285. <p><img src="/sites/default/files/chrome.png" alt="Chrome Dialog" title="Chrome" /><br />
  286. <strong>Chrome</strong></p>
  287.  
  288. <p>Safari's dialog default formatting is close to an exact match of all other browsers. Google Chromem however, displays a much smarter dialog. It didn't take much thought to realize that they did this for their web applications. If for example, you try to reload an unsaved e-mail in Gmail you will trigger an "onBeforeUnload" event.</p>
  289.  
  290. <p>To clear the beforeUnload event just set the value of it to null as follows:</p>
  291.  
  292. <p><code>window.onbeforeunload = null;</code></p>
  293.  
  294. <p><a href="/code/before-unload/index.html">See the example.</a></p></div>
  295.   </div>
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.   
  305.   <div class="views-field-tid">
  306.           <label class="views-label-tid">
  307.         Tagged:
  308.       </label>
  309.                 <span class="field-content"><a href="/taxonomy/term/82">JavaScript</a></span>
  310.   </div>
  311.  
  312.  
  313.  
  314.   </div>
  315.  
  316. </div>
  317. <div class="view-group">
  318.   
  319.   <h3>Oct 4, 2009</h3>
  320.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  321.     
  322.  <h2><a href="http://www.informationisbeautiful.net/visualizations/the-billion-dollar-gram/" target="user">The Billion Dollar Gram</a></h2>
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.   
  333.   <div class="views-field-body">
  334.                 <div class="field-content"><p>Great visualization of what is being spent where.</p>
  335.  
  336. <p><strong>Highlights:</strong></p>
  337.  
  338. <ul>
  339. <li>Walmart revenues ($352b) vs. Walmart Profits (11b)</li>
  340. <li>Total cost of financial crisis to US government to date ($2800b)  vs. The New Deal ($500b)</li>
  341. </ul></div>
  342.   </div>
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.   
  352.   <div class="views-field-tid">
  353.           <label class="views-label-tid">
  354.         Tagged:
  355.       </label>
  356.                 <span class="field-content"><a href="/taxonomy/term/80">design</a>, <a href="/taxonomy/term/81">information architecture</a></span>
  357.   </div>
  358.  
  359.  
  360.  
  361.   </div>
  362.  
  363. </div>
  364. <div class="view-group">
  365.   
  366.   <h3>May 3, 2009</h3>
  367.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  368.     
  369.  <h2><a href="/archive/2009/05/03/it-only-took-several-years">It only took several years</a></h2>
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.   
  380.   <div class="views-field-body">
  381.                 <div class="field-content"><p>I've <em>finally</em> redesigned and relaunched CreativeBOX (everything isn't perfect yet - but if I waited until then this relaunch would never happen.) I can't even count how many years this has been delayed. A lot has changed since my last real updates to the site, the most significant being my graduation from college (woot!) and my job  at <a href="http://www.oho.com/">OHO Interactive</a>.</p>
  382.  
  383. <p>This site used to be my <acronym title="Graphical User Interface">GUI</acronym> playground back in the golden age of Mac interface customization (raise your hand if you can vividly remember MacPlaza, MacOSZone, GUI Junky, ResExcellence, <a href="http://www.iconfactory.com">IconFactory's</a> PixelPalooza etc.) It was a fun time and was what partially inspired me to go into the design field. On CreativeBox I offered custom desktop pictures, startup screens, Kaleidoscope schemes, icons, and even software developed by my younger brother. I loved the GUI community so much that I even ran a site called MacCommunity for a while that reported on the releases of new GUI goodies. Yea, I was very much a Mac geek. As a matter of fact I still am but my priorities have changed.</p>
  384.  
  385. <p>I eventually got exhausted creating icons and desktop pictures but I never tired of running web sites. While trying to re-imagine CreativeBox I ran several web sites during college for student organizations. I just couldn't stay away from the marketing, analyzing web analytics, brainstorming, designing and development that was involved. There is a beautiful complexity in building and running a web site and with this, the new CrativeBox, I hope to share some of it.</p></div>
  386.   </div>
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.   
  396.   <div class="views-field-tid">
  397.           <label class="views-label-tid">
  398.         Tagged:
  399.       </label>
  400.                 <span class="field-content"><a href="/taxonomy/term/78">personal</a>, <a href="/taxonomy/term/79">thebox</a>, <a href="/taxonomy/term/77">webdesign</a></span>
  401.   </div>
  402.  
  403.  
  404.  
  405.   </div>
  406.  
  407. </div>
  408. <div class="view-group">
  409.   
  410.   <h3>Jan 28, 2009</h3>
  411.   <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
  412.     
  413.  <h2><a href="/archive/2009/01/28/open-during-construction">Open During Construction</a></h2>
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.   
  424.   <div class="views-field-body">
  425.                 <div class="field-content"><p>Yup. I am back and ready for another go at running the Creative[BOX]. While under construction I will be posting, designing, configuring, and learning how to manage this Drupal system. It should be a fun ride.</p></div>
  426.   </div>
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.   
  436.   <div class="views-field-tid">
  437.           <label class="views-label-tid">
  438.         Tagged:
  439.       </label>
  440.                 <span class="field-content"><a href="/taxonomy/term/79">thebox</a></span>
  441.   </div>
  442.  
  443.  
  444.  
  445.   </div>
  446.  
  447. </div>    </div>
  448.   
  449.   
  450.   
  451.   
  452.   
  453.   
  454. </div>                     </div>
  455.                       <a href="/rss.xml" class="feed-icon"><img src="/misc/feed.png" alt="Syndicate content" title="Front page feed" width="16" height="16" /></a>                          
  456.                     </div>
  457.                     </div> <!-- /content-inner /content -->
  458.  
  459.  
  460.                               
  461.                 
  462.                  <!-- SIDEBAR RIGHT -->
  463.                   <div id="sidebar-right" class="column sidebar">
  464.                             <div id="sidebar-right-inner">
  465.                                               <div class="right" id="top-right"><div id="block-views-tweets_sidebar-block" class="block block-views odd right">
  466.  
  467.   
  468.   <div class="content">
  469.     <div class="view view-tweets-sidebar view-id-tweets_sidebar view-display-id-block view-dom-id-2">
  470.         <div class="view-header">
  471.       <h3><a href="http://www.twitter.com/akeemw">latest tweets</a></h3>
  472.     </div>
  473.   
  474.   
  475.   
  476.       <div class="view-content">
  477.       <div class="item-list">
  478.     <ul>
  479.           <li class="views-row views-row-1 views-row-odd views-row-first">  
  480.   <span class="views-field-text">
  481.                 <span class="field-content">I'm really liking HyperDock. Very strong chance that I'll buy it when it comes out of beta. <a href="http://hyperdock.bahoom.de/" title="http://hyperdock.bahoom.de/">http://hyperdock.bahoom.de/</a></span>
  482.   </span>
  483.   
  484.   <span class="views-field-created-time">
  485.                 <span class="field-content"><em>4 hours</em> ago</span>
  486.   </span>
  487. </li>
  488.           <li class="views-row views-row-2 views-row-even">  
  489.   <span class="views-field-text">
  490.                 <span class="field-content">Big news! #Drupal 7 has hit beta. I'll have to give it another spin in the near future. <a href="http://drupal.org/drupal-7.0-beta1" title="http://drupal.org/drupal-7.0-beta1">http://drupal.org/drupal-7.0-beta1</a></span>
  491.   </span>
  492.   
  493.   <span class="views-field-created-time">
  494.                 <span class="field-content"><em>3 days</em> ago</span>
  495.   </span>
  496. </li>
  497.           <li class="views-row views-row-3 views-row-odd views-row-last">  
  498.   <span class="views-field-text">
  499.                 <span class="field-content"><a href="http://twitter.com/apolzon">@apolzon</a> I don't think so anyway. You're just wishing them well.</span>
  500.   </span>
  501.   
  502.   <span class="views-field-created-time">
  503.                 <span class="field-content"><em>4 days</em> ago</span>
  504.   </span>
  505. </li>
  506.       </ul>
  507. </div>    </div>
  508.   
  509.   
  510.   
  511.   
  512.   
  513.   
  514. </div>   </div>
  515.  
  516.   
  517. </div>
  518. </div>
  519.                                                   </div>
  520.                   </div> <!-- /sidebar-right -->
  521.                       
  522.       </div> <!-- /main-wrapper -->
  523.       
  524.         <!-- ______________________ FOOTER _______________________ -->
  525.  
  526.       <div id="footer">
  527.                       </div> <!-- /footer -->
  528.       <script type="text/javascript" src="/sites/default/files/js/js_415d35718d21324bb1fb7a8bdcb1a50c.js"></script>
  529. <script type="text/javascript">
  530. <!--//--><![CDATA[//><!--
  531. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  532. //--><!]]>
  533. </script>
  534. <script type="text/javascript">
  535. <!--//--><![CDATA[//><!--
  536. try{var pageTracker = _gat._getTracker("UA-1244299-1");pageTracker._trackPageview();} catch(err) {}
  537. //--><!]]>
  538. </script>
  539.   </div> <!-- /wrapper -->
  540.  
  541.  
  542. </body>
  543. </html>