Desde ayer anduve buscando algo que me permitiera poner codigo en mis post y después de una ardua busqueda por fin dà con éste increÃble plugin que aunque ésta versión fué liberada desde el 25 de Febrero, a muchos les vá a facilitar la vida :).
Con él puedes postear codigo ActionScript, ASP, C, C++, C#, CSS, DELPHI, HTML, JAVA, JavaScript, MySQL, PERL, PHP, PYTHON, RUBY, SMARTY, SQL, Visual Basic, VB.NET, XML & CODE.
Para hacerlo funcionar es necesario seguir los siguientes pasos:
Instalación:
Pimero lo obvio, hay que descargar el plugin, lo puedes hacer desde aquÃ: [ descargar ] o ir directamente al sitio de su creador
Luego, hay que descomprimir el archivo iG_Syntax_Hiliter.zip, una vez que descomprimes el archivo .zip te generará una carpeta "iG-Syntax Hiliter"

dentro de la que encontrarás los siguientes archivos:

La Carpeta llamada "ig_syntax hiliter plugin" es la que hay que subir al sitio y colocarla en el directorio "../wp-content/plugins/".
El siguiente paso es entrar a tu panel de administración de WordPress y activar el plugin.
Ahora hay que configurar el plugin.
Configuración:
A continuación tienes que ir a tu panel de administración de WordPress y seleccionando la ceja "Opciones" te aparecerá ya la ceja "IG:Syntax Hiliter".
Y al seleccionar dicha ceja te aparecerán las siguientes opciones:
1.- Show Plain Text Code Option:
Esta opción te sirve para mostrar un botón "PLAIN TEXT" o para no mostrarlo.
2.- Show Plain Text Code In:
En caso de elegir (en la opción No. 1) que si muestre el botón "PLAIN TEXT" tienes la opción de que al presionarlo te muestre texto plano dentro de la misma ventana o en una ventana nueva (popup) como se vé en la siguiente imágen.
3.- Show Language Name:
Esta opción es para que muestre el tipo de lenguaje o no.
4.- Hilite Code in Comments:
Aquà eliges si quieres mostrar codigo o no en los comentarios.
5.- Show Line Numbers:
Esta opción es para mostrar o no el número de lÃnea
6.- Show Fancy Line Numbers:
Aquà eliges si quieres mostrar el número de lÃnea intercalando 2 colores o de uno sólo para todas las lÃneas.
7.- Creo que aquà ya no necesita explicación
8.- Igual que el 7
Bueno, ya casi estamos listos, pero todavÃa falta un paso muy importante.
Para hacernos la vida más fácil, el creador del plugin todavÃa nos tiene reservada una sorpresa más, y es como implementar los QuickTags.
Ok, abre el archivo quicktags.js que se encuentra en el directorio "wp-includes/js/", con cualquier editor de texto.
Ahà encontrarás en la lÃnea # 126 lo siguiente:
-
edButtons[edButtons.length] =
-
new edButton('ed_more'
-
,'more'
-
,'<span id="more-32"></span>'
-
,''
-
,'t'
-
,-1
-
);
En seguida agrega el siguiente código:
-
//----- Start iG:Syntax Hiliter Plugin's Quick Tags -----
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shAS'
-
,'ActionScript'
-
,'[as]'
-
,'[/as]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shASP'
-
,'ASP'
-
,'[asp]'
-
,'[/asp]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shC'
-
,'C'
-
,'[c]'
-
,'[/c]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shCPP'
-
,'C++'
-
,'[cpp]'
-
,'[/cpp]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shCSHARP'
-
,'C#'
-
,'[csharp]'
-
,'[/csharp]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shCSS'
-
,'CSS'
-
,'[css]'
-
,'[/css]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shDELPHI'
-
,'DELPHI'
-
,'[delphi]'
-
,'[/delphi]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shHTML'
-
,'HTML'
-
,'[html]'
-
,'[/html]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shJAVA'
-
,'JAVA'
-
,'[java]'
-
,'[/java]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shJS'
-
,'JavaScript'
-
,'[ js ]'
-
,'[ / js ]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shMySQL'
-
,'MySQL'
-
,'[mysql]'
-
,'[/mysql]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shPERL'
-
,'PERL'
-
,'[perl]'
-
,'[/perl]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shPHP'
-
,'PHP'
-
,'[php]'
-
,'[/php]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shPYTHON'
-
,'PYTHON'
-
,'[python]'
-
,'[/python]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shRuby'
-
,'RUBY'
-
,'[ruby]'
-
,'[/ruby]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shSMARTY'
-
,'SMARTY'
-
,'[smarty]'
-
,'[/smarty]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shSQL'
-
,'SQL'
-
,'[sql]'
-
,'[/sql]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shVB'
-
,'Visual Basic'
-
,'[vb]'
-
,'[/vb]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shVBNET'
-
,'VB.NET'
-
,'[vbnet]'
-
,'[/vbnet]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shXML'
-
,'XML'
-
,'[xml]'
-
,'[/xml]'
-
,''
-
);
-
-
edButtons[edButtons.length] =
-
new edButton('ed_shCode'
-
,'CODE'
-
,'[code]'
-
,'[/code]'
-
,''
-
);
-
//----- End iG:Syntax Hiliter Plugin's Quick Tags -----
Guarda el archivo y súbelo al sitio de nuevo.
Ahora ya tienes 21 nuevos botones en tu editor con éstos nombres:
ActionScript, ASP, C, C++, C#, CSS, DELPHI, HTML, JAVA, JavaScript, MySQL, PERL, PHP, PYTHON, RUBY, SMARTY, SQL, Visual Basic, VB.NET, XML & CODE que te generarán sus respectivas etiquetas.
En mi caso sólo puse 9.

Nota: En el archivo .zip viene incluido éste mismo manual en inglés, espero que le sirva a alguien.
Ahora si a disfrutar de éste útil plugin.
Y bueno, aquà una muestra de lo que hace:
PHP
-
<?php
-
-
// ** MySQL settings ** //
-
-
-
// Change the prefix if you want to have multiple blogs in a single database.
-
$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'
-
-
// Change this to localize WordPress. A corresponding MO file for the
-
// chosen language must be installed to wp-includes/languages.
-
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
-
// to enable German language support.
-
-
/* Stop editing */
-
-
require_once(ABSPATH.'wp-settings.php');
-
?>
CSS
-
/*
-
Theme Name: Abstrakt
-
Theme URI: http://www.kaushaheth.com/
-
Description: Modified WheatGrass Theme featuring Top Level Menu and Side Level Menu
-
Version: 1.0
-
Author: Kaushal Sheth
-
Author URI: http://www.kaushalsheth.com/
-
The CSS, XHTML and design is released under GPL:
-
http://www.opensource.org/licenses/gpl-license.php
-
Tweak this CSS howsoever you will.
-
*** REGARDING IMAGES ***
-
All CSS that involves the use of images, can be found in the 'index.php' file.
-
This is to ease installation inside subdirectories of a server.
-
CSS SECTIONS IN ORDER (use your program's bookmarking or find functions to quickly locate):
-
Sidebar, Posts, Headings, Images, Forms, Comments, Content Area, Footer
-
*/
-
-
/* Sidebar */
-
-
#sidebar h2 {
-
font-family: Georgia, Serif;
-
font-size: 1.2em;
-
margin: 15px 0 10px 0;
-
padding: 0;
-
}
-
-
#sidebar {
-
padding: 20px 0 10px 0;
-
margin-left: 545px;
-
width: 190px;
-
font: 1.2em Verdana, Arial, Sans-Serif;
-
color: #000;
-
}
-
-
.page_item {
-
font-weight: bold;
-
font-size: 140%;
-
}
-
-
.page_item a:hover {
-
text-decoration: none;
-
}
-
-
.page item current_page_item {
-
color: #000;
-
}
Javascript
-
<script type="text/javascript">
-
<div id="flashcontent">Aquà puedes colocar la cosa alternativa que saldrá si no hay Flash Player</div>
-
</script><script type="text/javascript">
-
var pelicula = new FlashObject("pelicula.swf", "pelicula", "200", "100", "7", "#336699");
-
fo.write("flashcontent");
-
</script>
Actionscript
-
/* Esta es una variable que nos permitirá saber si ya iniciamos el código del loop
-
infinito para impedir repetición de loops */
-
if (noRepeat == undefined) {
-
//Aqui la declaramos para que no vuelva a ser "undefined" y este código se ejecute
-
//una vez aunque la lÃnea de tiempo vuelva a este KeyFrame
-
var noRepeat:Number;
-
noRepeat = 1;
-
//Creamos una nueva variable de tipo sonido
-
var sonido:Sound = new Sound();
-
//Le adjuntamos el sonido que declaramos en la librerÃa como "sonidillo"
-
sonido.attachSound("sonidillo");
-
//Le decimos, que si el sonido ya se termino de ejecutar
-
sonido.onSoundComplete = function() {
-
//Vuelva a arrancarlo
-
this.start();
-
};
-
//Iniciamos el sonido
-
sonido.start();
-
}
tarot






























