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









April 27th, 2011 4:58 am
My apologies, it wasn’t the new WordPress, I had updated some new plugins at the same time I had upgraded my WordPress, one of them broke it.
Thanks for the help.
April 27th, 2011 12:34 pm
Welcome
April 27th, 2011 1:18 pm
[...] WP-SynHighlight WP Plugin [...]
May 17th, 2011 8:14 am
[...] WP-SynHighlight WP Plugin [...]
July 16th, 2011 7:54 pm
[...] be changed to your liking in the WPadmin section of your blog.FV Code Highlighter5. WP-SynHighlightWP-SynHighlight is a WordPress plugin that allows easy syntax highlighting of source code you post in your blog. It [...]
August 7th, 2011 11:31 pm
[...] فریم ها و … زیادی را تولید کنید .مشاهده نمونه کار : WP-SynHighlight۵افزونه SyHiمشاهده نمونه : SyHi۶افزونه WP-CodeBoxنمونه : [...]
August 26th, 2011 11:28 pm
hi, first, i have to say what a good work!!! this plugin is very cool and much better than others… now i´d like to tell you a problem with it, in my blog i use diferent kind of scripts to show in post and my first problem with this plugin is the colors… for example, with applescript source code there are characters showed in white color (there are other colors but they aren´t any problem with them) and it´s difficult see them well with the background by default. How can i change the background color with an easy way… I´d like to put it in black but i´ll hace the same problem with black characters so i think the best solution will be grey (grease) colour like your samples background color but more dark (the needed to see well the white chars and the black ones)
This is my problem with the colors… http://cl.ly/2G312E3x2R2K2M1q102U
Sorry for my poorly english, i´m spanish
and thanks!!
August 27th, 2011 3:36 pm
Well, you have to modify CSS to match colors on your website.
August 28th, 2011 5:02 pm
[...] 3. WP-SynHighlight [...]
September 22nd, 2011 6:43 pm
[...] WP-SynHighlight WP Plugin [...]
October 21st, 2011 10:04 pm
[...] হয়েছে: 2১. SyntaxHighlighter EvolvedDownload২. File Inliner PluginDownload৩. WP-SynHighlightDownload৪. FV Code HighlighterDownload৫. Google Syntax HighlighterDownload৬. [...]
October 26th, 2011 10:10 am
[...] 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. WP-SynHighlight [...]