Pasting PHP code into the Module Manager or Snippet Editor can be extremely frustrating. Copy/paste your code into a file under /assets/modules/{module-name}/{module-name}.module.php or assets/snippets/{snippet-name}/{snippet-name}.snippet.php.
For modules, delete all PHP source in the Module Manager editor and paste:
<?php require_once($modx->config['base_path'] . "assets/modules/{module-name}/{module-name}.module.php"); ?>
For snippets, delete all PHP source in the Create/edit Snippet textarea and paste:
<?php require_once($modx->config['base_path'] . "assets/snippets/{snippet-name}/{snippet-name}.snippet.php"); ?>
Most of the modules I develop have overlapping functionality. I like to move generic/overlapping functions into an external file and include them in my modules and snippets. This practice helps keep my main module and snippet code tidy. If you prefer an object-oriented approach, you can use classes instead of procedural functions.
As an example, my module ‘user_manager.module.php’ includes a ‘user_manager.inc.php’. This inc.php file is included in the admin area module and front-end snippet.
The following code snippet will give you a quick overview of how to access the database from a MODx module:
function getUserTotalPoints($web_user_id) { global $modx; $web_user_id = $modx->db->escape($web_user_id); $tp = $modx->db->config['table_prefix']; $fields = 'SUM(tbl_points.points) AS total'; $from = $tp . 'web_user_competency_points AS tbl_points'; $where = 'tbl_points.web_user_id=' . $web_user_id; $result = $modx->db->getRow($modx->db->select($fields, $from, $where)); return intval($result['total']); }
while($row = $modx->db->getRow($result))
Refer to http://wiki.modxcms.com/index.php/API:DBAPI for more information.
A single module may have more than one section or state. I use an ‘opcode’ to keep track of the current module state. For more information visit: http://svn.modxcms.com/docs/display/MODx096/Writing+the+module+code
]]>
In Flash, go to the Commands menu and verify the “Create Class” command is available. If the “Create Class” command is not present verify the ASUnit extension is installed and enabled in the Extension Manager. You shouldn’t need to restart your machine.
import AllTests;
var at:AllTests = new AllTests();


This is easy to fix; just enter “com.Example” in the Class Name text box (highlighted in blue above). All classes must use namespaces.

If you’ve decided to add unit testing to your arsenal mid-project try the following:
If you run into class conflicts check to see if Flash’s global class paths are conflicting with the local Flash paths. To do this in CS3, go to the Edit menu, Preferences item, ActionScript category, ActionScript 2.0 Settings button. In reference to the example above, if your global class paths contain “./classes/” and your testing FLA class paths contain “../flash/classes/” Flash will happily notify you of a conflict.
The following list is available here. The external guidelines page also contains descriptions for each method and a link to research in PDF format.
This research is also available in PDF format here.
Many of the methods for improving website Credibility overlap with Usability. I recommend reviewing Jakob Nielson’s article on usability testing at.
Site usability can be improved through:
At the time of this writing http://www.webcredibility.org/ has no index page. Site visitors are presented with a directory structure. Tisk tisk.
]]>
http://www.ibm.com/developerworks/webservices/library/ws-tip-uml/
http://office.microsoft.com/en-us/visio/default.aspx
http://www.sparxsystems.com.au/
The following is an example project structure with separate development and documentation areas:

Save the automation batch file in the /documentation/ directory. The batch file contains the following variables:
*Set the output path and the project path to the same directory and leave the project data alone to save time on customizations. I usually have two batch files in the documentation directory. Each batch file generates documentation for a different portion of my code (procedural ActionScript and ActionScript classes).
NaturalDocs deletes documentation files if the class source file has been renamed or removed. Committing the documentation directories immediately after running NaturalDocs will eliminate errors in your working copy.
Refer to http://naturaldocs.org/running.html for more information. The automation batch file uses HTML output instead of HTML-frames output. Modify the last line of the automation batch file to change the output format.
NaturalDocs uses a ‘Project Root’ command-line parameter for storing project data. The project data contains custom menu arrangements, custom keywords, and custom topics. Project data is generated automatically but may be modified after NaturalDocs has generated documentation.
]]>
Browser detection is not bulletproof since users can change their browser name string, firewalls may prevent browser data from passing through, and software builders change their browser ID formats. Since these are the exceptions and not the rule-it’s worth attempting to customize the page presentation to your visitors’ browser.
The order of steps 3 and 4 are critical. We’re trying to overwrite the base styles so they must be included first in the HTML header.
At the very least you’ll need to retrieve the browser name. If compatibility requirements are strict you’ll want the version and revision numbers too. Once you’ve chosen a detection script you’re ready to move on.
Instead of retyping source, I will now point you to this site which uses PHP’s get_browser() function. This page has a dedicated author and a history of updates dating back to 1998.
I recommend using get_browser() but if you don’t want to modify your PHP setup you are in luck. There are enough open-source detection scripts on the web to save you the trouble of writing your own. When you find a script be sure to check its release date.
An open-source script will have the same approach as the browser capability approach linked above.

A browser testing suite captures screenshots of web pages as they appear in different browsers and different operating systems. Visit this site to see a list of available browser testing suites. I use browsershots because of its price point (free).
css/screen/layout.csscss/screen/site.cssIE6 is the culprit in the following example:
it layout_IE6.csslinks after the standards compliant links. Refer to this post for details