PHP code coloring question

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default PHP code coloring question

    Can someone tell me how to add the following code coloring into Dreamweaver?
    Basically if I have a php script, I want to do the following:
    <?php

    $page .= <<<EOD
    <html>
    <head>
    EOD;

    I want the stuff between the <<<EOD and EOD; to be color code as if it was
    straight HTML. Any insights? I looked at the CodeColoring.xml document and
    tried to add in a thing around line 1304 that said:
    <blockStart doctypes="PHP_MySQL"
    scheme="customText"><![CDATA[EOD;]]></blockStart>
    <blockEnd><![CDATA[>>>EOD]]></blockEnd>

    But this did nothing.

    Ideas greatly appreciated.:confused;

    Purple_Tentacle Guest

  2. Similar Questions and Discussions

    1. Code Coloring for SQL files?
      I know this has been discussed before, but I can't believe that Adobe or someone hasnt created a Code Coloring scheme for MSSQL and/or MySQL. Can...
    2. ${} can't be coloring ?
      I want to extend the codecoloring in dreamweaver for syntax highlighting ${...} I use <blockstart /> <blockend /> but $ can't be coloring, who...
    3. code coloring shema in extension
      Hi All, I`m working on extension for Dreamweaver MX, and I would like to add new code color shema and include it in mxp file, for files with TPL...
    4. Coloring book
      Hi All, I would like to create a coloring book using the paintbox behaviors. I created some black outline artwork in Illustrator, that I have...
    5. Code Coloring include files
      I would like to be able to have .inc files code colored as php and to have the php tab associated with .inc files. Is this possible... Thanks,...
  3. #2

    Default Re: PHP code coloring question

    You should be able to get HTML coloring using this approach, but you
    won't get your PHP variables colored as the are now.

    The parent scheme of this block should be the HTML scheme (the scheme of
    the coloring that you want), not the PHP_Script scheme (you've already
    got PHP_script coloring!).

    Based on your sample, it looks like you have your "start" and "end"
    strings reversed, but that could just be a typo.

    Be sure to update the CodeColoring.xml file in your User config folder.
    Updating any file in your Application config folder will not have any
    effect if there is a file by the same name in your User config folder.

    Hope this helps,
    Randy

    > Can someone tell me how to add the following code coloring into Dreamweaver?
    > Basically if I have a php script, I want to do the following:
    > <?php
    >
    > $page .= <<<EOD
    > <html>
    > <head>
    > EOD;
    >
    > I want the stuff between the <<<EOD and EOD; to be color code as if it was
    > straight HTML. Any insights? I looked at the CodeColoring.xml document and
    > tried to add in a thing around line 1304 that said:
    > <blockStart doctypes="PHP_MySQL"
    > scheme="customText"><![CDATA[EOD;]]></blockStart>
    > <blockEnd><![CDATA[>>>EOD]]></blockEnd>
    >
    > But this did nothing.
    Randy Edmunds Guest

  4. #3

    Default Re: PHP code coloring question

    test
    Purple_Tentacle Guest

  5. #4

    Default Re: PHP code coloring question

    Ah, I just made a stupid mistake. For anyone curious the correct method to do
    this is to add the following into the PHP scheme (around line 1300).
    <blockStart doctypes="PHP_MySQL,HTML"
    scheme="customText"><![CDATA[EOD;\n]]></blockStart>
    <blockEnd><![CDATA[ >>>EOD]]></blockEnd>

    Thanks for the help Randy!

    Purple_Tentacle Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139