Categories
Uncategorized

PHP's empty() Function

This code snippet from http://php.net/empty illustrates a very useful function that helps eliminate some of the ambiguity we sometimes encounter with variables that have no value or boolean zero value.  The comments in the snippet explain it pretty well.

 

1
2
3
4
5
6
7
8
9
10
11
$var = 0;
 
// Evaluates to true because $var is empty
if (empty($var)) {
    echo '$var is either 0, empty, or not set at all';
}
 
// Evaluates as true because $var is set
if (isset($var)) {
    echo '$var is set even though it is empty';
}

[ad]

Categories
Uncategorized

ActiveX Error in Microsoft Outlook Signature Blocks

Signature files in Microsoft Outlook can pick up an aggravating ActiveX error, which I have associated with editing the signature file in MS Word but may also have other causes. A little edit to HTML source file will chase the message away without compromising the formatting of your signature file. Here's the Error Message:

One or more ActiveX controls could not be displayed because either:
1) Your current security settings prohibit running ActiveX controls on this page, or
2) You have blocked a publisher of one of the controls.
As a result, the page may not display correctly.

 

The Solution:

Start by opening the folder that contains your signature files.

  • For Vista:
    • %userprofile%\AppData\Roaming\Microsoft\Signatures
  • For XP and Windows 2003:
    • %userprofile%\Application Data\Microsoft\Signatures

Copy the appropriate line, click Start > Run, then Ctrl–V or otherwise paste the text onto the Run line and press Enter.

You'll see 3 versions of your signature file (in .htm, .txt and .rtf formats). Open the .htm signature file in Notepad or your preferred text editor (never in a Word Processor such as MS Word.) Then go to Edit > Find and type in “<object”.

You're looking for a line of code that resembles the following:

<OBJECT id=ieooui classid=clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D></OBJECT>

Just remove that <OBJECT tag, everything from <OBJECT to /OBJECT> and save the file.

Optionally, to make sure that the ActiveX object doesn’t come back you can make the file read only (In Windows Explorer select the file and Right-Click > Properties > Read Only), but this might limit your ability to edit your signature block from within Outlook, so I'd wait and see if this fix holds before I do that.

Categories
Uncategorized

Showing positions in Joomla

Ever wondered how to tell where the positions are in a Joomla template?

It's simpler than you might think.

Just add ?tp=1 to the end of your URL, as in

http://www.mysite.ca/?tp=1

[ad]