For example, let's say I want both PHP and HTML in a single block.

<div id="controls"></div>
<div id="loading"></div>
<div id="slideshow"></div>
<div id="gallery">
  <ul class="thumbs noscript">
    <?php
    //enumerate all the file names
    $arrFiles = scandir('galleries/' . $arrGal[path] . '/small');
    foreach($arrFiles as $file){
      if($file != '.' and $file != '..'){
        if(strtolower(substr($file,-3)) == 'jpg'){
          echo '<li>
            <a class="thumb" href="galleries/' . $arrGal[path] . '/small/' . $file . '">
              <img src="galleries/' . $arrGal[path] . '/thumb/' . $file . '">
            </a>
          </li>';
        }
      }
    }
    ?>
  </ul>
</div>

How can I get Geshi to highlight both the html and php correctly in a block of code like this?

CommentFileSizeAuthor
#3 2010-06-26_073242.png16.83 KBxandeadx

Comments

capt.n.coke’s picture

Title: How can I use more tahn one language in a single block of code? » How can I use more than one language in a single block of code?
soxofaan’s picture

Status: Active » Closed (won't fix)

That's currently not possible
and adding support for this is out of the scope of the GeSHi filter module (which is in essence just a wrapper around the GeSHi library).

I would recommend to raise your problem in the bug tracker of the GeSHi library

xandeadx’s picture

StatusFileSize
new16.83 KB

Demo on http://geshi.org/ allows two language on one block, maybe can realize on drupal module?

soxofaan’s picture

Status: Closed (won't fix) » Postponed

That demo is with GeSHi 1.2, if I understand correctly.

At the moment the GeSHi filter drupal module only supports 1.0.x versions of the GeSHi library, which is the stable branch.
I don't have the resources to provide support for the experimental branch 1.1.x of the GeSHi library, let alone 1.2, which is even more experimental I guess.

Once GeSHi 1.2 becomes the stable branch of GeSHi libary, we can consider adding support for it, but I guess this will be something for the Drupal 7 time frame.

soxofaan’s picture

Title: How can I use more than one language in a single block of code? » How can I use more than one language in a single block of code: support GeSHi 1.2

(updating title)

boombatower’s picture

Title: How can I use more than one language in a single block of code: support GeSHi 1.2 » Support GeSHi 1.2
Category: support » feature
boombatower’s picture

Version: 6.x-1.2 » 7.x-1.x-dev
yukare’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)

All this time and there is not a stable 1.2 of geshi, i will close this and open a new issue when we need it.