PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 How to customize Macromedia Dreamweaver MX 
Description: Add your own extensions in Dreamweaver MX.
Author: ionsurge
Date: Fri Jul 11, 2003 2:42 pm
Type: HowTo
Keywords: dreamweaver, mx, extensions, tpl, customize, customise, dw, dmx
Category: Styles
How to customize Macromedia Dreamweaver MX
--------------------------------------------------------------------------------------------------

This tutorial will teach you how to customize Macromedia Dreamweaver MX, in terms of the ability to customize the different extensions that it has, to suit the type of file that you wish to edit, be it .tpl files, or .cfg files. Simply modify the extensions to suit your situation - it can literally be any type of code file.

Files Required To Modify (3 in total):
  • Extensions.txt
  • DocumentStyles.xml
  • MMDocumentTypes.xml
It is strongly recommended that you back up all of these files before modifying them.

Note: This tutorial was created for Windows XP Professional/Windows 2000 users. However, you can use the Search feature (Window + S), to search for the appropriate files needed to be modified.


Setting Up Dreamweaver To Handle Custom Extensions

Note: It is important that you do this while Dreamweaver is closed. If you have an error saying that the extension could not be added, it will be due to you having missed a stage. Simply go through the stages, and make sure you have correctly added the necessary data.

Step 1 :

Open Extensions.txt from (non-xp users, use the windows search function (Window + S) :

Code:
C:\Documents and Settings\User\Application Data\Macromedia\Dreamweaver MX\Configuration


You will see 21 lines of extensions, more if you have previously modified it. Add the following at the end of the file, at what would be line 22:

Code:
TPL:PHPBB Template Documents


Also, you will find a long list of extensions at line 1, where each extension is seperated by a comma (,). All extensions MUST be in CAPITAL LETTERS (Upper Case).

Once you have done that, save and close.

This will add the ability to select these files from the Dreamweaver Open Dialog. However, it will open unknown files as though text files. Alter the position to change the place in the menu. We still need to do a little more before we can get it to work correctly.

Step 2 : Getting Dreamweaver To Understand

You'll now need to open two other files. It is important that you alter these files properly, otherwise you could get dreamweaver to start behaving in ways you do not want it to.

Note: All the directory paths hereon are relative to the installation path.

Open the following file using a text editor - do not use Dreamweaver:

Code:
Configuration\Strings\documenttypes.xml


Go to the bottom of the file. By default there will be 66 lines of code, with a list of items, numbering from 0 to 63.

Add the following line of code after number 63:

Code:
        <string id="mmdocumenttypes_64" value="TPL" />
        <string id="mmdocumenttypes_65" value="<![CDATA[TPL document]]>" />


Once done, save and close.

Now open up the following file:

Code:
Configuration\DocumentTypes\MMDocumentTypes.xml


You'll see a lot of code, each of which is responsible for defining what extension is what, and when open what Dreamweaver will do to it. You may also notice that each item is numbered, 0-63, more if you have altered the file previously.

Add the following to the end at line 258:

Code:
        <documenttype id="TMPL" internaltype="HTML" winfileextension="tpl" macfileextension="tpl" file="Default.html" writebyteordermark="false">
                <TITLE>
                        <MMString:loadString id="mmdocumenttypes_64" />
                </TITLE>
                <description>
                    <MMString:loadString id="mmdocumenttypes_65" />
                </description>
        </documenttype>


Make sure it is at the end, before the closing tags:

Code:
</documenttypes>


Notice the difference, the extension files are a "documenttype". "</documenttypes>" signals the end of all the document types. Adding anything after this would render the extension useless, and could cause Dreamweaver to behave differently.

Once done, save and close.

Dreamweaver will now recognize the file type.

End note:

Okay, so we are done, Dreamweaver is now happy with a new extension. You can always add more, and define your own styles, and well I may write another tutorial on how to go about doing it. Further, you can always add more than one extension at a time, and it can be limitless.

I hope this helps you guys create templates that much easier, and well do a lot more with Dreamweaver.

Have fun!

Smile


Ionsurge.

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.