spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / new / dwextend
Developer News
MicrosoftÂ’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear
Red Hat Heads For The JON 2.0

Extending Dreamweaver

Macromedia Dreamweaver has long been my 'editor of choice' for creating Web sites. Every editing program I've used has had its limitations but Macromedia appears to have found a way to make its Web authoring tool almost limitless: they let you build it yourself.

The Dreamweaver program itself is built using HTML, JavaScript and XML; just like a Web page. This means that early Dreamweaver users were able to extend the abilities of the program and add commands and menu items that didn't exist. (it was possible, but it wasn't easy.) Macromedia has since started its 'Dreamweaver Exchange', making it as simple as downloading and double clicking the command you want to add. And some of these commands are pretty advanced.

Some of my favorites: A self-centering pop-up window. A premade calendar. JavaScript form field validation.

Advanced JavaScripts that used to take an hour to hand code now take me a couple clicks. You don't even need to KNOW JavaScript to add advanced features to your page. What you DO need:

A copy of Dreamweaver. A copy of Extensions Manager.

Here's where to find extensions:

Authorized*:

http://www.macromedia.com/exchange/dreamweaver/

Other*:

http://www.yaromat.com/ http://people.netscape.com/andreww/dreamweaver/customtags.html http://www.massimocorner.com/ http://www.projectseven.com/dreamweaver/index.htm http://dreamweaverfever.com/grow/ http://thecomb.tripod.com/dream.htm

Authorized Extensions vs. Unauthorized ones:

There are two kinds of extensions, 'authorized' and 'unauthorized.' Authorized means that the good people of Macromedia have checked it out and it appears to do what it says without causing any problems. Unauthorized means that it may work or it may give you errors. I've found a few that gave me errors but not many.

But I Want To Build My Own!

You can do this too. The easiest way is to find out how other people did it. Find an extension similar to yours, install it with Extensions Manager, then go looking for it on your hard drive. When I download an extension it usually ends up in C:\Program Files\Macromedia\Dreamweaver 3\Configuration\Objects\Invisibles.

A simple extension (or MXP file) is made up of three or four parts, with lots of variations:

  1. The HTML file that calls the JavaScript.
  2. The GIFs used
  3. The JavaScript that does the work.
  4. The MXI file that tells Extensions Manager who built it, what it is, and where to install it.

Here's a simple MXI File to insert a 'JavaScript back button'. Note that this is only one of the three files needed to build an extension:

<macromedia-extension id="99999" name="JavaScript Back Button" version="1.0.0" type="Object"> <!-- List the required/compatible products --> <products> <product name="Dreamweaver" version="3" primary="true" /> </products> <!-- Describe the author --> <author name="Danny Mather" /> <!-- Describe the extension --> <description> <![CDATA[Inserts a javascript 'back' link with text of your choice. ]]> </description> <!-- Describe where the extension shows in the UI of the product --> <ui-access> <![CDATA[Access this object from invisibles in the object palette ]]> </ui-access> <!-- Describe the files that comprise the extension --> <files> <file name="javaback.html" destination="$dreamweaver/configuration/objects/invisibles" /> <file name="javaback.gif" destination="$dreamweaver/configuration/objects/invisibles" /> </files> <!-- Describe the changes to the configuration --> <configuration-changes> </configuration-changes> </macromedia-extension>

If you look between the ' ' tag you can see where it tells Extensions Manager where to install the HTML file within the Dreamweaver folder.

TEXT CONTENT FOR JAVASCRIPT_BACK_BUTTON.HTML

<html> <head> <!-- Created by Danny Mather, 12.05.2000, Object Name: Javascript Back Button:Text --> <!-- Copyright 1999 Macromedia, Inc. All rights reserved. --> <title>JavaScript Back Button</title> <STYLE TYPE="text/css"> <!-- FORM.tb {display:inline;} .twidth{width:100%} .include{ font-size: 75%; font-family: verdana, arial, helvetica;} .includebig{font-family: verdana, arial, helvetica;} .includebig A:link { color: blue; } .includebig A:visited { color: purple; } .include A:link { color: blue; } .include A:visited { color: purple; } .submitter { font-size: 75%; font-family: verdana, arial, helvetica; } .codehighlight {background:#eee} .WRy1{background:#fc0} .WRy2{background:#fff3ac} pre.code {color: #660099; margin-left:5%} address {text-align: right} a:hover{background:#FD3;} a.small, .small A { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:link.small, .small A:link { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:visited.small, .small A:visited { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:hover.small, .small A:hover { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: underline; color: #CC0000; } body {background:#FFFFFF; margin-left: 5%; margin-right: 5%} .WRBannerCenter {margin-left:-5%; margin-right:-5%; margin-top:8px; margin-bottom:8px; text-align:center} --> </STYLE> <STYLE TYPE="text/css"> <!-- FORM.tb {display:inline;} .twidth{width:100%} .include{ font-size: 75%; font-family: verdana, arial, helvetica;} .includebig{font-family: verdana, arial, helvetica;} .includebig A:link { color: blue; } .includebig A:visited { color: purple; } .include A:link { color: blue; } .include A:visited { color: purple; } .submitter { font-size: 75%; font-family: verdana, arial, helvetica; } .codehighlight {background:#eee} .WRy1{background:#fc0} .WRy2{background:#fff3ac} pre.code {color: #660099; margin-left:5%} address {text-align: right} a:hover{background:#FD3;} a.small, .small A { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:link.small, .small A:link { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:visited.small, .small A:visited { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: none; color: #000000; } A:hover.small, .small A:hover { font-family: Verdana, Helvetica, sans-serif; font-size: 10px; font-weight: normal; text-decoration: underline; color: #CC0000; } body {background:#FFFFFF; margin-left: 5%; margin-right: 5%} .WRBannerCenter {margin-left:-5%; margin-right:-5%; margin-top:8px; margin-bottom:8px; text-align:center} --> </STYLE> </head> <script language="javascript"> function objectTag() { // Return the html tag that should be inserted return '<a href="javascript:history.back();">' + document.forms[0].jback.value + '</a>'; } </script> <body> <form name="theform"> <table border=0> <tr> <td nowrap>&nbsp;&nbsp;Enter text for back button: <br> <textarea name="jback" cols="30" rows="1" wrap="virtual"></textarea> </td> </tr> </table> </form> </body> </html>

Once you've created the files needed for your extension to work you use Dreamweaver's 'Package' function. It'll ask you where your MXI file is and then compress these three files into a single MXP file ready for installation.

There are tons of handy exensions available for download at Macromedia and more being created every week. Let's see some of yours up there too!

Danny Mather is a Web and flash developer for nject creative based in Vancouver, BC, Canada. He can be reached at mailto:danny@nject.com and http://nject.com/.

This article originally appeared in the Jan. 4, 2000 edition of the WebReference Update Newsletter.


Comments are welcome



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Perl Pragma Primer · Implement Drag and Drop in Your Web Apps: Part 2 · How to Create an Ajax Autocomplete Text Field: Part 5
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
SQL Server 2005 Express Edition - Part 22 - Upgrading from Microsoft SQL Server Desktop Engine (MSDE) · Vyatta: Downgrades that Pay Off · NetMotion Brings Cross-Network Support to Wireless VoIP


Revised: Jan. 5, 2001

URL:http://www.webreference.com/new/dwextend.html