CMXtraneous: ColdFusion

Right on the edge of useful

Dreamweaver file synchronization

Posted Tuesday, November 22, 2005 9:10:57 PM by Tom Muck

Tom Muck

There was a discussion on a Dreamweaver list the other day about local/remote file synchronization in Dreamweaver 8. This is a touchy issue with Dreamweaver, because Dreamweaver has had an incredibly inconsistent history with the Synchronization feature. At one point, it simply did not work. For those who have not used it, you can find it in the semi-hidden Files menu when you click on the icon in the right corner of the Files panel under Site > Synchronize. For this to work semi-properly, you need to check the box in the site setup under the Remote Info tab that says "Maintain Synchronization Information".  There are some problems with this feature and other site management features in DW:

  1. Checking this box also causes little files to be scattered all over your local site -- dwsync.xml. They are contained within the _notes folders that DW scatters all over your site. This causes problems when using source control software -- the software reports changes in these files. Dreamweaver is like a bad dog leaving little piles of poop all over your site.
  2. The extra DW-droppings also cause problems using the synchronization feature when you have "Show Hidden Files" checked in the Files menu -- you see many of the droppings showing up as files that are different between local and remote.
  3. When you change your clock settings, files will show as different. I made the mistake of leaving DW open the evening that the clock rolled back for Daylight Savings Time and when I did a synchronization the next day, Dreamweaver reported over 1000 files had changed. That made it quite difficult to find the 3 files that actually had changed.
  4. When using other programs to modify content, DW does not always seem to know about the change.
  5. DW's GET and PUT does not always work right, leaving you thinking that a file had been updated when in fact it has not.

There is a technote about the "Dreamweaver droppings" here, and one way to avoid them: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=91b33859, however it also renders synchronization useless.

I have always been one to use DW for as much of my work as possible, because I hate to have too many programs open for simple day-to-day operations, but I have come to the realization that DW simply cannot be trusted to handle this seemingly simple operation. I now use Beyond Compare on Windows for this (there is probably a similar program for Mac). Beyond Compare is a file comparison program that will do a comparison of files or folders locally or over an FTP connection. The comparisons can be simple (using the file date) or more detailed (using a binary compare).

I did a simple synchronization preview in Dreamweaver this morning to test it out once more and DW reported 128 files had changed in my site. I knew this was not accurate, so I revved up Beyond Compare and did the same comparison -- it turns out only 14 files were different, and I also got the report that 3 files were newer on the remote server, 4 files newer on local server, 4 files were orphans on the local, and 3 files orphans on the remote. Much better than trying to wade through Dreamweaver's erroneous report that 128 files had changed.

As an added bonus, Dreamweaver 8 now contains file comparison, so Beyond Compare can be used directly from the files panel in Dreamweaver for quick local/remote comparisons. Beyond Compare is also great from the Desktop or file system because you can right-click a file, choose it for compare, and then right-click another file to compare to.

Maybe Dreamweaver 9 will address the problems with synchronization. If a $30 program called Beyond Compare can do it, Macromedia should be able to do it.

Category tags: ColdFusion, Dreamweaver

Track browser resizing in your database using AJAX -- part 2

Posted Thursday, November 17, 2005 9:11:56 PM by Tom Muck

Tom Muck

Part 1 of this post showed the server-side code for a browser resize tracker. This part will show the client-side script. This can go on any type of page -- php, coldfusion, html, etc. The scripts consist of several functions:

  • getBrowserSize() -- called in the onload and onresize event to capture the browser size and pass to the server-side page
  • getSize() -- gets the size of the browser window
  • passFields() -- takes an array of fields (fieldname, value, fieldname, value, etc) and a URL and passes the fields to the URL as querystring variables
  • resetSizeTimer() -- creates a timer so that when the browser is resized, only one event is recorded (browser resizing typically fires the onResize event numerous times in succession.)

In addition, we set a global variable to act as a flag for the resize timer. The code is pretty straightforward, and can be placed in the head of any file:

<script>
var size_timer = false;

// Subroutine to get the size of the window
function getSize() {
 var myWidth = 0, myHeight = 0;
 if(typeof(window.innerWidth) == 'number') {
  //Non-IE
  myWidth = window.innerWidth;
  myHeight = window.innerHeight;
 }else if(document.documentElement &&
  (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
  //IE 6+ in 'standards compliant mode'
  myWidth = document.documentElement.clientWidth;
  myHeight = document.documentElement.clientHeight;
 } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
  //IE 4 compatible
  myWidth = document.body.clientWidth;
  myHeight = document.body.clientHeight;
 }
 return [myWidth, myHeight];
}

// Pass fields to server given a URL and fields in name/value pairs
function passFields(url,args) {
 url += "?";
 for(var i=0; i<args.length; i=i+2) {
  url += args[i] + "=" + args[i+1] + "&";
 }
 //Set up the AJAX communication
 if (window.XMLHttpRequest) {
  req = new XMLHttpRequest();
 } else if (window.ActiveXObject) {
  req = new ActiveXObject("Microsoft.XMLHTTP");
 }
 try {
  // Pass the URL to the server
  req.open("GET", url, true);
  req.send(null);
 }catch(e) {
 //nothing;
 }
}
function resetSizeTimer() {
 size_timer = false;
}

// Get the size and pass to the server
function getBrowserSize() {
 if(size_timer)return;
 size_timer = true;
 self.setTimeout('resetSizeTimer()',1000);
 var theArray = getSize();
 var url = "getBrowserSize.php";
 var args = new Array();
 args.push("width");
 args.push(theArray[0]);
 args.push("height");
 args.push(theArray[1]);
 args.push("screenwidth");
 args.push(screen.width);
 args.push("screenheight");
 args.push(screen.height);
 args.push("pagename");
 args.push(window.location);
 passFields(url, args);
}

</script>

All you need to do is to add the getBrowserSize() function to the onload and onresize events of the <body> tag:

<body onload="getBrowserSize();" onresize="getBrowserSize();">

Now, when you browse the page, the server records the browser size upon load and upon resize. Typical information would look like this:

Width Height Screen
width
Screen
height
IP Page name
85678812801024192.168.1.2http://mysite.com/index.cfm
76662512801024 192.168.1.2http://mysite.com/index.cfm
94875112801024 192.168.1.2http://mysite.com/index.cfm
102575712801024192.168.1.2http://mysite.com/index.cfm

The technique is handy and can be used for any other situation where you need to pass client-side information to the server.

Cross posted at Tom-Muck.com

Category tags: ColdFusion, Dreamweaver, JavaScript, SQL Server

Track browser resizing in your database using AJAX -- part 1

Posted Thursday, November 17, 2005 9:10:15 PM by Tom Muck

Tom Muck

It's always interesting to find out about viewing habits of web visitors. One of the things that is hard to determine when building a web page is how big to make your pages. Do you assume the user has 1280x1024? Do you assume 800x600? Do you assume that the user will have a fully maximized browser? One way to find out this information is to read the properties via JavaScript and store them. AJAX gives a web developer a valuble tool that allows the server to communicate with the browser in real time based on client-side events (such as resizing). I wrote a little script that I can insert on a page to track the resizing made by a user in relation to his screen resolution. After getting this information from a variety of users, I can run queries on the data and get some insight into browsing habits and adjust my page designs accordingly (or have them adjusted by a designer, in my case.) The code will be presented for ColdFusion and PHP.

First, I create a table in my database to store the information. The following is for SQL Server:

CREATE TABLE BrowserSize (
 browsersize_id int IDENTITY (1, 1) NOT NULL ,
 browsersize_width int NULL ,
 browsersize_height int NULL ,
 browsersize_screenwidth int NULL ,
 browsersize_screenheight int NULL ,
 IP varchar (50) NULL ,
 pagename varchar (255) NULL
)

The following is the equivalent for MySQL:


CREATE TABLE BrowserSize (
 browsersize_id int AUTO_INCREMENT PRIMARY KEY NOT NULL ,
 browsersize_width int NULL ,
 browsersize_height int NULL ,
 browsersize_screenwidth int NULL ,
 browsersize_screenheight int NULL ,
 IP varchar (50) NULL ,
 pagename varchar (255) NULL
);

You could also add a timestamp field, if you want to track times.

Next, I create a server-side page to grab the information and pass it to the database. The information will be passed in the URL. The code is self-explanatory. Basically, we pass width, height, screenwidth, screenheight, and page location in the URL, and insert it into our database table, along with the IP address of the user. The following is for ColdFusion:

<cfparam name="url.width" default=0>
<cfparam name="url.height" default=0>
<cfparam name="url.screenwidth" default=0>
<cfparam name="url.screenheight" default=0>
<cfparam name="url.pagename" default="">
<cfset url.width = val(url.width)>
<cfset url.height = val(url.height)>
<cfset url.screenwidth = val(url.screenwidth)>
<cfset url.screenheight = val(url.screenheight)>
<cfset ip = cgi.REMOTE_ADDR>

<cftry>
<cfquery datasource="yourdsn">
INSERT INTO browserSize
(browsersize_width
, browsersize_height
, browsersize_screenwidth
, browsersize_screenheight
, IP
, pagename)
VALUES
(#url.width#
,#url.height#
,#url.screenwidth#
,#url.screenheight#
,'#ip#'
,'#url.pagename#')
</cfquery>
<cfcatch>
<!--- do nothing --->
</cfcatch>
</cftry>

The following is for PHP:

<?php
$_GET["width"] = isset($_GET["width"]) ? intval($_GET["width"]) : 0;
$_GET["height"] = isset($_GET["height"]) ? intval($_GET["height"]) : 0;
$_GET["screenwidth"] = isset($_GET["screenwidth"]) ? intval($_GET["screenwidth"]) : 0;
$_GET["screenheight"] = isset($_GET["screenheight"]) ? intval($_GET["screenheight"]) : 0;
$pagename = isset($_GET['pagename']) ? $_GET['pagename'] : "";
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";

$conn = mysql_connect("localhost", "username", "password");
$query_rs = sprintf("INSERT INTO browserSize
(browsersize_width
, browsersize_height
, browsersize_screenwidth
, browsersize_screenheight
, IP
, pagename)
VALUES (%s, %s, %s, %s, '%s', '%s')"
,$_GET["width"]
,$_GET["height"]
,$_GET["screenwidth"]
,$_GET["screenheight"]
,$ip
,$pagename);
mysql_select_db("cwtest");
$rs = mysql_query($query_rs);
?>

Both of the pages can be run in the browser to test (saved as getBrowserSize.cfm and getBrowserSize.php respectively). If the values of 0 are inserted in the database, everything is working. I'll post the client-side AJAX code in Part 2.

Category tags: ColdFusion, Dreamweaver, JavaScript, SQL Server

Open Source and ColdFusion

Posted Thursday, November 03, 2005 9:25:13 AM by Stephanie

Stephanie

I've been slammed due to MAX (first getting ready for my sessions and then recovering from the lack of sleep and catching up on work after it). I have several things I'd like to post, but all in good time.

One thing I did want to make sure to help spread the news about is open source ColdFusion applications. I don't write CF code. But I find it very easy to understand and style around. I really love working with it. There are some great apps out there right now -- and they're open source. The first time I encountered these was through a project some of my co-workers at CMX started working on, CFOpen.org. This site lets CF developers post their code and work on their apps with other developers. Pretty cool.

Now, Brian Rinaldi has created a list of Open Source CF Applications. Instead of starting from scratch, you may want to check out what's already been created and add to that instead. There's a great variety of cool apps, including -- blogs, wikis, AJAX implementation and more. Long live ColdFusion!

Category tags: ColdFusion, Dreamweaver

Custom tag for RSS feed

Posted Wednesday, October 05, 2005 8:04:56 PM by Tom Muck

Tom Muck

I wrote a simple ColdFusion custom tag last night that you might find useful. The tag will generate an RSS feed. You pass a recordset/query to the tag and it will spit out an RSS feed. It is based partly on the RSS feeds I built for this site and Tom-Muck.com, and also based on the custom tags I built for generating dynamic tables and csv files. Like the others, it is a rudimentary tag that you can build on.

Use the custom tag like this:

1. Put it in a directory where custom tags are stored. I usually just create a folder called tags and put all my tags inside. Save it as rss.cfm.

2. On the page that will become your RSS fed, add an import statement to the top of the file:

<cfimport prefix="mytag" taglib="tags">

3. Create your query:

<cfquery name="blah" datasource="#mydsn#">
SELECT NewsID, NewsDate, NewsTitle, NewsItem FROM MyTable
</cfquery>

4. Put the tag on the page, passing in the results of the query:

<mytag:rss rs=#blah#>

If you browse the page, the RSS should be visible.

There are several optional attributes, which are outlined below:

Attributes:

rs: Recordset/query to use for the RSS file (default: new query)

title: title tag in channel (default: RSS)
link: link tag in channel (default: http://#cgi.SERVER_NAME#)
description: description tag in channel (default: RSS feed for #attributes.link#)
webmaster: webmaster tag in channel (default: nobody@notavaliddomain.com)

items: Struct of item field names (default: structnew())
items.title: Field name for title of RSS item (default: title)
items.description: Field name for descriptionof RSS item (default: description)
items.link: Field name for link of RSS item (default: link)
items.pubdate: Field name for pubdate of RSS item (default: pubdate)

items.permalink: http address for link with ID from database (default: http://#cgi.SERVER_NAME#/?id=)
items.id: Primary key for picking record

striphtml: strip the html tags from the item (true/false, default: false)
wordcount: truncate item to number of words (default: empty string for no truncation)
maxrows: show x number of rows (default: empty string for all records)
debug: true/false value for debugging the feed (true turns of text/xml content type)
xslt: name of an XSL transformation file (default: empty string for no transformations)

If the query has the proper field names for an rss file (title, description, pubdate, link, and id for the primary key) you don't need to pass in field names. If your blog or news query uses completely different fieldnames, simply set them up in a struct before calling the tag, like this:

<cfsilent>
<!--- Create the query --->
<cfquery name="rsNews" datasource="#request.dsn#">
SELECT NewsID, NewsDate, NewsTitle, NewsItem FROM Blog
ORDER BY NewsDate DESC
</cfquery>

<!--- Set up the field name mapping --->
<cfset fieldmappings = StructNew()>
<cfset fieldmappings.pubdate = "NewsDate">
<cfset fieldmappings.id = "NewsID">
<cfset fieldmappings.title = "NewsTitle">
<cfset fieldmappings.description = "NewsItem">
</cfsilent>
<!--- Call the cf_rss tag --->
<mytag:rss rs=#rsNews# items=#fieldmappings#>

Alternatively, you can avoid the import statement and use old-style cf_ syntax:

<cf_rss rs=#blah#>

You can also pass in the name of an XSL transformation file. A sample file is included in the zip:

<mytag:rss rs=#rsNews# items=#fieldmappings# xslt="rss.xslt" >

I hope you find it useful. See it in action here. View the source here or download it here.

Cross posted at http://www.tom-muck.com/blog/

Category tags: ColdFusion, Dreamweaver

Are You Eligible for a Free Studio Upgrade?

Posted Sunday, September 25, 2005 11:06:00 AM by Stephanie

Stephanie

I'm sure most everyone wants the new Studio 8. It rocks! But maybe you just recently broke down and purchased Studio MX 2004 (or any of the products contained therein) and you're just not ready to fork over more cash just yet. Well -- maybe you don't have to. If you purchased on or after July 8th, make sure to read Macromedia's page with the upgrade rules. You might be pleasantly surprised!

Also, don't forget that if you own Dreamweaver, Fireworks or Flash, you can upgrade and get the whole Studio 8 package for the normal studio upgrade price ($399USD). That's quite a generous deal. Not sure you want to upgrade? Take the 30-day test drive -- you may become addicted like I did and not be able to return to your previous versions.

(BTW, I make no money whether you upgrade or not. I just love the stuff. ;))

Category tags: ColdFusion, Dreamweaver, Fireworks, Flash, Macromedia News

Blues Vacation report

Posted Monday, August 29, 2005 6:45:56 PM by Tom Muck

Tom Muck

I posted my belated blues vacation report earlier on my personal blog (way too long to include here.) How sad that many of the areas we just visited are now under water and/or badly damaged. I hope everyone in Mississippi, Alabama, and Louisiana is staying safe.

Category tags: ColdFusion, Dreamweaver, Music

Hit by the baton. . .

Posted Monday, August 01, 2005 8:48:08 AM by Tom Muck

Tom Muck

Ah, another baton. How. . . .fun. Thanks Kim.

I suppose I should have more stuff than I do, as I've been in Team MM for years since they were called Evangelists, but I don't have much. The items I can remember include the following:

  • 4 t-shirts
  • 2 short sleeved Team MM shirts
  • 1 Macromedia backpack
  • 1 CD car visor
  • 2 Flash drives
  • Various posters (Central api, ColdFusion tags)
  • 1 giant green Dreamweaver 4 foam finger

Favorite items are probably the Flash drives. They are actually useful, and I hate spending money on computer stuff so they came in real handy. I also like the latest ColdFusion 10th birthday t-shirt. I would have listed the birthday cake, but that's already gone.

The most unusual item is the giant foam finger, which sat around for years before finally disappearing during a recent move. I think my wife was probably sick of seeing it around. It was about 3 feet long and absolutely useless, unless you got in a boxing match with the Jolly Green Giant.

5 people I'm passing the baton to:

Angela Buraglia

Dan Short

Lawrence Cramer

Ray West

Bill Horvath

Category tags: ColdFusion, Dreamweaver

Sniplet enhancement

Posted Wednesday, July 27, 2005 8:12:42 PM by Tom Muck

Tom Muck

One of my more popular extensions has been the free extension Sniplets, which is handier in some ways than Dreamweaver's built-in Snippets panel. Sniplets are stored on your context menu from Code View, and in a short menu. I use them for short code snips that I need all the time. At the request of a customer, I added the ability to import export Sniplets from the extension dialog box. Now, you can move Sniplets from machine to machine, and more importantly, keep groups of Sniplets stored in folders. Sniplets export as regular Snippet files -- yes, compatible with regular Dreamweaver Snippets. What I am now doing is keeping my often-used code snips as Snippets in the Snippets panel, then depending on what I am working on (a ColdFusion site, PHP site, Dreamweaver extension, etc) I will clean out my Sniplet list and import a new set for the project. You can download it free from http://www.tom-muck.com/extensions/help/Sniplets/

Category tags: ColdFusion, Dreamweaver

Persistent State CFCs and CFQUERY

Posted Thursday, June 30, 2005 5:39:51 PM by Tom Muck

Tom Muck

I wrote this in my article on persistent CFCs for Community MX last week, but it's worth repeating here because I see a lot of people using CFCs in session and application scope that do not take this into account: you should always declare local variables at the top of your <cffunction> tag:

<cffunction name="blah" returntype="any">
<cfset var i = 0>
<cfloop from="0" to="10" index="i">
<!--- Some code --->
</cfloop>
</cffunction>

Many people are doing this, but I wonder how many people apply the same principle to recordsets within the CFQUERY tag. . . .I see this a lot:

<cffunction name="testRS" access="public" output="false">
  <cfquery name="rs" datasource="Northwind">
  SELECT * FROM Products
  </cfquery>
  <cfreturn rs>
</cffunction>

If this is in a persistent scope, the variable rs will be available even after the return call. In fact, it will hang around for the life of the persistent CFC. To properly scope the query, you should declare it first:

<cffunction name="testRS" access="public" output="false">
  <cfset var rs = "">
  <cfquery name="rs" datasource="Northwind">
  SELECT * FROM Products
  </cfquery>
  <cfreturn rs>
</cffunction>

Now, the rs query will be destroyed after the function returns the variable to the caller -- it is not persisted within the CFC. You can try it like this. Create a cfc:

<cfcomponent>

<cffunction name="testRS" access="public" output="false">
<cfquery name="rs" datasource="Northwind">
SELECT * FROM Products
</cfquery>
<cfreturn rs>
</cffunction>

<cffunction name="testRSBad" access="public" output="false">
<cfreturn rs>
</cffunction>

</cfcomponent>

The function testRSBad() looks like it should throw an error, because rs is not defined, however if this is in persistent state and you hit the testRS() method first, then rs is persisted for the entire session.

Try it out: make sure you have sessions turned on in the Application.cfm file. Then put some code on a page called testrs.cfm:

<a href="testrs.cfm?hit=true">Next page</a>

<cfif not isdefined("url.hit")>
  <cfset session.user1 = createobject("component","testuser").new()>
  <cfset session.user1.testRS()>
</cfif>

<cfdump var=#session.user1.testRSBad()#>

You have a link to the page, and you are instantiating the session instance of the CFC only once -- when you preview the page. When you hit the link, you will see the page again with the same recordset dumped out, but this time it is coming from the leftover persisted global variable rs that was not scoped properly in the CFC.

Cross-posted at Tom-Muck.com

Category tags: ColdFusion, Community MX

Full post feeds now available

Posted Wednesday, June 29, 2005 12:08:26 PM by Tom Muck

Tom Muck

I added new RSS feeds to the CMXtraneous blog -- full posts with HTML code. The original RSS feeds stripped HTML and also truncated posts to a small summary. Now, in the RSS module in the sidebar, you can get either the original RSS feed or the full post feed. This also works for individual blog author feeds as well.

The feeds are styled somewhat with XSL and CSS so that they can be read in a browser.

Category tags: Blogs and Blogging, ColdFusion

SQL function to chop a field by number of words

Posted Monday, June 20, 2005 6:37:59 PM by Tom Muck

Tom Muck

I was prompted by a question on the CMX forums today to finally break down and write a function to return a number of words from a database field, which I've been meaning to do for a long time. There are script examples on the web for ASP and ColdFusion code to truncate a specific database field to a certain number of words (split at the word rather than mid-word, as the LEFT function does), but there is no easy way to do it in SQL, unless you use a loop. The following function will truncate any field to a specific number of words. Pass in the string you want to parse, and the number of words to return.

CREATE FUNCTION fnGetNumberOfWords (
  @stringToSplit varchar(8000),
  @numberOfWords int
)

RETURNS varchar(8000) AS

BEGIN

DECLARE @currentword varchar(8000)
DECLARE @returnstring varchar(8000)
DECLARE @wordcount int
SET @wordcount = 0
SET @returnstring = ''
SET @currentword = ''
SET @stringToSplit = ltrim(rtrim(@stringToSplit))
Declare @index int

WHILE @wordcount < @numberOfWords AND len(@stringToSplit) > 0
  BEGIN
    Select @index = CHARINDEX(' ', @stringToSplit)
    if @index = 0
      BEGIN
        SELECT @currentword = ltrim(rtrim(@stringToSplit))
        SELECT @wordcount = @numberOfWords
      END
    else
      BEGIN
        IF (len(@stringToSplit) - @index > 0) BEGIN
        SELECT @currentword = ltrim(rtrim(LEFT(@stringToSplit, @index-1)))--the new shortened string
        SELECT @stringToSplit = RIGHT(@stringToSplit,LEN(@stringToSplit) - @index) -- the rest
      END
    END
  SELECT @returnstring = @returnstring + ' ' + @currentword
  SELECT @wordcount = @wordcount + 1
END

SET @returnstring = LTRIM(@returnstring)
RETURN @returnstring

END

Call it like this:

SELECT dbo.fnGetNumberOfWords(MyField, 10) FROM mytable

(returns first 10 words from MyField)

The advantage to doing it in the database rather than on the web page, is that you are only returning a small portion of the field to the web page, rather than the entire field. This can speed up the query. A few preliminary tests show that the smaller number of words you return, the quicker the query will execute. In other words, if your query returns a field that can contain up to 8000 characters in it (like a blog entry, for example) and you only need the first 50 words for a summary, the query to return the 50 words will be faster than a query that returns the whole field. Also, your scripted page will execute faster because it is simply displaying the field and not performing any further logic, looping, or parsing on the field.

I talked about user-defined SQL functions in one of my articles at Community MX as well:

Using CSV Strings in SQL Server: Part 2

Note that the function does not work on text or ntext data types. I hope you find it useful.

Category tags: ColdFusion, Community MX, Dreamweaver, SQL Server

The baton

Posted Thursday, May 19, 2005 9:14:20 AM by Tom Muck

Tom Muck

Bill passed me the musical baton (from Stephanie originally), so I'll play along.

Total volume

0, zip, nada. I don't generally mix the computer with music, and don't have an iPod. In fact, my office machine doesn't even have sound. I've been to iTunes and they don't have much that I would be interested in. They seem to only have a few things. I buy CDs. . .lots of them. I don't know how many, but when I like a group or artist I usually get everything they have, including bootlegs, live albums, and re-issues. If there is an artist I like, like Little Walter, I hunt down every song they've appeared on and track down out-of-print albums and CDs on Ebay and other online music stores. My favorite company is Document Records, because they reissue all the old blues 78s on CD in their "Complete recorded works" series. At home I usually throw an old album on the turntable in my office.

Last CD Bought

Judas Priest: Angel of Retribution. Judas Priest is back together with Rob Halford after many many years apart and the album is great. Not quite up to the old classic albums that always had memorable songs that became instant barroom classics, but still a solid album.

Song Playing Right Now

None on my computer. In my head, the Roy Orbison tune sung by Carrie Underwood last night on American Idol.

Five songs I listen to a lot, or that mean a lot to me:

I don't generally listen to songs individually unless I listen to the whole CD/album, but here are 5 recent well-played songs (with listen-links, if you're interested):

Five People to Whom I’m Passing the Baton

  • Ray West
  • Kim Cavanaugh
  • Sheri German
  • Big John
  • Tom Green

Sorry guys. ;-)

Category tags: ColdFusion, Music, On the Personal Side

More on the CMX site search -- RSS feeds added

Posted Monday, May 16, 2005 5:27:34 PM by Tom Muck

Tom Muck

Our new site search functionality went live over the weekend, but we are continually trying to improve it. Today we added an RSS feed for search results to the page, which should be extremely useful for people with RSS readers. For example, if you are interested only in flash remoting articles, you can do a search for "flash remoting", set up your RSS reader with the search results RSS link, and every time a new article or blog entry comes out, your RSS reader will pick up the change in the RSS feed.

Our RSS feed also handles categories and authors. For a full list of RSS feeds available from Community MX, check the opml page. The RSS and OPML feeds now contain some basic XSLT transformation with styles so that if you should happen to click the link you should see a readable page rather than raw XML.

Category tags: ColdFusion, Community MX, Dreamweaver, Search

New Community MX site search functionality

Posted Saturday, May 14, 2005 1:11:42 PM by Tom Muck

Tom Muck

We've implemented a new search mechanism at Community MX. Anyone who has used the site search in the past knows that we had three search types: a Verity full text search, a Basic search which was a keyword search of the article titles and descriptions, and an advanced search which allowed you to narrow down searches by date or content type, and also allowed a search for all words, any words, or exact phrase.

The new search mechanism goes way beyond this. Here are some of the new features:

  • The Verity full-text search is now combined with the database search. In other words, when you do a search, the full content of the site is searched, and then the results are combined with a keyword search that searches the content description, keywords, reader level, author, etc from the database.
  • Search results can be title/date only or full descriptions (for simple and advanced search).
  • In the Advanced search, you can now filter by author, date, category, reader level.
  • You can now display more than 10 records per page (up to 100).
  • You can save search preferences so that every time you do a search you will have the same settings.
  • You can search within results.
  • You can order results by author, date, or reader level, in Basic or Advanced mode..
  • The CMXtraneous blog has become a good repository for information and tips, so the site search now searches the full content of the articles within the site as well as the knowledge base and the blog.
  • Popular searches are saved and the top 10 searches can be displayed.
  • Search Tips page was also updated to reflect changes.

This should enhance the user experience at Community MX and allow content to be found more easily. For example, let's say you want to find all items written by Danilo that mention JavaScript. You can now type danilo javascript in the box, and all articles, blog items, and knowledge base items that mention Danilo or were written by Danilo and mention JavaScript will be returned. If you want to find all articles that mention the Holly hack, type "holly hack" (in quotes) into the box and the search will return all articles, blog items, and knowledge base items that mention Holly hack.

We hope you find the new site search functionality useful. Please try out the search and if you find any problems or have any suggestions or comments about the new search functionality, please contact us at http://www.communitymx.com/contactsearch.cfm.

Category tags: ColdFusion, Community MX, Dreamweaver, Search

AJAX and the Sexy New MXNA 2.0 Reports

Posted Tuesday, May 10, 2005 7:18:28 AM by Stephanie

Stephanie

I have to say that I'm impressed. Last night when I got home from Volleyball (yes, we won both matches, thank you ;)), a friend pinged me to talk about AJAX (Asynchronous JavaScript and XML). As I always tell people when I talk about sIFR, "I am not the JavaScript guru," but man, maybe I should be. The recent methods being used open up a whole new world of possibilities for web page interactivity. (No, I won't get into the criticism here.)

Take the new MXNA 2.0 as an example. Though they had done some cool AJAX stuff with the reports already, Christian and Mike have really outdone themselves with their proof of concept using the MXNA 2.0 Category Feed Reports. Click on a category on the right -- like Dreamweaver -- watch as the feeds below load without your page reloading. Now click on a feed, like CMXtraneous, and watch how the chart simply morphs into the new feed. See how the posts below it change? Did you notice that you never once reloaded the page? How sexy is that?

Christian explains better than I, "...notice how both the Flash chart and the posts below the chart update without the page refreshing. When you click on a feed name, we're using JavaScript to pass data into the Flash movie which then updates itself using the MXNA web services. When you click on a bar in the chart, we pass data from the Flash chart into JavaScript to load the selected post at the top of the list." Wow.

It's a new sphere of Flash/AJAX interaction and it can lead to some exciting possibilities. As Flash and JavaScript uses continue to evolve, it makes me wonder what I'm missing. Looks like it might be time to expand my skills yet again. (Do we ever know enough?)

Category tags: Blogs and Blogging, ColdFusion, Dreamweaver, Flash, JavaScript, Macromedia News

ANN 4-18-2005 : Adobe seeks to purchase Macromedia in an all stock deal

Posted Monday, April 18, 2005 9:15:11 AM by Danilo Celic

Danilo Celic

Big news in the web development world, I'll let the announcements speak their own volumes, and I'm sure you'll hear plenty of others on the topic. I'm going to wait an see what further info comes out before I decide what I'm going to think about the whole deal.

Macromedia's side
Adobe's side
Mike Chamber's

I guess we'll become quite tired of the "forward looking statements" statements in the near future.

Category tags: Captivate, ColdFusion, Community MX, Dreamweaver, Extensibility, Fireworks, Flash, Macromedia News, Web Business

Article Update

Posted Wednesday, April 06, 2005 10:03:05 PM by Danny Patterson

Danny Patterson

In my article titled Communicating with the Server without Reloading the Page, I used a free temperature web service to show how the XmlHttpRequest object worked in JavaScript.  Even though this service has been active for a couple years now, I should have known better.  Merely two weeks after my article was published; they took the web service down.

They did however put up a static replacement.  Instead of returning the current temperature of the zip code you provide, the service always returns a static temperature without doing a lookup.  But all is not lost, the point of the article is not how to get the temperature of a given location; it is how to do so without reloading the page.

With the help of Laurie and Paul, the article is now updated to work with the newly provided, static web service.

Category tags: ColdFusion, Community MX, JavaScript

ColdFusion 7 extensions for Dreamweaver MX 2004

Posted Monday, February 07, 2005 10:02:14 PM by Danilo Celic

Danilo Celic

ColdFusion 7 was released today, as you've probably heard if you've been reading the Macromedia related blogs today. With the new version comes new tags and attributes, and if you want to use them in Dreamweaver MX 2004, you'll need to get the CF7 extensions for Dreamweaver MX 2004. Also part of the suite of extensions for CF7 are several other enhancements:

  • A datasource editor that allows you to edit and create new datasources directly within Dreamweaver
  • CFC filtering for the Components panel to show cfcs only for the current site
  • CFC recordsets which allow you the same point and click creation through the recordset dialog, and drag and drop functionality from the Bindings panel but the extensions allow you to abstract things a bit by placing your code into a CFC rather than inlining the code in the page as with the "normal" recordsets.
  • Login wizard which brings point and click protection to a web site using the cfloginuser tag new to CF7.

To find out more about the ColdFusion 7 Extensions for Dreamweaver.

Category tags: ColdFusion, Dreamweaver, Extensibility, Macromedia News

Blocking the Value of Comment Spam

Posted Tuesday, January 25, 2005 3:28:17 PM by Stephanie

Stephanie

Those of you with blogs know what a pain it can be when the spammers send their bots out to muck up your comments with links to their own sites. They know the value of a link in Google and they frankly don't care whether they're messing with the rules or messing with you -- they simply want links from anywhere to raise their search engine placement.

Maybe not anymore -- Google has an idea! A new attribute that stops the Google spiders from following a link. You can place it dynamically every time someone leaves a link in your blog. Google says:

From now on, when Google sees the attribute (rel="nofollow") on hyperlinks, those links won't get any credit when we rank websites in our search results. This isn't a negative vote for the site where the comment was posted; it's just a way to make sure that spammers get no benefit from abusing public areas like blog comments, trackbacks, and referrer lists ... We think any piece of software that allows others to add links to an author's site (including guestbooks, visitor stats, or referrer lists) can use this attribute. We're working primarily with blog software makers for now because blogs are such a common target.

Blog software makers are whole-heartedly jumping on the bandwagon to implement this strategy. If you've created your own blog, you may want to add this attribute in yourself. You can read all the details at The Google Blog.

Category tags: Blogs and Blogging, ColdFusion, Dreamweaver, Search