Powered by EverLive.net

Geshi Highlighter for Joomla was removed from core plugins after release of the Joomla 3.1 version. It was a necessary plugin for the developers. As a developer myself I needed it extensively to highlight the codes. This plugin will definitely be helpful to all developers who can use this plugin to highlight the codes and it supports all the languages that is supported by Geshi.

To use the plugin you have to enable the plugin from Plugin manager and than you have to also add a code exception for tinymce not to strip the pre tag. If you open the tinymce plugin page you will find

"  You have to add "pre[*]"  to the valid elements list. See the image below:
 
 
 
 
 
 
Plugin Demo
 
CSS Highlighter
 
html, body {
    background-color: #F0F0F0;
    color: ButtonText;
    font-family: Tahoma, Verdana, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}
 
table.adminlist {
    width: 99%;
    border-spacing: 1px;
    background-color: #f3f3f3;
    color: #666;
    font-size: 11px;
}
 
table.adminlist td,
table.adminlist th {
    padding: 4px !important;
    font-size: 11px;
}
 
table.adminlist thead th {
    text-align: center;
    background: #f7f7f7;
    color: #666;
    border-bottom: 1px solid #CCC;
    border-left: 1px solid #fff;
}
 
table.adminlist thead th.left {
    text-align: left;
}
 
table.adminlist thead a:hover {
    text-decoration: none;
}
 
table.adminlist thead th img {
    vertical-align: middle;
    padding-left: 3px;
}
 
PHP Demo with line number
 
  1.  * @package        Joomla.Site
  2.  * @copyright    Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
  3.  * @license        GNU General Public License version 2 or later; see LICENSE.txt
  4.  */
  5.  
  6. // Set flag that this is a parent file.
  7. define('_JEXEC', 1);
  8. define('DS', DIRECTORY_SEPARATOR);
  9.  
  10. if (file_exists(dirname(__FILE__) . '/defines.php')) {
  11.     include_once dirname(__FILE__) . '/defines.php';
  12. }
  13.  
  14. if (!defined('_JDEFINES')) {
  15.     define('JPATH_BASE', dirname(__FILE__));
  16.     require_once JPATH_BASE.'/includes/defines.php';
  17. }
  18.  
  19. require_once JPATH_BASE.'/includes/framework.php';
  20.  
  21. // Mark afterLoad in the profiler.
  22. JDEBUG ? $_PROFILER->mark('afterLoad') : null;
  23.  
  24. // Instantiate the application.
  25. $app = JFactory::getApplication('site');
  26.  
  27. // Initialise the application.
  28. $app->initialise();
  29.  
  30. // Mark afterIntialise in the profiler.
  31. JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
  32.  
  33. // Route the application.
  34. $app->route();
  35.  
  36. // Mark afterRoute in the profiler.
  37. JDEBUG ? $_PROFILER->mark('afterRoute') : null;
  38.  
  39. // Dispatch the application.
  40. $app->dispatch();
  41.  
  42. // Mark afterDispatch in the profiler.
  43. JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
  44.  
  45. // Render the application.
  46. $app->render();
  47.  
  48. // Mark afterRender in the profiler.
  49. JDEBUG ? $_PROFILER->mark('afterRender') : null;
  50.  
  51. // Return the response.
  52. echo $app;
  53.  
  54.  }
  55.  
  56.  

Using the Button

The button plugin adds a button at the bottom of the editor for easy usage.

At the bottom you see there is an insert codes button. After clicking you will get this modal box as shown below

 

 

From here you can select the language and also if you need line numbers the numbering can be enabled.

Enter all your code in between

[code]your code goes here[/code]