Compdigitec Labs


Disable dragging of an element in JSXGraph

Sunday, July 20th, 2014

Set the attribute ‘fixed‘ to true in JXG.GeometryElement: or

Creating jQuery UI Tabs

Sunday, August 21st, 2011

jQuery UI Tabs are an easy way to make tabs in your web applications or web sites easily with less code. Consider the following tab structure: To turn this into a fully featured functioning tab system, all one has to execute in the <head> is this provided you have included jQuery and jQuery UI with […]

Fixing “Error: window.location.refresh is not a function”

Friday, July 23rd, 2010

If when you try to refresh the page using Javascript back-end and instead of having the page refresh like you want it to refresh, instead it bounces back into your Javascript Console with a cryptic error that reads “Error: window.location.refresh is not a function“. This can be very puzzling, especially if you are not a […]

XHTML-compliant way to embed Macromedia Flash

Friday, April 30th, 2010

For many years, people have been using complicated, ugly ways to forcibly embed their Macromedia Flash content into their webpages. There have been several ways, usually using the non-standard <embed> element or other fancy IE-only <object> hacks. But now, we have a safe, bug-free, validator-safe way to embed Flash that passes the HTML 5 and […]

Free and open source XML beautifers to format XML

Saturday, December 26th, 2009

XML is a great format for storing data, but an improperly-formatted XML file (e.g. whole file on one line, unusual breaking, improper line wrap, etc) can be just as difficult to read as a binary blob. In order to make “blob” XML readable, here are some tools you can use to format XML so it’s […]

Disable WordPress conversion of double-dashes in posts

Friday, July 24th, 2009

Update (2014-08-09): Still works for WordPress 3.9.2. Update (2013-11-16): Still works for WordPress 3.7.1. Update (2012-07-26): Updated for WordPress 3.4.1. Update (2012-02-03): Updated for WordPress 3.3.1. Update (2011-08-21): Updated for WordPress 3.2.1. Update (2009-08-16): Updated for WordPress 2.8.3. If you use WordPress (like this blog and many hundreds and thousands of blogs) for your blogging […]

Using (X)HTML entities in plain XML files

Tuesday, July 14th, 2009

Update (2009-07-28): Here is a place that you can find accents for English characters. If you try to use non-ASCII characters (e.g. accents) in directly in a Windows-1252 (ISO-8859-1) encoded web page directly without converting/transforming them into an entity, the web browser may get confused when the header of the web page is sent wrong […]

Removing WordPress post revisions feature

Friday, March 13th, 2009

WordPress 2.6 and above’s new feature of post revisions only slows WordPress down and makes it less usable. So here is how to disable post revisions: Open wp-config.php in your wordpress installation directory with a text editor. Add the line “define(‘WP_POST_REVISIONS’, false);” anywhere in the file in a new line after the <?php header. Save […]

Simple Template Engine - your lightweight templating engine in PHP

Monday, February 2nd, 2009

The Simple Template Engine is a very lightweight template engine to use in PHP if your webhost does not allow you to run something like Smarty. It is simple, lightweight and fast. To parse a file: example.tpl is: <html><head><title>{content}</title></head><body><h1>{content}</h1></body></html> If you found this article useful or helpful, please help Compdigitec spread the word. Don’t forget […]

Enabling and in MediaWiki

Sunday, September 14th, 2008

If you have a MediaWiki installation and decide to make it Wikipedia-like, you will find that the <ref> tags and the <references /> tags don’t work like they do in Wikipedia. Below is a screenshot of the citation tags not working: To fix this problem, you need to install the Cite extenstion for MediaWiki. Below […]

« Previous Entries