Loading...
 
Skip to main content

GeSHi - Generic Syntax Highlighter for PluginCode should be in mods (and activated on *.tw.o sites)

Status
Closed
Subject
GeSHi - Generic Syntax Highlighter for PluginCode should be in mods (and activated on *.tw.o sites)
Version
1.9.x
2.x
3.x
Category
  • Usability
  • Dogfood on a *.tiki.org site
  • Feature request
Feature
Infrastructure
Mods
Wiki Plugin (extends basic syntax)
Resolution status
Invalid
Submitted by
Xavier de Pedro
Lastmod by
Marc Laporte
Rating
(0)
Description

PluginCode doesn't show colors for php code, as it should according to doc page:
http://doc.tikiwiki.org/PluginCodeQuestion
Tried with param colors=>php or colors=>phpcode:

Copy to clipboard
{CODE(colors=>php)} /** Return system defined temporary directory. * In Unix, this is usually /tmp * In Windows, this is usually c:\windows\temp or c:\winnt\temp * \static */ function tempdir() { static $tempdir; <b>$tempdir = '../tmp';</b> <b>/*</b> if (!$tempdir) { $tempfile = tempnam(false,''); $tempdir = dirname($tempfile); @unlink($tempfile); } <b>*/</b> return $tempdir; } } {CODE}


And it returned:

Copy to clipboard
/** Return system defined temporary directory. * In Unix, this is usually /tmp * In Windows, this is usually c:\windows\temp or c:\winnt\temp * \static */ function tempdir() { static $tempdir; $tempdir = '../tmp'; /* if (!$tempdir) { $tempfile = tempnam(false,''); $tempdir = dirname($tempfile); @unlink($tempfile); } */ return $tempdir; } }


Update: RFE for plugincode:
Why not using "wrap=>1" as default param instead as "wrap=>0"?

Solution

From the doc:

Image
Copy to clipboard
Since GeSHI has been licensed under GPL only - which is incompatible with Tikiwiki's LGPL licence - you need to manually download (http://qbnz.com/highlighter) and copy GeSHI in your own tikiwiki's lib/geshi/ directory. You can also install the stable version of GeSHI with the Debian/Ubuntu package "php-geshi".


This would be a great Mods

Importance
3
Priority
15
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
1284
Created
Tuesday 07 August, 2007 14:06:28 UTC
by Unknown
LastModif
Friday 28 September, 2012 02:45:13 UTC


Show PHP error messages