「syntaxhighlighter」タグアーカイブ

shBrushMxml.js は対応するか

開始行が mxml だとマズイのかな?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="413" height="439" backgroundColor="white">
<!--mx:Style source="jukebox.css" /-->
<mx:Script>
<![CDATA[
  import mx.controls.Alert;
  public var arrBigImg : Array;
  public function init() :void
  {
arrBigImg = [ 'mat/lemon200.jpg',
  'mat/redsun200.jpg'/*,
  '../img/c230.png' */];
  }
  //小さい画像をクリックした場合
  private function clickAction(cnt: int) :void
  {
bigImg.source = arrBigImg[cnt];
  }
]]>
  </mx:Script>

  <mx:Panel width="286" layout="absolute" top="0" left="5" bottom="10" backgroundAlpha="1.0" alpha="1.0" creationComplete="init()">
<mx:Image top="10" left="5" height="256" id="bigImg" source="" showEffect="Rotate" width="256"/>
  </mx:Panel>
  <mx:Image id="sImg1" y="50"  right="15" width="96" height="96" source="@Embed('mat/lemon200.jpg')" click="clickAction(0)" />
  <mx:Image id="sImg2" y="181" right="15" width="96" height="96" source="@Embed('mat/redsun200.jpg')" click="clickAction(1)" />
  <!--mx:Image id="sImg3" y="292" right="0" width="128" height="128" source="@Embed('../img/c133.png')" click="clickAction(2)" /-->
</mx:Application>

syntaxhighlighter.php に追加しただけではダメなのか。

// Register some popular third-party brushes
wp_register_script( 'syntaxhighlighter-brush-mxml',       plugins_url('syntaxhighlighter/third-party-brushes/shBrushMxml.js'),       array('syntaxhighlighter-core'), '20100428'     );
// added for mxml

本家の ver.1.5.1 でないと働かないのかなあ … Another Lint で怒られるので xml に戻す。

syntaxhighlighter css test

CSS は

/* Website Title
---------------*/

div#header p.siteName {
    margin: 25px 60px 10px;
    line-height: 1;
    font-size: 144%;
    font-weight: bold;
    text-indent: -9999px;
    height: 58px;
    width: 285px;
    background: url(images/selatan.png) no-repeat left top;
}

div#header p.siteName a {
    text-decoration: none;
    color: #417698;
    display: block;
    height: 58px;
    width: 285px;
    overflow: hidden;
}

div#header p.siteName a:hover {
    color: #000;
}

div#header p.siteName a:focus {
    outline: none;
}

syntaxhighlighter php test

php はどうだろう。

<?php
$cwd = dirname(__FILE__);
$dir = mb_substr( $cwd, 0, mb_strrpos($cwd, 'wp-content'));

require_once($dir.'wp-config.php');

$config = get_option('vicuna_config');

if (!isset($config['skin'])) {
    $config['skin'] = 'style-vega';
    update_option('vicuna_config', $config);
}
$skin = $config['skin'];
header("Content-Type: text/css");
?>
@charset "utf-8";

@import url(<?php echo $skin; ?>/import.css);