Joomla! To highlight the source code (1)
Published on| March 31st, 2009 | No Comment.
Categories:Extension |
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> |
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.
Language that supports standard (parameters can be specified here),
Other languages (extended) if you want to, GeSHi allows various languages and to install a whole.
Approach is as follows.
Specifying the language name, /libraries/geshi/geshi php is under the same file name. (. php name gone)
<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.
- GeSHi to download the whole package from the site.
- What you downloaded, once you unpack in your local disk.
- 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
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 (<,>).
You might also like:
Trackback URL
After Admin approves this comment, it will be shown.
Comments
Leave a Reply
