Macromedia Dreamweaver MX 2004- Extending Dreamweaver
|
|
Bookmark Macromedia Dreamweaver MX 2004- Extending Dreamweaver |
About Macromedia Dreamweaver MX 2004- Extending DreamweaverHere you can find all about Macromedia Dreamweaver MX 2004- Extending Dreamweaver like manual and other informations. For example: review.
Macromedia Dreamweaver MX 2004- Extending Dreamweaver manual (user guide) is ready to download for free.
On the bottom of page users can write a review. If you own a Macromedia Dreamweaver MX 2004- Extending Dreamweaver please write about it to help other people. [ Report abuse or wrong photo | Share your Macromedia Dreamweaver MX 2004- Extending Dreamweaver photo ]
Manual
Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Download
(English)Macromedia Dreamweaver MX 2004-extending Dreamweaver, size: 3.3 MB |
Macromedia Dreamweaver MX 2004- Extending Dreamweaver
User reviews and opinions
| wpennington |
11:45pm on Wednesday, August 25th, 2010 ![]() |
| 69% of aluminum in this sport coupe, creating an impression that the structure of the body light directly felt. At first we had to hesitate. | |
| buraq |
5:00pm on Sunday, July 11th, 2010 ![]() |
| 1. The feel. This is a very special car to dr... design, feel, performance minimal rear seats and abysmal ipod integration, no spare tire | |
| Bats |
6:45pm on Saturday, May 8th, 2010 ![]() |
| The Audi TT R has 180bhp, which is enough for any smart lady. The body shape is perfect, and an eye turner. The drive is amazing. But Audi!! | |
Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.
Documents

// The following instance of displayHelp() opens a browser to display a file // that explains how to use the extension. function displayHelp() { var myHelpFile = dw.getConfigurationPath() + "ExtensionsHelp/myExtHelp.htm"; dw.browseDocument(myHelpFile); }
Localizing an extension
Use the following techniques to make it easier to translate your extensions into local languages.
Separate extensions into HTML and JavaScript files. The HTML files can be replicated and
localized; the JavaScript files will not be localized.
Do not define display strings in the JavaScript files (check for alerts and UI code). Extract all
localizable strings into separate XML files in the Dreamweaver Configuration/Strings folder. Do not write JavaScript code in the HTML files except for required event handlers. This eliminates the need to fix a bug multiple times for multiple translations after the HTML files are replicated and translated into other languages.
XML String files Store all strings in XML files in the Dreamweaver Configuration/Strings folder. If you install many related extension files, this lets you share all strings in a single XML file. If applicable, this also lets you refer to the same string from both C++ and JavaScript extensions. You could create a file called myExtensionStrings.xml. The following example shows the format of the file:
<strings> <!-- errors for feature X --> <string id="featureX/subProblemY" value="There was a with X when you did Y. Try not to do Y!"/> <string id="featureX/subProblemZ" value="There was another problem with X, regarding Z. Don't ever do Z!"/> </strings>
Now your JavaScript files can refer to these translatable strings by calling the dw.loadString() function, as shown in the following example:
function initializeUI() {. if (problemYhasOccured) { alert(dw.loadString("featureX/subProblemY"); } }
You can use slash (/) characters in your string identifiers, but do not use spaces. Using slashes, you can create a hierarchy to suit your needs, and include all the strings in a single XML file.
Note: Files that begin with cc in the Configuration/Strings folder are Contribute files. For example, the file ccSiteStrings.xml is a Contribute file.
Localizable Strings with Embedded Values Some display strings have values embedded in them. You can use the errMsg() function to display these strings. You can find the errMsg() function, which is similar to the printf() function in C, in the string.js file in the Configuration/Shared/MM/Scripts/CMN folder. Use the placeholder characters percent sign (%) and s to indicate where values should appear in the string and then pass the string and variable names as arguments to errMsg(). For example:
Document type CSS Java JavaScript VB VBScript Text EDML TLD VTML WML XML
Server model
Internal type Text Text Text Text Text Text XML XML XML XML XML
File extensions Previous server model css java js vb vbs txt edml tld vtm, vtml wml xml
If you need to create a new document type, you can either add your entry to the document definition file that Macromedia provides (MMDocumentTypes.xml) or add a custom definition file to the Configuration/DocumentTypes folder.
Note: The NewDocuments subfolder resides in the Configuration/DocumentTypes folder. This subfolder contains default pages (templates) for each document type.
Structure of document type definition files The following example shows what a typical document type definition file might look like:
<?xml version="1.0" encoding="utf-8"?> <documenttypes xmlns:MMString="http://www.macromedia.com/schemes/data/string/"> <documenttype id="dt-ASP-JS" servermodel="ASP-JS" internaltype="Dynamic" winfileextension="asp,htm, html" macfileextension=asp, html" previewfile="default_aspjs_preview.htm" file="default_aspjs.htm" priorversionservermodel="UD4-ASP-JS" > <title> <loadString id="mmdocumenttypes_0title" /> </title> <description> <loadString id="mmdocumenttypes_0descr" /> </description> </documenttype>. </documenttypes> Note: Color coding for document types is specified in the XML files that reside in the Configuration/ CodeColoring folder.
In the previous example, the loadstring element identifies the localized strings that Dreamweaver should use for the title and description for ASP-JS type documents. For more information about localized strings, see Localized strings on page 50. The following table describes the tags and attributes that you can use within a document type definition file.
Element Type Tag
documenttype (root) id
Attribute
Required Description Yes Yes No Parent node. Unique identifier across all document type definition files. Specifies the associated server model (case-sensitive); by default, the following values are valid:
ASP.NET C# ASP.NET VB ASP VBScript ASP JavaScript ColdFusion JSP PHP MySQL A call to the getServerModelDisplayName()
Example function receiveArguments(newTitle) { var dom = dw.getDocumentDOM(); if (dom) dom.setTitle(newTitle); }
showIf()
Specifies that an item appears on the toolbar only if the function returns a true value. For example, you can use the showIf() function to show certain buttons only when the page has a certain server model. If the showif() function is not defined, the item always appears. The showIf() function is the same as the showIf attribute in a toolbar item tag. The showIf() function is called whenever the items enabler runs; that is, according to the value that the getUpdateFrequency() function returns.
Dreamweaver expects a Boolean value: true if the item appears; false otherwise.
Example function showif() { var retval = false; var dom = dw.getDocumentDOM(); if(dom) { var view = dom.getView(); if(view == design) { retval = true; } } return retval; }
A simple toolbar command file
This simple example implements a Title text box item as seen on the Dreamweaver document toolbar. The text box item lets the user enter a name for the current Dreamweaver document. You can implement this toolbar example by performing the following steps:
1 Creating the text box item 2 Writing the JavaScript code 3 Placing the file in the Toolbars folder
Creating the text box The following toolbar editcontrol item defines a text-editing box that is labelled Title:
<EDITCONTROL ID="DW_SetTitle" label="Title: " tooltip="Document Title" width="150" file="Toolbars/MM/EditTitle.htm"/>
The tooltip attribute causes Dreamweaver to display Document Title in a tooltip box when the user places the cursor over the text box. The width attribute specifies the size of the field in pixels. The file attribute specifies that the EditTitle.htm file contains the JavaScript functions that operate on the text box. The following figure shows the Title text-editing box:
Writing the JavaScript code When the user interacts with the text box, it causes Dreamweaver to invoke the EditTitle.htm command file in the Toolbars/MM folder. This file contains three JavaScript functions that operate on the Title text box. These functions are canAcceptCommand(), receiveArguments(), and getCurrentValue(). canAcceptCommand(): enable the toolbar item The canAcceptCommand() function consists of one line of code that checks to see if there is a current DOM and if the document is parsed as HTML. The function returns the result of those tests. If the conditions are true, Dreamweaver enables text box item on the toolbar. If the function returns the value false, Dreamweaver disables the item.
Macromedia HomeSite users can recognize the VTML file structure, but Dreamweaver does not use VTML files in the same way as HomeSite. The most important difference is that Dreamweaver contains its own HTML renderer that displays extension user interfaces (UIs), so the Dreamweaver VTML files are not used in the GUI rendering process. The following example illustrates the structure of the TagLibraries.vtm file:
<taglibraries> <taglibrary name="Name of tag library" doctypes="HTML,ASP-JS,ASP-VB" tagchooser="relative path to TagChooser.xml file" id="DWTagLibrary_html"> <tagref name="tag name" file="relative path to tag.vtm file"/> </taglibrary> <taglibrary name="CFML Tags" doctypes="ColdFusion" servermodel="Cold Fusion" tagchooser="cfml/TagChooser.xml" id="DWTagLibrary_cfml"> <tagref name="cfabort" file="cfml/cfabort.vtm"/> </taglibrary> <taglibrary name="ASP.NET Tags" doctypes="ASP.NET_CSharp,ASP.NET_VB" servermodel="ASPNet" prefix="<asp:" tagchooser="ASPNet/TagChooser.xml" id="DWTagLibrary_aspnet"> <tagref name="dataset" file="aspnet/dataset.vtm" prefix="<mm:dataset"/> </taglibrary> </taglibraries>
Chapter 11: Tag Libraries and Editors
The taglibrary tag groups one or more tags into a tag library. When you import tags or create a new set of tags, you can group them into tag libraries. Typically, a taglibrary grouping corresponds to a set of tags that are defined in a JavaServer Pages (JSP) TLD file, an XML document type definition (DTD) file, an ASP.Net name space, or some other logical grouping. The following table lists the taglibrary attributes:
taglibary.name taglibrary.doctypes
Description Used to refer to the tag library in the UI.
Mandatory/ optional Mandatory
Mandatory Indicates the document types for which this library is active. When the library is active, library tags appear in the Code Hints pop-up menu. Not all tag libraries can be active at the same time because name conflicts can occur (for example, HTML and WML files are incompatible). When specified, tags within the tag library have Optional the form taglibrary.prefix + tagref.name For example, if the taglibrary.prefix is "<jrun:" and the tagref.name is "if" then the tag is of the form "<jrun:if". This can be overridden for a particular tag. Optional If the tags in the tag library execute on an application server, the servermodel attribute identifies the server model of the tag. If the tags are client-side tags (not server-side tags), the servermodel attribute is omitted. The servermodel attribute is also used for Check Target Browsers. This can be any string that is different from the Optional taglibrary.ID attributes of other tag libraries in the file. The Extension Manager uses the ID attribute, so the MXP files can insert new taglibrary and the tags files into the TagLibraries.vtm file. A relative path to the TagChooser.xml file that is Optional associated with this tag library.
code and Dreamweaver. A server behavior extension consists of JavaScript, HTML, and Extension Data Markup Language (EDML), which is XML that is created specifically for extension data. Examples of these files reside in your installation folder in the Configuration/ ServerBehaviors folder, arranged according to server model. When you script an extension, use the dwscripts.applySB() function to instruct Dreamweaver to read the EDML files, retrieve the components of your extension, and add the appropriate code blocks to the users document. Server behavior instance: When Dreamweaver adds code blocks to a users document, the inserted code constitutes an instance of the server behavior. The user can apply most server behaviors more than once, which results in multiple server behavior instances. Each server behavior instance is listed in the Server Behaviors panel of the Dreamweaver interface. Runtime code: Runtime code is the set of code blocks that are added to a document when a server behavior is applied. These code blocks usually include some server-side code, such as ASP script that is enclosed in <%. %> tags. Participants: Your server behavior extension inserts code blocks into the users document. A code block is a single, continuous block of script, such as a server-side tag, an HTML tag, or an attribute that adds server-side functionality to a web page. An EDML file defines each code block as a participant. All the participants for a given server behavior comprise one participant group.
Note: For information about participants, participant groups, and how Dreamweaver EDML files are structured, see Extension Data Markup Language on page 248.
Dreamweaver architecture
When you use the Server Behavior Builder to create a Dreamweaver-specific extension, Dreamweaver creates several files (EDML and HTML script files) that support inserting the Server Behavior code into a Dreamweaver document (some behaviors also reference JavaScript files for additional functionality). The architecture simplifies your implementation of the API and also separates your runtime code from how Dreamweaver deploys it. This chapter discusses ways of modifying these files. Server behavior folders and files The user interface (UI) for each server behavior resides in the Configuration/ServerBehaviors/ ServerModelName folder, where ServerModelName is one of the following server types: ASP.NET_Csharp, ASP.NET_VB (Visual Basic), ASP_Js (JavaScript), ASP_Vbs (VBScript), ColdFusion, JSP, PHP_MySQL, or Shared (cross-server model implementations). Extension Data Markup Language Dreamweaver generates two EDML files when you use the Server Behavior Builder: a group EDML file and a participant EDML file corresponding to the names that you provide in the Server Behavior Builder. The group file defines the relevant participants, which represent code blocks, and the groups define which participants are combined to make an individual server behavior. Group files Group files contain a list of participants, and participant files have all server-model-specific code data. Participant files can be used by more than one extension, so several group files can refer to the same participant file. The following example shows a high-level view of the Server Behavior Group EDML file. For a complete list of elements and attributes, see Group EDML file tags on page 262.
Arguments serverBehavior
The serverBehavior JavaScript object represents the server behavior; it is necessary to modify
an existing behavior. If this is a new behavior, the argument is null.
Dreamweaver expects an empty string if successful or an error message if this function fails. canApplyServerBehavior()
Determines whether a behavior can be applied. Dreamweaver calls this function before the Server Behaviors dialog box appears. If this function returns a true value, the Server Behaviors dialog box appears. If this function returns a false value, the Server Behaviors dialog box does not appear and the attempt to add a server behavior stops.
The serverBehavior JavaScript object represents the behavior; it is necessary to modify an
existing behavior. If this is a new behavior, the argument is null.
Dreamweaver expects a Boolean value: true if the behavior can be applied; false otherwise.
copyServerBehavior()
Implementing the copyServerBehavior() function is optional. Users can copy instances of the specified server behavior. In the following example, this function is implemented for recordsets. If a user selects a recordset in the Server Behaviors panel or the Data Binding panel, using the Copy command copies the behavior to the Clipboard; using the Cut command cuts the behavior to the Clipboard. For server behaviors that do not implement this function, the Copy and Cut commands do nothing. For more information, see How the Server Behavior API functions are called on page 251. The copyServerBehavior() function should rely only on behavior object properties that can be converted into strings to exchange information with the pasteServerBehavior() function. The Clipboard stores only raw text, so participant nodes in the document should be resolved and the resulting raw text should be saved into a secondary property.
Note: The pasteServerBehavior() function must also be implemented to let the user paste the behavior into any Dreamweaver document. Arguments serverBehavior
The serverBehavior JavaScript object represents the behavior.
Dreamweaver expects a Boolean value: true if the behavior copies successfully to the Clipboard; false otherwise. deleteServerBehavior()
Removes the behavior from the users document. It is called when the user clicks the Minus (-) button on the Server Behaviors panel. It can edit a users document. For more information, see dwscripts.deleteSB() on page 259.
If this function is defined, a Help button appears below the OK and Cancel buttons in the dialog box. This function is called when the user clicks the Help button.
Dreamweaver MX (this function replaces the findSBs() function from earlier versions of Dreamweaver).
Finds all instances of a server behavior and all the participants on the current page. It sets the title, type, participants array, weights array, types array, selectedNode value, and incomplete flag. This function also creates a parameter object that holds an array of user-definable properties such as recordset, name, and column name. You can return this array from the findServerBehaviors() function.
Arguments serverBehaviorTitle
The serverBehaviorTitle argument is an optional title string that is used if no title is
specified in the EDML title, which is useful for localization.
Dreamweaver expects an array of JavaScript objects where the required properties are defined. Returns an empty array if no instances of the server behavior appear on the page.
The following example searches for all instances of a particular server behavior in the current user document:
function findServerBehaviors() { allMySBs = dwscripts.findSBs(); return allMySBs; }
dwscripts.applySB()
Dreamweaver MX (this function replaces the applySB() function from earlier versions of Dreamweaver).
Inserts or updates runtime code for the server behavior. If the sbObj parameter has a null value, it inserts new runtime code; otherwise, it updates existing runtime code that is indicated by the sbObj object. User settings should be set as properties on a JavaScript object and passed in as paramObj. These settings should match all the parameters that are declared as @@paramName@@ in the EDML insertion text.
Arguments paramObj, sbObj
The paramObj argument is the object that contains the user parameters. The sbObj argument is the prior server behavior object if you are updating an existing server
behavior; null otherwise.
Dreamweaver expects a Boolean value: true if the server behavior is added successfully to the users document; false otherwise.
In the following example, you fill the paramObj object with the users input and call the dwscripts.applySB() function, passing in the input and your server behavior, sbObj:
function applyServerBehaviors(sbObj) { // get all UI values here. paramObj = new Object(); paramObj.rs = rsName.value; paramObj.col = colName.value; paramObj.url = urlPath.value; paramObj.form__tag = formObj; dwscripts.applySB(paramObj, sbObj); }
dwscripts.deleteSB()
Dreamweaver MX (this function replaces the deleteSB() function from earlier versions of Dreamweaver).
Deletes all the participants of the sbObj server behavior instance. The entire participant is deleted, unless the EDML file indicates special delete instructions with the delete tag. It does not delete participants that belong to more than one server behavior instance (reference count > 1).
Regular Expression \ Description Escapes special characters. For example: \. reverts the metacharacter back to a literal period; \/ reverts the forward slash to its literal meaning; and, \) reverts the parens to its literal meaning. Ignore case when searching for the metasequence
Regular Expression (.) \s*
Description Creates a parenthetical subexpression within the metasequence Searches for white spaces
The EDML tag <searchPatterns whereToSearch="directive"> declares that runtime code needs to be searched. Each <searchPattern>.</searchPattern> subtag defines one pattern in the runtime code that must be identified. For the Redirect If Empty example, there are two patterns. In the following example, to extract parameter values from <% if (@@rs@@.EOF) Response.Redirect("@@new__url@@"); %>,write a regular expression that identifies any string rs and new__url:
<searchPattern paramNames="rs,new__url"> /if d ((\w+)\.EOF\) Response\.Redirect\("([^\r\n]*)"\)/i </searchPattern>
This process searches the users document, and if there is a match, extracts the parameter values. The first parenthetical subexpression (\w+) extracts the value for rs. The second subexpression ([^\r\n]*) extracts the value for new_url.
Note: The character sequence "[^\r\n]*" matches any character that is not a linefeed, for the Macintosh and Windows.
Notes about EDML structure You should use a unique filename to identify your server behavior group. If only one group file uses an associated participant file, match the participant filename with the group name. Using this convention, the server behavior group file updateRecord.edml works with the participant file updateRecord_init.edml. When participant files might be shared among server behavior groups, assign unique descriptive names.
Note: The EDML name space is shared, regardless of folder structure, make sure you use unique filenames. Filenames should not exceed 31 characters (including the.edml extension), due to Macintosh limitations.
The runtime code for your server behavior resides inside the EDML files. The EDML parser should not confuse any of your runtime code with EDML markup, so the CDATA tag must wrap around your runtime code. The CDATA tag represents character data and is any text that is not EDML markup. When you use the CDATA tag, the EDML parser wont try to interpret it as markup, but instead, considers it as a block of plain text. The CDATA-marked blocks begin with <![CDATA[ and end with ]]>. If you insert the text Hello, World, it is simple to specify your EDML, as shown in the following example:
<insertText>Hello, World</insertText>
However, if you insert content that has tags in it, such as <img src='foo.gif'>, it can confuse the EDML parser. In that case, embed it in the CDATA construct, as shown in the following example:
This server behavior no longer works correctly because only one parameter is named total. To solve this problem, make sure that there is a parameter with a unique value and can be used to match the participants. In the following example, you could make the total variable name unique using the column name:
<% itemPrice_total Value * 1.0825 %> <% salePrice_total Value * 1.0825 %> <html> <body> The total (with Sale price (with </body> </html> = Recordset1.Fields.Item("itemPrice"). = Recordset1.Fields.Item("salePrice").
taxes) is $<%=itemPrice_total%> taxes) is $<%=salePrice_total%>
The search patterns now uniquely identify and match the participants.
Search pattern resolution
searchPatterns
Dreamweaver supports the following actions by using the participant functionality:
File transfer dependency Updating the file paths for any file reference (such as those for include files)
When Dreamweaver creates server models, it builds lists of patterns by scanning all the participants for special paramNames attributes. To find URLs to check file dependency and to fix the pathname, Dreamweaver uses each searchPattern tag in which one of the paramNames attribute ends with _url. Multiple URLs can be specified in a single searchPattern tag. For each translator searchPattern tag that has a paramNames attribute value that ends with _includeUrl, Dreamweaver uses that searchPattern tag to translate include file statements on the page. Dreamweaver uses a different suffix string to identify include file URLs because not all URL references are translated. Also, only a single URL can be translated as an include file. In resolving a searchPatterns tag, Dreamweaver uses the following algorithm:
1 Look for the whereToSearch attribute within the searchPatterns tag. 2 If the attribute value starts with tag+, the remaining string is assumed to be the tag name (no
spaces are allowed in the tag name). 3 Look for the limitSearch attribute within the searchPattern tag. 4 If the attribute value starts with attribute+, the remaining string is assumed to be the attribute name (no spaces are allowed in the attribute name). If these four steps are successful, Dreamweaver assumes a tag/attribute combination. Otherwise, Dreamweaver starts looking for searchPattern tags with a paramName attribute that has a _url suffix and a regular expression that is defined. (For information about regular expressions, see the Regular expressions on page 260.) The following example of a searchPatterns tag has no search pattern because it combines a tag (cfinclude) with an attribute (template) to isolate the URL for dependency file checking, path fixing, and so forth:
replCode = replCode + imgTag; replCode = replCode + end; return replCode; } /****************************************************************** * The getImage() function determines which image to display * * based on the day of the week, the time of day and the * * user's platform. The day and time are figured based on UTC * * time (Greenwich Mean Time) minus 8 hours, which gives * * Pacific Standard Time (PST). No allowance is made for Daylight * * Savings Time in this routine. * ******************************************************************/ function getImage(){ var today = new Date(); // Today's date & time. var day = today.getUTCDay(); // Day of the week in the GMT time zone. // 0=Sunday, 1=Monday, and so on. var hour = today.getUTCHours(); // The current hour in GMT, based on the // 24-hour clock. var SFhour = hour - 8; // The time in San Francisco, based on the // 24-hour clock. var platform = navigator.platform; // User's platform. All Windows machines // are identified by Dreamweaver as "Win32", // all Macs as "MacPPC". var imageRef; // The image reference to be returned. // If SFhour is negative, you have two adjustments to make. // First, subtract one from the day count because it is already the wee // hours of the next day in GMT. Second, add SFhour to 24 to // give a valid hour in the 24-hour clock. if (SFhour < 0){ day = day - 1; // The day count back one would make it negative, and it's Saturday, // so set the count to 6. if (day < 0){ day = 6; } SFhour = SFhour + 24; } // Now determine which photo to show based on whether it's a workday or a // weekend; what time it is; and, if it's a time and day when Kent is // working, what platform the user is on. //If it's not Sunday if (day != 0){ //And it's between 10am and noon, inclusive if (SFhour >= 10 && SFhour <= 12){ imageRef = "images/kent_tiredAndIrritated.jpg"; //Or else it's between 1pm and 3pm, inclusive }else if (SFhour >= 13 && SFhour <= 15){ imageRef = "images/kent_hungry.jpg"; //Or else it's between 4pm and 5pm, inclusive }else if (SFhour >= 16 && SFhour <= 17){ //If user is on Mac, show Kent working on Mac if (platform == "MacPPC"){ imageRef = "images/kent_gettingStartedOnMac.jpg"; //If user is on Win, show Kent working on Win }else{ imageRef = "images/kent_gettingStartedOnWin.jpg"; }
Returns JSObject is an array that contains the list of files or folders in either the user Configuration folder or the Dreamweaver Configuration folder, subject to filtering by the mm_deleted_files.xml file. Examples JSObject *jsobj_array; jsobj_array = MM_GetConfigFolderList("file:/// c|/Program Files/Macromedia/Dreamweaver/Configuration", "directories" );
JSBool MM_ConfigFileExists()
This function checks whether the specified file exists. If it is a file in a configuration folder, the function searches for the file in the user Configuration folder or the Dreamweaver Configuration folder. The function also checks whether the filename is listed in the mm_deleted_files.xml file. If the name is listed in this file, the function returns a false value.
Arguments char *fileUrl
*fileUrl argument is a pointer to a string that names the desired file, which is provided in the format of a file:// URL.
Example char *dwConfig = file:///c|/Program Files/Macromedia/Dreamweaver/ Configuration/Extensions.txt; int fileno = 0; if(MM_ConfigFileExists(dwConfig)) { fileno = MM_OpenConfigFile(dwConfig, read); }
int MM_OpenConfigFile()
This function opens the file and returns an operating system file handle. You can use the operating system file handle in calls to system file functions. You must close the file handle with a call to the system _close function. If the file is a configuration file, it finds the file in either the user Configuration folder or the Dreamweaver Configuration folder. If you open the Configuration file for writing, the function creates the file in the user Configuration folder, even if it exists in the Dreamweaver Configuration folder.
Note: If you want to read the file before writing to it, open the file in "read" mode. When you want to write to the file, close the read handle and open the file again in "write" or "append" mode. Arguments char *fileURL, char *mode
The char
*fileURL argument is a pointer to a string that names the file that you are opening, which is provided as a file:// URL. If it specifies a path in the Dreamweaver Configuration folder, the MM_OpenConfigFile() function resolves the path before opening the file. The char *mode argument points to a string that specifies how you want to open the file. You can specify null, "read", "write", or "append" mode. If you specify "write" and the file does not exist, the MM_OpenconfigFile() function creates it. If you specify "write", the MM_OpenConfigFile() function opens the file with an exclusive share. If you specify "read", the MM_OpenConfigFile() function opens the file with a nonexclusive share. If you open the file in "write" mode, any existing data in the file is truncated before writing new data. If you open the file in "append" mode, any data you write is appended to the end of the file.
The Scripts folder The Scripts subfolder contains the following utility functions:
CFCutilities.js Contains utility functions related to ColdFusion components. Functions parse attributes from within the opening tag of a given node, parse a CFC tree, get the current URL DOM, get the CFC DOM, and more. Contains functions to register events, notify parties of events from the menus.xml file, and add event notifiers to the menus.xml file. Contains functions that update a color picker, check for hex color, check for an absolute link, add an extension to a filename, generate error messages, set Flash attributes, check a link for Flash object, and so on. Contains functions to insert Fireworks HTML code into Dreamweaver documents. Functions check whether current document is a Fireworks document, insert Fireworks HTML at insertion point, update Macromedia Fireworks style block to Dreamweaver, and more. Also contains related utility functions. Contains functions for use with the Jump Menu object and Jump Menu behavior. Functions populate menu options, create an option label, add an option, delete an option, and so on. Contains an array of keyboard key codes. Contains classes and functions for working with a navigation bar and navigation bar elements. Includes functions to add, remove, and manipulate navigation bar elements. Contains functions related to navigation bar image behaviors. Defines various language codes. Contains functions for adding and deleting preload-image calls to the BODY/onLoad MM_preloadImages handler. Contains the static class and functions to display the recordset server behaviors UI. Functions determine which interface, simple or advanced, to display. Also, houses functionality shared between the UI implementations and mediates switches between the UIs. Contains shared functions for use within Macromedia server behaviors. The dwscripts class in the Configuration/Shared/ Common/Scripts folder contains more general purpose utilities. Contains functions to escape an expression string, unescape an expression string, and extract an expression string. Contains functions to initialize and sort a table as well as functions to sort an array, set the mouse pointer to a hand icon or pointer, and check the type and version of the browser.
event.js
FlashObjects.js
insertFireworksHTML.js
jumpMenuUI.js
keyCodes.js navBar.js
NBInit.js pageEncodings.js preload.js RecordsetDialogClass.js
Biography DaniloCelic
SoftwareEngineer, WebAssist.com
ExtendingDreamweaver
DaniloCelic
ExtensiondeveloperforWebAssist.com. TeamMacromediaforDreamweaver. TechnicalEditorforanumberof Dreamweaver,StudioandContributebooks, MXthroughMX2004releases.Contributing authorforDreamweaverMX2004Magic. AuthoratCommunityMX.com
Ideas in motion.
Overview Extensiontypes Wheretomakeyourchanges Documentation,supportforums,books Skillsyouneed Commonextensiontypeswithexamples Packagingitallupfordistribution
CommonExtensionTypes
Commands Objects Behaviors ServerBehaviors Translators Floaters
OtherExtensionTypes
Propertyinspectors Toolbars Menus DataSources Components Reports TagLibraries ServerFormats ServerModels C++DLLsand
SomeAdditionalExtensibilityAreas
Snippets PageDesigns DocumentTypes ThirdPartyTags CodeHints CodeColoring ReferenceContent
SharedLibraries
Configurationfilelocations:PC
C:\ProgramFiles\Macromedia\Dreamweaver
Configurationfilelocations:Mac
HD:Applications:MacromediaDreamweaver
8\Configuration
C:\DocumentsandSettings\UserName\Application
8:Configuration
HD:Users:username:Library:Application
Data\Macromedia\Dreamweaver8\Configuration
C:\DocumentsandSettings\AllUsers\Application
Support:Macromedia:Dreamweaver8:Configuration
HD:private:var:root:Application
Configurationfileprecedence
Usersfolder AllUsers/Rootfolder ApplicationInstallfolder
GettingStartedDocumentation
Help>ExtendingDreamweaver Help>DreamweaverAPIReference Help>ManageExtensions>Help>Creatingand
SubmittingExtensions
LiveDocs livedocs.macromedia.com/dreamweaver/8/ DreamweaverMX2004SDK: tinyurl.com/2x2r4(Macromedia.com) MXIFileFormat tinyurl.com/6v3r9(Macromedia.com)
BooksDedicatedtoExtending
BuildingDreamweaver4andDreamweaver
BooksSomeExtendinginfo
DreamweaverMX2004TheCompleteReference RayWestandTomMuck tommuck.com/books.cfm Dreamweaver8Bible JoeLowrey idest.com/dreamweaver/
UltraDev4Extensions
TomMuckandRayWest basicultradev.com/building_extensions DreamweaverMXExtensions LauraGutman tinyurl.com/2l9dm(Amazon.com) BeyondDreamweaver JosephLowrey idest.com/beyond
SeeWhatothersHaveDone
MacromediaExchange(1000+): macromedia.com/exchange WebAssist: WebAssist.com InterAKT:IterAKTOnline.com ProjectSeven:ProjectSeven.com CartWeaverCartweaver.com ExtensionDeveloperlistings: dwfaq.com/resources/extensions felixone.it/extensions/mext.asp
Mine:tinyurl.com/5rel9(CommunityMX.com) PaulBoon:tinyurl.com/4ed3a(CommunityMX.com) TomMuck:flashremoting.com/notablog SteveNelson:steve.secretagents.com ScottFegette:weblogs.macromedia.com/sfegette
SupportForums
DreamweaverExtensionsForum NNTP:
forums.macromedia.com/macromedia.exchange.extensions.dreamweaver
LeverageExistingSkills
HTML JavaScript XML Flash
Webforum
tinyurl.com/dlycn(Macromedia.com)
ExtensibilityForumNNTPonly
macromedia.com/support/dreamweaver/extend/form
ExtensionUIdoctypes
ThingsyoucantdoinanExtension
Extensiondialog: <!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine5.0//dialog">
<ahref=yourURL>LinkText</a> Instead:
<ahref="#"onMouseDown="alert('hi')">linktext</a> <ahref="#"><imgsrc="logo.gif"border="0" onMouseDown="alert('hi')"></a>
<!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine8.0//dialog">
Propertyinspector <!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine6.0//pi">
JavaApplets document.write() getElementByID()
Floatingpanel <!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine5.0//floater">
Objects
Configuration/Objects/
DemoObject
<!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine5.0//dialog"> <html> <head><title>ButtonTag</title> <script> functionobjectTag(){ return"<button>"+ document.forms[0].myLabel.value+"</button>" } </script> </head><body> <formname="myForm"> <inputtype="text"name="myLabel"> </form> </body> </html>
canInsertObject objectTag
Demo:ButtonTag
Commands
Configuration/Commands canAcceptCommand commandButtons
DemoCommand
<!DOCTYPEHTMLSYSTEM"//Macromedia//DWExtension layoutengine5.0//dialog"> <html> <head> <title>CommandTemplate</title> <script> //StartAPIfunctions functioncanAcceptCommand(){ //Determinesifthecommandcanberun return(dw.getDocumentDOM()!=null) } functioncommandButtons(){ //Anarrayofbuttonsandfunctions varokCmd="runCmd()" varcancelCmd="window.close() returnnewArray("OK",okCmd,"Cancel",cancelCmd) } Continued
Demo:RemoveAllMetaTags
DemoCommand(Cont.)
functionrunCmd(){ vardom=dw.getDocumentDOM() varmetas=dom.getElementsByTagName('META') for(vari=0i<metas.lengthi++){ metas[i].outerHTML='' } alert('Numberofmetatagsremoved:'+metas.length) window.close() } </script> </head> <body> <formname="theForm"></form> </body> </html>
ServerBehaviors
ServerBehaviorBuilder
ShowifUserinRole EmailForm
ShowIfUserInRole(startingcode)
<cfsetAccessLevels=userRolesHere"> <cfifListContains(AccessLevels, Session.MM_UserAuthorization)> </cfif>
Emailform(startingcode)
<cfifNOTStructIsEmpty(form)> <cfsetnewLocation=newPage.cfm"> <cfsetmail_body=""> <cfsetcr=Chr(13)&Chr(10)> <cfloopindex="form_element"list="#form.fieldnames#"> <cfifform[form_element]NEQ""> <cfsetmail_body=mail_body&form_element &":"&form[form_element]&cr> </cfif> </cfloop> <cfmailto=queryName.toEmail from="queryName.fromEmail subject="queryName.subject> #mail_body#</cfmail> <cfifnewLocationNEQ""> <cflocationurl="@@newLocation@@"addtoken="false"> </cfif> </cfif>
ShowifuserinRole EmailForm
AdditionalServerBehaviorControls
tinyurl.com/3j9xd(BasicUltraDev.com) tinyurl.com/652cj(Macromedia.com)
AdvancedInterfaces
Tabs Wizards
Packagingitallup
MXIFileFormat tinyurl.com/6v3r9 *Donot*overwritesystemfiles
Flash
SampleMXIfiles Object Behavior Command ServerBehavior
ObjectMXI
<macromediaextension name="Buttontag"version="1.0.0"type="object" requiresrestart="true"> <authorname="DaniloCelicWebAssist.com"/> <products> <productname="Dreamweaver"version="6"primary="true" /> </products> <description> <![CDATA[Thisobejctinsertsa<button>tagwitha userspecifiedlabel.]]> </description> <uiaccess> <![CDATA[ThisobjectisfoundontheCommontabofthe InsertBar,andinsertsa<button>tag.]]> </uiaccess>
<files> <filesource="Objects/Common/ButtonTag.html" destination="$dreamweaver/Configuration/Objects/Common "winextension="htm"/> <filesource="Objects/Common/ButtonTag.gif" destination="$dreamweaver/Configuration/Objects/Common "winextension="js"/> </files> <configurationschanges> <insertbarchanges> <insertbariteminsertappendTo="DW_Insertbar_Common"> <buttonfile="Common\ButtonTag.html" id="DW_Insertbar_Common_Button_Tag" image="Common\ButtonTag.gif"/> </insertbariteminsert> </insertbarchanges> </configurationschanges> </macromediaextension>
Packagingitallup(automated)
MXIFileCreator
muzakdeezign.com/mxi_creator/
Questions?
MXIWizard
linecraft.com/products.php
WebAssistDemo
HappyExtending
Tags
FS370 MDA PRO KX-TS560FX Enregistreur Mp3 GR-333 Radio SGH-I900C SPP-2040 DVD737 Hunters Dongle EMP-54 RSP-550 SC-AK410 FSM-30S LM-K7960A RM4400L Theme Park Processor Thinkpad I Windstar-1997 KL8-3H-baa6 P3B-F RCD-W500C KRC-194A K612B Total WAR CM100 37LH50 RE-350 TX-29PS1F RM2200 Citation 16A VP-D76I RP5011 TD-V70120E TNT T100 Webpam Review Ecran 6 0 AVX-7000 DSP110 IC-R72 Audioline 30 Powerbank II KH 6519 SU-X977 USA 900 Cf 120 Pc2001N KV-32FQ86B ZWG-3122 56DC1D FO-P510 Rrus430 FC-100V Nibiru C8-NGT L-558 HK690I RT-21FA35RX HD322HJ TKY DVT721 WF7522SUV Blacksat 1 7 Binatone B430 FDF300 Guesstures P168C SR-T101 Delonghi EMK6 CT 5750 Aficio 5560 WF0702NCE WF8600NHW V5 2 MA6450 TB490BC SEP-C1 HT-Q100W LAV70530-W 29PT9521 TX-29PS1P Soundbridge CE14AT3-C DVR90VG A 200 Printer LN32B360 KDL-26M4000 R Center PC WFH1161F Doro 730R SRS584DP 3042 AF EMP-1815 7 2000 DVD-S795 LN52A750
manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding
Sitemap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101










