OFF-SOFT.net

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

Joomla! To highlight the source code (1)

Published on| March 31st, 2009 | No Comment.

Joomla! And HTML source code when writing the article, many well-WEB Do not I look like a coloring page of source code.

Joomla!, By default, it looks like this feature.

In fact, the HTML source code and a description of the highlighted (colored) Let's see.

First, enable the plug-in that supports

Usually, Joomla! 1.5, highlight the code for the plug-in is installed by default.


If you disable this plugin, change into effect.

View the source code to embed in article

After active and try to embed the following code in the article.

Cases)

1
	<pre xml:lang="php">echo 'test'.$param.'-param';</pre>

And embed it appears below.

1
	echo 'test'.$param.'-param';

As the standard, and carefully, "echo" is, php or posted to the link to the online help.

※ here to support the various languages to be described later, GaSHi are the latest updates.

Therefore, the link is no longer posted.

Others, trying to see expansion in different languages
In summary, and specify the information embedded in the language will be colored in that language.

<pre xml:lang="php"> 

In other words, the "php" to see a part of language (eg, XML, CSS, etc.) If you change the webmaster install appears to be colored.

Language that supports standard (parameters can be specified here),

    css, diff, html4stric, ini, javascript, mysql, php, php-brief, sql, xml

.

Other languages (extended) if you want to, GeSHi allows various languages and to install a whole.

Approach is as follows.

  1. GeSHi to download the whole package from the site.

  2. What you downloaded, once you unpack in your local disk.

  3. Unzip the file to upload.

    • Local Disk: geshi/geshi.php ----> upload to:/libraries/geshi/geshi.php to override
    • Local Disk: geshi/geshi/* ----> upload to: /libraries/geshi/geshi/. Overwrite all files and upload to

After the upload you can use immediately.

Specifying the language name, /libraries/geshi/geshi php is under the same file name.

(. php name gone)

Example) C + +

1
2
3
4
5
6
7
	class ctect {
		public:
			ctect();
			virtual ~ctect();
		private:
			int do(int prm);
	}

In view of the above, pre tags to embed the information, HTML If you want to view, pre tags <> are special characters must be rendered distinguished (<,>).



Add to your favorites(bookmarks): はてなdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply








Tag Cloud

Links

Site Description

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

Add to your favorites(bookmarks)

はてなdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing