Posted 30 April 2004 - 06:40 PM
Has anyone encountered this or know how I might get Dreamweaver to recognize the PHP without having to change the file extentions to .php?
Posted 27 May 2004 - 09:41 AM
to seperate it from the HTML and Dreamweaver will colour both syntax correctly.
Sounds like the php application is using HTML templates and should be so easy to manage in Dreamweaver. A lot of developers like to keep HTML seperate from the server side code for ease of management. Im afraid if your stuggling with editing a site set out in this way, then you took on a project that is too deep for you.
Posted 27 May 2004 - 03:08 PM
I understand the concept of syntax coloring as well as how to use php tags within html. That is not what I'm asking. The files are SAVED with a .html extension, therefore not applying the syntax coloring at all. Simply resaving the files with a .php file extension is not an option as the site was intentionally designed this way.
I'm not struggling nor is the project too deep for me. Perhaps you should read postings more clearly before replying.
Posted 28 May 2004 - 07:40 AM
Dreamweaver will only colour both syntax in the same document if it has a .php extension. HTML pages are only intended as static documents or templates, so why would dreamweaver need to colour a server sode code which didnt ought to be there. If the document is specified as server side ie .php extension then it is written to understand there may be server side code and will colour accordigly.
Press F1 at any time and read the manaul. It has the answers. Follow the tutorials and learn from them. Surely it must be a more lengthy exercise to log on, log in, post a topic, and await replies.
Posted 03 June 2004 - 02:43 PM
on Windows XP
[Users]\[Applications...don't know in english]\Macormedia\Dreamweaver MX\Configuration\CodeColoring
edit file CodeColoring.xml (after making a copy of the original;))
<scheme name = "PHP-Script" id="PHP_Script" priority="20">
Posted 24 July 2004 - 04:16 AM
Posted 17 August 2004 - 03:22 AM
You are correct in wanting Dreamweaver to to do more than it does out of the box.. In fact, the manuals for Dreamweaver rage on about how it is highly configurable... That's just all they tell you...
Who cares why you want to do it.. The answer is YES, it can do color coding in any way you want.. Why just blindly stick to the defaults setup by others?? WHat a bland way to look at things - it usually just gives people a useless hostile attitude
The problem is that ever since Macromedia bought Alair (originators of Cold Fusion), the documentation for Dreamweaver(now a Dreamweaver/ColdFusionStudio Hybrid), the documentation on configuration has gone down hill..
Here is a quick overview of the parts of the COdeColoring file and what you would change - and why..
In the CodeColoring.xml file under your user prefs/app data/Macromedia.../config...etc
<scheme name="PHP Script" (around line 1250 or so..)
This is where it is all defined.. Now look for lines like this:
<blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[<?\n]]></blockStart>
There are about 5 of them.. In this example, the <?\n says that php starts with a tag like this <? [newline]
You and even add more like <blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[<this is fun and you wont find it under F1>]]></blockStart>
with an ending tag like:
<blockEnd ><![CDATA[</this is fun and you wont find it under F1>]]></blockEnd>
<this is fun and you wont find it under F1>PHP CODE ALL YOU WANT AND SEE IT COLOR CODED IN .HTML FILES</this is fun and you wont find it under F1>
Each <BlockStart defines the opening tags for PHP blocks..
The Problem is that the doctype directive states that Dreamweaver is only allowed to color-code php blocks within php pages... doctypes="PHP_MySQL" hmmmm...
Soo for each <blockStart, change the doctypes directive from
I just copied the entire list from the html scheme at the top of the colorCoding.xml file:
To change the colors:
edit->preferences->Color COding->PHP (this will just change the colors in .php-ish named files, not html files..
If editing in Dreamweaver, dreamweaver may hiccup on this huge file.. you may need to save a copy as txt and edit then rename as xml
I have posted my file at:
Oh yeah.. I use: http://www.vim.org - even when I get stuck using a Windows machine..
Posted 18 October 2004 - 07:07 PM
Syntax coloring tweaks have been really helpful; thanks for the tip guys!
Posted 18 October 2004 - 10:11 PM
Posted 05 November 2004 - 07:25 PM
So where did you find this Application Data directory? I did a search of my C drive and only found two CodeColoring.xml files. Both under C:\Program Files\Macromedia\Dreamweaver MX 2004\
I fought with this forever because I kept editing the "C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\CodeColoring\CodeColoring.xml" file instead of the one in my Application Data directory...
I changed both files as "davidennis99" instructed and no luck. With the exception of:
"To change the colors:
edit->preferences->Color COding->PHP (this will just change the colors in .php-ish named files, not html files.."
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users