Jump to content

Recommended Posts

Hi,

I'm trying to set up dreamweaver cs3 to use the code colouring option on a filetype which isn't normally used in dreamweaver5. it's a .prg type. when you go to

edit -> Preferences -> scroll down to code colouring

You can change the colouring, but you can't add new 'themes' and a .prg file seems to be classed as just text.

 

Does anyone know if there's a way of adding a new colour theme, or linking filetypes with different colour schemes? I'd be quite happy if .prg files shared the same color settings as .php files!

 

Any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/83784-dreamweaver-cs3-code-colouring/
Share on other sites

open up the folder: C: >> Program Files >> Adobe >> Adobe Dreamweaver CS3 >> configuration >> DocumentTypes

In there you'll find a file called MMDocumentTypes.xml. Shut down Dreamweaver first, open the file up, and look for a line similar to this:

 

<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,tpl" macfileextension="php,php3,php4,php5,tpl" file="Default.php" writebyteordermark="false">

 

simply add the extension in question, and restart dreamweaver. If you can't find the above file, just do a search in both your Program Files directory, and your user directory (making sure the search includes hidden files) and you'll find it somewhere.

 

Note - if you're on Vista, I believe you'll have to open up Notepad with admin privs (right click Notepad, click on Run as Administrator) then open the file from there.

 

disclaimer: back up the file first! I won't be responsible if you bugger your installation of DW up :)

hm.. it's not quite working :-\

I changed the line to this:

<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,prg" macfileextension="php,php3,php4,php5,prg" file="Default.php" writebyteordermark="false">

just adding prg into winfileextension and macfileextension.

Now whenever I load dreamweaver it seems to go through each filetype in the file saying:

The Document Type "INSERT TYPE HERE" will not be added because it uses a file extension that is already associated with a Prior Document Type

 

Once it's finished that and it loads the prg file it's not coloured, but going to the code colouring, it shows it as php.

The other problem is on the cde colouring all of the options are duplicated so there's two of each.

 

I tried using the original file again and the same thing happens..

okay, I've fixed the first problem about the error messages.

 

Now the problem I've got is that it only colours the code if I enclose it in

<?php ?>

I'm not wanting to do that.. but I realise now that because I'm using the php colours that it must be that way.

 

Is there a way of creating a new code colour scheme?

  • 2 weeks later...

I'll presume not then.

In the absence of an ability to create a new filetype 'colour scheme' I've just set the prg file to run as a javascript within dreamweaver as the colours are similar and the syntax is somewhat similar, although my own syntax colouring would be preferable!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.