Welcome to Valador Studios! I'll be posting a bunch of new designs, projects, inspirations, and more. You'll also find links to my various Print On Demand partners so you can purchase my fun designs on various merchandise. All the stuff that makes me go, 'Whee!'

What's Your Whee!?

Shop Star Trek

Star Trek Merchandise

Shop Hockey

Officially Licensed NHLPA Merchandise
  • PHP Heredoc Color Coding Fix in Adobe Dreamweaver

    * Dreamweaver CC 2017 Update - This doesn't appear to be working for the CC2017 release of Dreamweaver. They completely rewrote the editor and color-coding has been dramatically altered. Adobe has said they are considering putting color-coding back the way it was or at least updating the new method so it works like the old one. I'll update again if they change anything.

    Even though I rarely use Adobe Dreamweaver's Design Mode, I still rely on it daily for most of my web development coding. There is just something familiar and comfortable in the code coloring, shortcuts, and file management system.

    That being said, one of the most common code constructs I use in my web projects is PHPs Heredoc string delimited convention.

    Here's a link to the Heredoc PHP documentation:

    http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

    It looks something like this:

    <?php
    $strHtml = <<<EOM
    <p>Example of string
    spanning <strong>multiple lines</strong>
    using <em>heredoc</em> syntax.</p>
    EOM;
    ?>

    I personally use EOM as my marker, but others frequently use EOF, END, EOT, etc.

    The problem with using this kind of delimiter in Dreamweaver though, is that it will break the color coding. HTML or Javascript inside the Heredoc tags is not colored correctly and all the PHP after the tags is often messed up.

    There is a relatively easy fix though. We can update the color coding configuration files in Dreamweaver to ignore the Heredoc tags and color code everything inside them as if they weren't there.

    First, you need to locate the PHP.xml file. In my installation of Dreamweaver CC 2015 on Windows 10, it is located here:

    C:>Program Files>Adobe>Adobe Dreamweaver CC 2015>Configuration>CodeColoring>PHP.xml

    Open this in your favorite text editor. You will probably need to be an Administrator to edit this file depending on your system set up.

    There are a series of <blockStart>...</blockEnd> sections at the beginning of the file. The last one is at around line 18.

    After this line:

    <blockEnd><![CDATA[?>]]></blockEnd>

    Add the following:

    <blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[<?php\s]]></blockStart>
    <blockEnd><![CDATA[<<<EOM]]></blockEnd>
    <blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[<?php\n]]></blockStart>
    <blockEnd><![CDATA[<<<EOM]]></blockEnd>
    <blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[EOM;]]></blockStart>
    <blockEnd><![CDATA[?>]]></blockEnd>

    Note you will need to change the three 'EOM' references if you use a different tag in your script. If you use more than one, you will need to add these lines for each variation.

    That's it! Save the file and restart Dreamweaver. Your color coding should now be doing what you expect it to do.

  • Whee! Design

    Online Print On Demand Storefront

    Who They Are

    Whee! Design is actually a brand of Valador Studios. The main focus of the Whee! Design brand is Print On Demand (POD) T-Shirt and merchandise designs. Using CafePress as our POD partner, we have been able to take advantage of their licensing agreements with various television, movie and other properties to produce a large number of designs we otherwise would not be able to.

    Read More