Lines Matching refs:GeSHi
3 * GeSHi example script
5 * Just point your browser at this script (with geshi.php in the parent directory,
6 * and the language files in subdirectory "../geshi/")
15 // Rudimentary checking of where GeSHi is. In a default install it will be in ../, but
18 if (is_readable('../geshi.php')) {
20 } elseif (is_readable('geshi.php')) {
23 die('Could not find geshi.php - make sure it is in your include path!');
25 require $path . 'geshi.php';
34 $_POST['source'] = implode('', @file($path . 'geshi/' . $_POST['language'] . '.php'));
40 // Here's a free demo of how GeSHi works.
46 $geshi = new GeSHi($_POST['source'], $_POST['language']);
54 $geshi->set_header_type(GESHI_HEADER_PRE_VALID);
58 $geshi->enable_classes();
61 $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5);
66 $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', false);
77 $geshi->set_line_style('color: #003030;', 'font-weight: bold; color: #006060;', true);
78 $geshi->set_code_style('color: #000020;', true);
82 $geshi->set_link_styles(GESHI_LINK, 'color: #000060;');
83 $geshi->set_link_styles(GESHI_HOVER, 'background-color: #f0f000;');
88 $geshi->set_header_content('<SPEED> <TIME> GeSHi © 2004-2007, Nigel McNie, 2007-2008 Benny Baumann. View source of example.php for example of using GeSHi');
89 $geshi->set_header_content_style('font-family: sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;');
92 $geshi->set_footer_content('Parsed in <TIME> seconds at <SPEED>, using GeSHi <VERSION>');
93 $geshi->set_footer_content_style('font-family: sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-top: 1px solid #d0d0d0; padding: 2px;');
103 <title>GeSHi examples</title>
109 echo $geshi->get_stylesheet(true);
160 <h2>GeSHi Example Script</h2>
161 <p>To use this script, make sure that <strong>geshi.php</strong> is in the parent directory or in your
162 include_path, and that the language files are in a subdirectory of GeSHi's directory called <strong>geshi/</strong>.</p>
168 echo $geshi->parse_code();
181 if (!($dir = @opendir(dirname(__FILE__) . '/geshi'))) {
182 if (!($dir = @opendir(dirname(__FILE__) . '/../geshi'))) {
213 <div id="footer">GeSHi © Nigel McNie, 2004, released under the GNU GPL<br />