I figured it out. if you explicitly set the class of the code tag it uses that highlighting
// Code tag
function ch_code_tag(&$codes)
{
global $modSettings, $txt, $settings;
$darkThemeIDS = array(3, 5, 7, 9, 11, 13);
if (in_array($settings['theme_id'], $darkThemeIDS))
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code>
// Code tag
function ch_code_tag(&$codes)
{
global $modSettings, $txt, $settings;
$darkThemeIDS = array(3, 5, 7, 9, 11, 13);
if (in_array($settings['theme_id'], $darkThemeIDS))
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code>$1</code></pre></div></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div></div>"';
}
else
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><pre><code>$1</code></pre></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div>"';
}
if (!empty($modSettings['ch_enable']))
{
foreach ($codes as $tag => $dump)
if ($dump['tag'] == 'code') unset($codes[$tag]);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_a" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML1 . ';
'),
'block_level' => true,
);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_equals_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": " . $data[1] . " <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_b" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML2 . ';
'),
'block_level' => true,
);
}
// Copyright Info
if (isset($context['current_action']) && $context['current_action'] == 'credits')
$context['copyrights']['mods'][] = '<a href="http://dragomano.ru/page/code-highlighting" target="_blank">Code Highlighting</a> © 2010–2012, Bugo';
}
</code></pre></div></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code class=\"" . $data[1] . "\">
// Code tag
function ch_code_tag(&$codes)
{
global $modSettings, $txt, $settings;
$darkThemeIDS = array(3, 5, 7, 9, 11, 13);
if (in_array($settings['theme_id'], $darkThemeIDS))
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code>$1</code></pre></div></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div></div>"';
}
else
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><pre><code>$1</code></pre></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div>"';
}
if (!empty($modSettings['ch_enable']))
{
foreach ($codes as $tag => $dump)
if ($dump['tag'] == 'code') unset($codes[$tag]);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_a" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML1 . ';
'),
'block_level' => true,
);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_equals_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": " . $data[1] . " <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_b" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML2 . ';
'),
'block_level' => true,
);
}
// Copyright Info
if (isset($context['current_action']) && $context['current_action'] == 'credits')
$context['copyrights']['mods'][] = '<a href="http://dragomano.ru/page/code-highlighting" target="_blank">Code Highlighting</a> © 2010–2012, Bugo';
}
</code></pre></div></div>"';
}
else
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><pre><code>
// Code tag
function ch_code_tag(&$codes)
{
global $modSettings, $txt, $settings;
$darkThemeIDS = array(3, 5, 7, 9, 11, 13);
if (in_array($settings['theme_id'], $darkThemeIDS))
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code>$1</code></pre></div></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div></div>"';
}
else
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><pre><code>$1</code></pre></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div>"';
}
if (!empty($modSettings['ch_enable']))
{
foreach ($codes as $tag => $dump)
if ($dump['tag'] == 'code') unset($codes[$tag]);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_a" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML1 . ';
'),
'block_level' => true,
);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_equals_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": " . $data[1] . " <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_b" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML2 . ';
'),
'block_level' => true,
);
}
// Copyright Info
if (isset($context['current_action']) && $context['current_action'] == 'credits')
$context['copyrights']['mods'][] = '<a href="http://dragomano.ru/page/code-highlighting" target="_blank">Code Highlighting</a> © 2010–2012, Bugo';
}
</code></pre></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><pre><code class=\"" . $data[1] . "\">
// Code tag
function ch_code_tag(&$codes)
{
global $modSettings, $txt, $settings;
$darkThemeIDS = array(3, 5, 7, 9, 11, 13);
if (in_array($settings['theme_id'], $darkThemeIDS))
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code>$1</code></pre></div></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><div class=\"dark_theme_code\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div></div>"';
}
else
{
$codeWrapHTML1 = '<div class=\"block_code\" id=\"code_a" . $codecounter . "\"><pre><code>$1</code></pre></div>"';
$codeWrapHTML2 = '<div class=\"block_code\" id=\"code_b" . $codecounter . "\"><pre><code class=\"" . $data[1] . "\">$1</code></pre></div>"';
}
if (!empty($modSettings['ch_enable']))
{
foreach ($codes as $tag => $dump)
if ($dump['tag'] == 'code') unset($codes[$tag]);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_a" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML1 . ';
'),
'block_level' => true,
);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_equals_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": " . $data[1] . " <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_b" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML2 . ';
'),
'block_level' => true,
);
}
// Copyright Info
if (isset($context['current_action']) && $context['current_action'] == 'credits')
$context['copyrights']['mods'][] = '<a href="http://dragomano.ru/page/code-highlighting" target="_blank">Code Highlighting</a> © 2010–2012, Bugo';
}
</code></pre></div>"';
}
if (!empty($modSettings['ch_enable']))
{
foreach ($codes as $tag => $dump)
if ($dump['tag'] == 'code') unset($codes[$tag]);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_a" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML1 . ';
'),
'block_level' => true,
);
$codes[] = array(
'tag' => 'code',
'type' => 'unparsed_equals_content',
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $txt;
// select all and copy code to clipboard mod
static $codecounter = 0;
$codecounter++;
$tag[\'content\'] = "<div class=\"codeheader\">" . $txt[\'smf238\'] . ": " . $data[1] . " <a href=\"javascript:void(0)\" title=\"" . $txt[\'codeselectall\'] . "\" onclick=\"javascript:selectall(\'code_b" . $codecounter . "\');return false;\">" . $txt[\'codeselectall\'] . "</a></div>' . $codeWrapHTML2 . ';
'),
'block_level' => true,
);
}
// Copyright Info
if (isset($context['current_action']) && $context['current_action'] == 'credits')
$context['copyrights']['mods'][] = '<a href="http://dragomano.ru/page/code-highlighting" target="_blank">Code Highlighting</a> © 2010–2012, Bugo';
}