Welcome Guest, Not a member yet? Register   Sign In
Is there a library that ....
#11

[eluser]ShannenName[/eluser]
OHhhh I see now. Thank you very very much for this information!
#12

[eluser]InsiteFX[/eluser]
There is a library already for CodeIgniter.

CodeIgniter Code Highlighter Library

InsiteFX
#13

[eluser]ShannenName[/eluser]
I seem to be having problems. I tried pickupmans method and cahvas method.
Right now I'm trying cahvas and I'm getting this error:
Code:
Fatal error: Call to undefined method Geshi::parse_code() in C:\xampp\htdocs\codeigniter\system\application\controllers\geshi.php on line 29

I have adding that autoload to config.php and changed geshi.php to GeSHi.php (although I'm not using *nix so it shouldn't be a problem)
I have GeSHi.php and folders called geshi and contrib in application/libraries.
I don't know what's going wrong.

If you have gotten it to work please provide a step-by-step explanation!
#14

[eluser]InsiteFX[/eluser]
Did you try the one from the link I posted above?

InsiteFX
#15

[eluser]pickupman[/eluser]
With my library, you don't need to edit any other files or add the autoload function in config.php. Just unzip the library into your folder, and use as shown. I've tried it and have it outputting the code how I expected. Did you have any errors with my download/example?

Check your camel case on how your are spelling geshi. If you are going cahvas method, you will need to reference GeSHi with the proper case as declared by the class name, not by the filename.

With my library, it would use all lower case references, and used just like all other libraries in CI.

Also, you may want to try htmlentities($code).




Theme © iAndrew 2016 - Forum software by © MyBB