Insert Programing Code

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ranman
Regular
Posts: 19
Joined: Wed Jul 05, 2006 1:36 pm

Insert Programing Code

Post by ranman »

Hi,

I am trying to insert some programming code (shell/perl/etc...) into the blog but I cannot find the most appropriate solution for it, and applying the quote feature does not look the best of all.

Any advised tag I should use the embed the code?

Thanks very much
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Insert Programing Code

Post by garvinhicking »

Hi!

A good way would be the "Geshi" markup event plugin, that allows you to use [geshi lang=XXX] tags...?

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ranman
Regular
Posts: 19
Joined: Wed Jul 05, 2006 1:36 pm

Re: Insert Programing Code

Post by ranman »

garvinhicking wrote:Hi!

A good way would be the "Geshi" markup event plugin, that allows you to use [geshi lang=XXX] tags...?

HTH,
Garvin

Yes, to enclose something like

Code: Select all

#!/usr/bin/ksh

echo 1


Not expecting something like the one above, but maybe anything similar/of the kind?
etc..
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Insert Programing Code

Post by garvinhicking »

Hi!

Yes, Geshi should be able to do that.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ranman
Regular
Posts: 19
Joined: Wed Jul 05, 2006 1:36 pm

Re: Insert Programing Code

Post by ranman »

Apologies,

I am getting some issues when making the tool running:

Code: Select all

Warning: require_once(plugins/serendipity_event_geshi/geshi.php) [function.require-once]: failed to open stream: No such file or directory in /home/menteyar/public_html/generations/plugins/serendipity_event_geshi/serendipity_event_geshi.php on line 144

Fatal error: require_once() [function.require]: Failed opening required 'plugins/serendipity_event_geshi/geshi.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/menteyar/public_html/generations/bundled-libs/:/home/menteyar/public_html/generations/bundled-libs/Smarty/libs/:/home/menteyar/public_html/generations/:') in /home/menteyar/public_html/generations/plugins/serendipity_event_geshi/serendipity_event_geshi.php on line 144
The Path where GeSHi package is installed relative to Serendipity root directory should be right:

Code: Select all

plugins/serendipity_event_geshi
When the whole path is :

/home/<HOME_ENV>/public_html/serendipity/plugins/serendipity_event_geshi

I tried many paths but the same issue.

Also puzzles me the following:

plugins/serendipity_event_geshi/geshi.php (php at the end, unless something is missing from the .htaccess which should make think the serendipity_event_geshi/geshi stands for erendipity_event_geshi/geshi.php)

Sorry for all those so many questions
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Insert Programing Code

Post by garvinhicking »

Hi!

How did you install the plugin? It seems that the geshi.php file is missing?! You can download the plugin package from http://spartacus.s9y.org, make sure that all files are inside the plugin directory - once the files are there, you should be able to install and use the plugin within Serendipity.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ranman
Regular
Posts: 19
Joined: Wed Jul 05, 2006 1:36 pm

Re: Insert Programing Code

Post by ranman »

Hi,
Interesting,

I installed using the spartacus plugin within the application/blog, then the file was missing from repository?

I manually took it and it worked now, no problem.

Looking the way or removing the <br/> tags at the end of the lines.

(generations.menteyarte.org)
ranman
Regular
Posts: 19
Joined: Wed Jul 05, 2006 1:36 pm

Re: Insert Programing Code

Post by ranman »

Problem sorted, sorry.

As could be expected conflict with another event plugin

Thanks very much
Post Reply