Dec 29 2008
WP-SynHighlight
What is it?
WP-SynHighlight is a WordPress plugin that allows easy syntax highlighting of source code you post in your blog. It works much like any other BBCode tag. It highlights everything you put between codesyntax BB code tags
You can download plugin and read a comprehensive description of all additional features provided by it at it’s official page at Plugins @ WordPress.org page. Below you will find a set of examples for various programming languages:
Java language example:
import java.util.*;
public class Sample {
public static void main(String[] args) {
// Создание объекта по шаблону.
List<String> strings = new LinkedList<String>();
strings.add("Hello");
strings.add("world");
strings.add("!");
for (String s : strings) {
System.out.print(s);
System.out.print(" ");
}
}
}PHP language example:
<?php
function parse_code () {
// Start the timer
$start_time = microtime();
// Firstly, if there is an error, we won't highlight
if ($this->error) {
//Escape the source for output
$result = $this->hsc($this->source);
//This fix is related to SF#1923020, but has to be applied regardless of
//actually highlighting symbols.
$result = str_replace(array('<SEMI>', '<PIPE>'), array(';', '|'), $result);
// Timing is irrelevant
$this->set_time($start_time, $start_time);
$this->finalise($result);
return $result;
}C++ Language example:
#include <iostream> // для использования std::cout
#include <vector> // для std::vector<>
#include <map> // для std::map<> и std::pair<>
#include <algorithm> // для std::for_each()
#include <string> // для std::string
using namespace std; // используем пространство имён "std"
void display_item_count(pair< string const, vector<string> > const& person) {
// person - это пара двух объектов: person.first - это его имя,
// person.second - это список его предметов (вектор строк)
cout << person.first << " is carrying " << person.second.size() << " items" << endl;
}
int main()
{
// объявляем карту со строковыми ключами и данными в виде векторов строк
map< string, vector<string> > items;
// Добавим в эту карту пару человек и дадим им несколько предметов
items["Anya"].push_back("scarf");
items["Dimitri"].push_back("tickets");
items["Anya"].push_back("puppy");
// Переберём все объекты в контейнере
for_each(items.begin(), items.end(), display_item_count);Some screenshots:
- GUI Mode Editor Button
- Editor Button Format Settings
- Realtime Syntax Highlighting Editor
- GUI Result









January 20th, 2009 8:49 am
Отличнейший плагин. С виду простой, а результат поражает. Еще бы прикрутить подсветку кода в комментариях.
мой небольшой обзор http://dobrih.net/2009/01/podsvetka-programmnogo-koda-v-wordpress/
February 19th, 2009 2:05 pm
[...] WP-SynHighlight WP Plugin [...]
February 20th, 2009 11:11 am
[...] WP-SynHighlight WP Plugin [...]
February 22nd, 2009 6:37 pm
[...] I picked up the WP-SynHighlight extension for WordPress. Which gives some rather cool code-highlighting through [...]
May 25th, 2009 4:00 pm
[...] WP-SynHighlight WP Plugin [...]
December 21st, 2009 11:30 am
[...] WP-SynHighlight – при частой работе с редактором тем, необходимо установить подсветку кода wordpress редактора, так как удобнее ориентироваться в коде. Подсветка кода wordpress в данном плагине реализована просто и хорошо смотриться, поэтому рекомендую. [...]
January 6th, 2010 2:06 pm
[...] my WP-SynHighlight WordPress plugin, I came to a need of parsing multilined shortcode like this: Code block <many [...]
January 6th, 2010 3:19 pm
[...] improving my WordPress plugin WP-SynHighlight, I chose EditArea as a source code editor with realtime syntax highlighting. The syntax of language [...]
January 6th, 2010 6:42 pm
[...] für WordPress 6. Januar 2010 | Autor: KHK Das Plugin WP-SynHighlight für WordPress von Vladislav Rastrusny realisiert Syntax Highlighting in Postings und [...]
January 6th, 2010 6:44 pm
[...] unseren RSS Feed abonnieren.Powered by WP Greet Box WordPress Plugin Das WordPress Plugin WP-SynHighlight ermöglicht Syntax Highlighting in Postings und Kommentaren. Das Plugin verfügt über [...]
January 6th, 2010 10:40 pm
[...] WP-SynHighlight [...]
January 8th, 2010 6:17 am
[...] WP-SynHighlight [...]
January 11th, 2010 2:07 am
[...] Fractalizer.ru mit WP-SynHighlighting, leider englischsprachig [...]
January 12th, 2010 2:07 am
[...] WP-SynHighlight WP Plugin [...]
January 19th, 2010 4:39 am
[...] WP-SynHighlight 文章类插件:WP-SynHighhlight高亮插件 [...]
January 20th, 2010 12:50 pm
[...] gut, wenn man für die Päsentation ein Tool zur Verfügung hat. Das WordPress Plugin WP-SynHighlight von Vladislav Rastrusny realisiert Syntax Highlighting in Postings und Kommentaren des Blogs. Das [...]
January 20th, 2010 10:15 pm
If I don’t want to display the code-block,,,What can I do. ???
Because When the code has only one line…it display the code-block looks too heavery
January 20th, 2010 11:50 pm
You can change theme to whatever you want. Look at plugin folder \theme directory. You can customize it as you wish.
February 10th, 2010 9:19 am
[...] WP-SynHighlight WP Plugin [...]
February 20th, 2010 6:03 pm
[...] WP-SynHighlight 文章类插件:WP-SynHighhlight高亮插件 [...]
March 9th, 2010 5:29 pm
[...] after reading a ton of documentation, and trying to find the proper way to do it I found this great plugin. WP-Synhighlight It is Geshi based, and it has a code editor included which will respect all the [...]
March 18th, 2010 1:26 pm
[...] 7. WP-SynHighlight [...]
April 3rd, 2010 6:05 pm
[...] 5. WP-SynHighlight [...]
April 10th, 2010 5:14 am
[...] تمكنك هذه الاضافة من كتابة الكود داخل مدونتك بطريقة سهلة، ومن خلال هذه الاضافة لن تحتاج إلى التبديل بين المحرر المتطور ومحرر HTML وهى اضافة رائعة، تحتوى على العديد من المميزات لمشاهدة شكل الكود فى التدوينة اذهب الى صفحة الاضافة WP-SynHighlight. [...]
April 11th, 2010 5:59 am
[...] the original post: FractalizeR’s WebSite » WP-SynHighlight Tags: [...]
April 15th, 2010 5:33 pm
[...] WP-SynHighlight 文章类插件:WP-SynHighhlight高亮插件 [...]
April 15th, 2010 5:33 pm
[...] WP-SynHighlight 文章类插件:WP-SynHighhlight高亮插件 [...]
May 5th, 2010 2:15 am
[...] WP-SynHighlight [...]
May 5th, 2010 9:35 am
[...] تمكنك هذه الاضافة من كتابة الكود داخل مدونتك بطريقة سهلة، ومن خلال هذه الاضافة لن تحتاج إلى التبديل بين المحرر المتطور ومحرر HTML وهى اضافة رائعة، تحتوى على العديد من المميزات لمشاهدة شكل الكود فى التدوينة اذهب الى صفحة الاضافة WP-SynHighlight. [...]