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. [...]
September 15th, 2010 5:29 pm
[...] ?- WP-SynHighlight [...]
September 20th, 2010 3:10 pm
[...] http://www.fractalizer.ru/freeware-projects/wordpress-plugins/wp-synhighlight/ [...]
September 20th, 2010 3:40 pm
September 22nd, 2010 10:29 am
[...] ?????????http://www.fractalizer.ru/freeware-projects/wordpress-plugins/wp-synhighlight/#codesyntax_1 [...]
September 23rd, 2010 9:42 am
Thank you for your fix. I look forward to using your excellent plugin again.
September 23rd, 2010 11:08 am
I hope I didn’t introduce any new bugs with this fix
If so, you are more than welcome to kick me to fix them
September 28th, 2010 10:51 am
[...] 3. WP-SynHighlight [...]
October 17th, 2010 6:20 pm
[...] WP-SynHighlight [...]
October 21st, 2010 2:55 pm
[...] 7. WP-SynHighlight [...]
December 2nd, 2010 2:48 pm
[...] syntaxe, proto?e u? m? nebav? d?lat tohle v ?l?nc?ch ru?n?. Celkem mi vyhovuje WP-SynHighlighter. Sice neum? takzvan? ‘multihighlighter’ jako t?eba PSPad (nebo j? jsem aspo? [...]
December 17th, 2010 2:37 am
[...] ????? ??? ??????? ?? ????? ????? ???? ?????? ?????? ????? ??? ???? ??? ??????? ?? ????? ??? ??????? ??? ?????? ??????? ????? HTML ??? ????? ?????? ????? ??? ?????? ?? ???????? ??????? ??? ????? ?? ???????? ???? ??? ???? ??????? WP-SynHighlight. [...]
January 6th, 2011 3:31 am
[...] ?????? ????? ??? : WP-SynHighlight [...]
January 6th, 2011 10:50 am
[...] ?????? ????? ??? : WP-SynHighlight [...]
January 10th, 2011 1:27 pm
[...] Plugins für WordPress Geschrieben am 10. Januar 2011 by KHK Das WordPress Plugin WP-SynHighlight von FractalizeR ermöglicht Syntax Highlighting in Postings und Kommentaren. Das Plugin [...]
January 18th, 2011 6:51 am
[...] WP-SynHighlight – при частой работе с редактором тем, необходимо установить подсветку кода wordpress редактора, так как удобнее ориентироваться в коде. Подсветка кода wordpress в данном плагине реализована просто и хорошо смотриться, поэтому рекомендую. [...]
January 18th, 2011 10:57 am
My theme doesnt like it for some reason is there something that I can change or add to fix it.
This is how it looks like in my test post.
Here is the direct link to my screen shoot.
http://img525.imageshack.us/img525/6681/screenshot1tr.jpg
Uploaded with ImageShack.us
April 9th, 2011 7:58 pm
The GUI is broken with the latest wordpress update
April 9th, 2011 8:23 pm
I will check ASAP. What is your WP version?
April 21st, 2011 12:25 am
WP 3.1.1
I’ve uploaded a screenshot of what the problem looks like.
http://www.lastrayofhope.com/wp-content/uploads/2011/04/Screen-shot-2011-04-20-at-21.23.08.png
April 21st, 2011 12:43 am
I’ll have a look, thanks.
April 21st, 2011 9:55 am
@Kaluriel – it works for me. Aren’t you using SSL to access your blog’s admin panel?