Le site de JL TRYOEN
  • Home
  • News
  • Blog
  • Joomla
    • Install
    • Sites Joomla
    • Aide Joomla
  • Extensions
    • Plugins
    • Modules
    • Templates
    • Composants
  • Attachments
  • Wiki
  • Drupal
  • Wordpress
  • About
    • About
    • Site Map
    • Contact

Geshi

Details
Last Updated: 23 February 2025

La syntaxe

 

<pre xml:lang="javascript" lines="true" > 
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19694431-1']);
_gaq.push(['_trackPageview']);
 
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
 </pre>

 

Attention à bien placer xml:lang juste après la balise pre

Le résultat

  1. var _gaq = _gaq || [];
  2. _gaq.push(['_setAccount', 'UA-19694431-1']);
  3. _gaq.push(['_trackPageview']);
  4.  
  5. (function() {
  6. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  7. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  8. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  9. })();

 

Site github

J'ai fait un "fork" du repo principal non mis à jour depuis 12 ans !!!

 https://github.com/JLTRY/Joomla-GeSHi

 

 

SyntaxHighlighter

Details
Last Updated: 23 February 2025

Fournisseur

http://alexgorbatchev.com/SyntaxHighlighter/

 Le site n'existe plus. Le plugin n'utilise que du javascript, contrairement à la famile geshi qui elle utilise du php.

Le site ne fonctionne pas très bien.

 

La syntaxe

<pre class="brush:php;gutter:false;toolbar:false">    
    public static function getpost() {
        if (version_compare(JVERSION, '4.0', 'ge')){
            return JFactory::getApplication()->input->getArray(array());
        }
        else {
            return call_user_func_array('AttachmentsHelper::get', ['post']);
        }
    }
</pre>

 

 

Le résultat

	
    public static function getpost() {
        if (version_compare(JVERSION, '4.0', 'ge')){
            return JFactory::getApplication()->input->getArray(array());
        }
        else {
            return call_user_func_array('AttachmentsHelper::get', ['post']);
        }
    }

 

Correctif

J'ai eu un souci sous Internet Explorer

can't find a brush

 

J'ai fait un correctif dans syntaxhighlighter:

JFactory::getDocument()->addScriptDeclaration($js); 
//added  
JFactory::getDocument()->addScript( 'plugins/content/syntaxhighlighter/js/shBrushPhp.js' );
JFactory::getDocument()->addScript( 'plugins/content/syntaxhighlighter/js/shBrushCss.js' );

 

 

PRISM SyntaxHighlighter

Details
Last Updated: 11 June 2025

Fournisseur

 https://www.andrehotzler.de/en/projects/prism-prismjs-com-syntaxhighlighter-for-joomla.html

 

Description

Ce plugin est basé sur  https://prismjs.com/ un "syntaxhighlighter" codé en javascript

La syntaxe

<pre class="langage-php" > $variable = "Ceci est un message test !";</pre>

 

Le résultat

$variable = "Ceci est un message test !";
Add new comment

Météo

Joomla Version

Joomla 5.3.1

Recherche



Mes Sites

Mon mediawiki sur l'informatique
Wordpress
La partie de mon site faite avec wordpress
Trycoaching

Last Articles(mediawiki)

Htaccess
Pdf
Formules Excel
Android/Outils

  Version: 1.43.1


Creative Commons attribution non commercial partage ? l'identique © 2011-2025 JL TRYOEN Site
 
About | Map | Contact Joomla 3.0