2009�N04��27��

SyntaxHighlighter 2.0

SyntaxHighlighter 2.0
2.0 �ł́ASyntaxHighlighter.all(); ���w�b�h���ɏ��������ŁA
�S�Ă̑Ώە�����ϊ����Ă���܂����A�y�[�W�S�Ă����[�h����Ȃ���
���s����Ȃ��̂Ő������\���ϊ��܂Ń^�C�����O�������܂��B

�ł�����A1.5 �݊������p�� shLegacy.js ���g�p���Ă����āA
�\�[�X�R�[�h�̒���� dp.SyntaxHighlighter.HighlightAll �����s
����Ǝ��ԍ������ϊ�����܂��B( name �������K�v�ł� )

����ł��Aclass ���Ŏw�肷�� �V�����v���p�e�B�ݒ�͉”\�ł��B
�f�t�H���g�ł� url �ϊ����L���ɂȂ��Ă��܂��̂ŁA�����ł��X�g���X����
�\��������ɂ́A�w�b�h���Ŗ����ɂ��Ă����Ƃ����Ǝv���܂��B
/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.0.296 (March 01 2009)
 * 
 * @copyright
 * Copyright (C) 2004-2009 Alex Gorbatchev.
 *
 * @license
 * This file is part of SyntaxHighlighter.
 * 
 * SyntaxHighlighter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * SyntaxHighlighter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/licenses/>.
 */
SyntaxHighlighter.brushes.Plain = function()
{
};

SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain'];


�� �֘A����L��
SyntaxHighlighter 2.0 �̂�����
SyntaxHighlighter��Hosting
SyntaxHighlighter2.0�p �\��t���R�[�h�쐬
posted by night wálker at 01:45| SyntaxHighlighter

2009�N04��29��

SyntaxHighlighter��Hosting

SyntaxHighlighter 2.0
SyntaxHighlighter��2.0�ł́A���C�u������u�������� WEB �X�y�[�X��
�����l�ׂ̈� Hosting ���Ă���Ă��܂��̂ŁA�����܂ł͂܂�
�ȉ��̃R�[�h���w�b�_�������A�L���O�Ńy�[�W�ň�x�����\�������ꏊ��
�L�q����Ƃ����Ǝv���܂��B(����m�F��A����������ւ���Ηǂ��ł�)

�K�v�ȃ��C�u�����͑I������K�v������܂����A�g�p������̂͑S��
�L�q���Ă����܂��B���낢�����Ă݂܂������A���ꂪ�ł��ǂ����@
�ł���Ǝv���Ă��܂��B
<script
	type="text/javascript"
	src="http://alexgorbatchev.com/pub/sh/2.0.296/scripts/shCore.js"
></script>
<script
	type="text/javascript"
	src="http://alexgorbatchev.com/pub/sh/2.0.296/scripts/shLegacy.js"
></script>
<script
	type="text/javascript"
	src="http://alexgorbatchev.com/pub/sh/2.0.296/scripts/shBrushPlain.js"
></script>
<script
	type="text/javascript"
	src="http://alexgorbatchev.com/pub/sh/2.0.296/scripts/shBrushJScript.js"
></script>
<script
	type="text/javascript"
	src="http://alexgorbatchev.com/pub/sh/2.0.296/scripts/shBrushXml.js"
></script>
<link
	type="text/css"
	rel="stylesheet"
	href="http://alexgorbatchev.com/pub/sh/2.0.296/styles/shCore.css"/>
<link
	type="text/css"
	rel="stylesheet"
	href="http://alexgorbatchev.com/pub/sh/2.0.296/styles/shThemeDefault.css"/>
<script
	type="text/javascript">
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.296/scripts/clipboard.swf';
SyntaxHighlighter.config.strings.copyToClipboardConfirmation =
 '\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3000\u3000\u3000';
SyntaxHighlighter.defaults['auto-links'] = false;
</script>
�L�����ł͈ȉ��̂悤�ɋL�q���ĉ�����
(SyntaxHighlighter2.0�p �\��t���R�[�h�쐬 �ō쐬�ł��܂�)
<pre name="code0904292021" class="brush:js">
&lt;SCRIPT type=&quot;text/javascript&quot;&gt;

function test() {
	alert("ok");
}

&lt;/SCRIPT&gt;


&lt;INPUT
	type=&quot;button&quot;
	value=&quot;test&quot;
	onClick='test();'
&gt;
</pre>
<script type="text/javascript">
dp.SyntaxHighlighter.HighlightAll("code0904292021");
</script>
�܂��A���h����ύX�������ꍇ�͈ȉ��̂悤�ȃX�^�C����lj����܂�
<style type="text/css">
.syntaxhighlighter div,.syntaxhighlighter span,.syntaxhighlighter code {
	font-size:12px!important;
	font-family: "�l�r �o�S�V�b�N"!important;
}
.syntaxhighlighter {
	padding:5px!important;
	background-color:#FFFFFF!important; 
	border-style:solid!important;
	border-color:#808080!important;
	border-width:1px!important;
}
</style>


�_�E�����[�h����ї��p���@�������ꂽ�T�C�g(�p��)
�� IE6.0 �Ő������\������܂���B
posted by night wálker at 19:29| SyntaxHighlighter

2009�N05��04��

SyntaxHighlighter2.0�p �\��t���R�[�h�쐬

SyntaxHighlighter 2.0    �� highlight: [n1, n2, n3], �� SyntaxHighlighter.all();
�u���V �@ �@ �m���ɕ����Œ�   TAB��
�n�C���C�g�s a-b �Ǝw��ł��܂�
�� ,�ƕ��p�͂ł��܂���
SyntaxHighlighter.all()���g��   �P�ƋL���œ��삷��悤�ɂ���   �h���C��
�� �u���O���Ŏg�p����ꍇ�́A�u���s��<br/>�^�O�ɕϊ����Ȃ��v�悤�ɂ��Ă��������B
�� ���̏ꍇ�A�ʏ핶�͂� PRE �������Ă��̒��ŋL�q���܂�
�� �m���ɕ����Œ�́A�����ɂ���Ă͌Œ�ł��ȏꍇ������̂ŁA���낢�뒲�����ĉ������B
�� SyntaxHighlighter.all() �ɕύX����ƁA�ǂ��ɏ����Ă��S�Ă��ϊ�����܂�
( �A���A�\���Ƀ^�C�����O��������ꍇ������܂� )
�� �P�ƋL���œ��삷��悤�ɂ���ƁASyntaxHighlighter.all() ���g���܂�
���̃`�F�b�N�{�b�N�X�ŁA�{���w�b�_���ɒ�`����悤�ȓ��e���S�ĕt�����A
�P�Ƃ̋L���ł����삷��悤�ɂ��܂�

�� 1.5 ����̎g����( ����ɏ����̂Ń^�C�����O������܂��� ) ��‚̋L�����ɕ����� SyntaxHighlighter ��ݒu����ꍇ�́A HighlightAll �̌Ăяo���͈�x�œ��삵�܂��B�A�����̏ꍇ�́A �����ݒu���ꂽ pre �� name ��������v�����āA�����HighlightAll �ŌĂяo���悤�ɂ��ĉ������B 1.5����̋L�q���@�ňڍs����ꍇ�̏����� ( IE6 �ł͕\���ł��܂��� ) �� SyntaxHighlighter��Hosting
posted by night wálker at 13:31| SyntaxHighlighter

2009�N06��06��

shLegacy.js��Opera�̃^�u�����f����Ȃ�

SyntaxHighlighter 2.0

dp.SyntaxHighlighter.HighlightAll ���g���āA�����ł�����
�R�[�h�̕ϊ����悤�Ƃ��Ă���ꍇ�AOpera �ł̓^�u�����������悤�ł��B

�����ŁAshLegacy.js ��ύX���āAOpera �̎����� SyntaxHighlighter.all() ��
�g�p����悤�ɂ��܂����B

������Ă΂�鎖�ɂȂ�܂����A���ɖ��͏o�Ă��܂���

����ƁA���̏ꍇ�ł� brush:�^�C�v �Ƃ����V�����������łȂ���
���f����Ȃ��̂Œ��ӂ��ĉ������B
HighlightAll: function(
					name, 
					showGutter /* optional */, 
					showControls /* optional */, 
					collapseAll /* optional */, 
					firstLine /* optional */, 
					showColumns /* optional */
					)
{
	function findValue()
	{
		var a = arguments;
		
		for (var i = 0; i < a.length; i++) 
		{
			if (a[i] === null) 
				continue;
			
			if (typeof(a[i]) == 'string' && a[i] != '') 
				return a[i] + '';
			
			if (typeof(a[i]) == 'object' && a[i].value != '') 
				return a[i].value + '';
		}
		
		return null;
	};

	function findTagsByName(list, name, tagName)
	{
		var tags = document.getElementsByTagName(tagName);
		
		for (var i = 0; i < tags.length; i++) 
			if (tags[i].getAttribute('name') == name) 
				list.push(tags[i]);
	}

	var userAgent = window.navigator.userAgent.toLowerCase();
	var appVersion = window.navigator.appVersion.toLowerCase();

	if (userAgent.indexOf("opera") > -1) {
		SyntaxHighlighter.all();
		return;
	}

	var elements = [],
		highlighter = null,
		registered = {},
		propertyName = 'innerHTML'
		;
	
	// for some reason IE doesn't find <pre/> by name, however it does see them just fine by tag name... 
	findTagsByName(elements, name, 'pre');
	findTagsByName(elements, name, 'textarea');

	if (elements.length === 0)
		return;
	
	for (var i = 0; i < elements.length; i++)
	{
		var element = elements[i],
			params = findValue(
				element.attributes['class'], element.className, 
				element.attributes['language'], element.language
				),
			language = ''
			;
		
		if (params === null) 
			continue;

		params = dp.SyntaxHighlighter.parseParams(
			params,
			showGutter, 
			showControls, 
			collapseAll, 
			firstLine, 
			showColumns
			);

		SyntaxHighlighter.highlight(params, element);
	}
}

posted by night wálker at 19:59| SyntaxHighlighter

�c�[���o�[��viewSource�Œlj��@�\����

SyntaxHighlighter 2.0

SyntaxHighlighter 2.0 �̉����ł��B

�ł��������₷���ꏊ�́AshCore.js �́AviewSource : function(highlighter) �ł��B
���X�w�Nj@�\�������AJavaScript ��m��l�ł���΂��Ȃ��
�g�����ł���悤�ɂȂ��Ă��܂��B�����A�\�[�X���̏���
�����Œm��K�v������̂ŁA�ȉ��̂悤�ɂ��܂�
<pre name="code0001" class="brush: cpp; download: lighbox; ext: lzh">

class �ɂ́A���R�Ƀp�����[�^��lj��ł���d�l�ɂȂ��Ă��܂��̂ŁA
��L�̂悤�ɐݒ肷�邾���ŁAparams �͈ȉ��̂悤�ɂȂ�܂��B
auto-links true
brush "cpp"
class-name ""
collapse "false"
download "lighbox"
ext "lzh"
first-line "1"
font-size undefined
gutter "true"
highlight undefined
light false
ruler "false"
smart-tabs true
tab-size 4
toolbar "true"
params �́AviewSource ���ňȉ��̂悤�ɂ��ĎQ�Ƃł��܂��B

highlighter.params.download
highlighter.params.ext
posted by night wálker at 23:38| SyntaxHighlighter
JavaScript �x�[�V�b�N
SyntaxHighlighter
�N���X�u���E�W���O
���̑�
Highslide JS
�v���̑��Y��ɎB�ꂽ��
�u���O���ʂ�ɂ́AJavaScript ���K���K�v�ł��B
���ɁAGoogle �̑��݂͑傫���AGoogle MAP ���͂��߂Ƃ���
���낢��Ȑ�i�̋Z�p���ȒP�ɗ��p�ł��܂��B
���\�m���Ă��Ȃ����̂�����A���� JavaScript ��׋�����Ύg����悤�ɂȂ���
�����̃u���O�ɂ��낢��ȉԂ�Y���鎖���ł���悤�ɂȂ�Ǝv���܂��B
�� ���̉Ԃ� Highslide JS �ƌ����� Google �Ƃ͊֌W����܂���B



Admin