Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Monica Franz -
Number of replies: 9

Hi,

I've installed the Geshi filter moodle-geshi-filter-0.1.0.zip just as it's explained in

docs.moodle.org/25/en/Code_syntax_highlighting

In the TinyMCE editor nothing looking like a Geshi-Icon shows up.

I purged the caches already.

After reading the old threads about geshi I wonder if I have to make changes in the tinymce editor a well and even install some plugins.

What shall I do?

Regards,

Monica

 

 

Average of ratings: -
In reply to Monica Franz

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Guillermo Madero -

Hi Monica,

I may me missing that info (something that has happened to me a bit lately), but I haven't seen any references to an extra icon in the editor. The instructions just mention that one has to enclose code with tags:

[code lang]your code goes here [/code]
[code lang linenumbers]your code with line numbers [/code]
[code lang highlight=1,2,6-9]your code with lines 1, 2 and 6 to 9 highlighted "extra" [/code]

Trying it out here:

[code html linenumbers]
<p>
<strong>Hello</strong><br />
dear fellows!
</p>
[/code]

 --- edit

Well, either I didn't understand how to do it or the filter isn't installed here in moodle.org.

In reply to Guillermo Madero

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Monica Franz -

Hi Guillermo,

I thought in that thread someone mentioned to edit a plugin to the editor?! That thread is very mixed up and confusing.

Well in 1.9.16 it worked, and now it doesn't, now I noticed that the TeX filter (mimtexSunOS is copied from moodle 1.9.16) doesn't work eather, so this must be an other problem, but what?

By the way how can an admin find out which course uses which filter, like the activitys and blocks listed in the Website-Adminblock?

Regards,

Monica

 

 

In reply to Monica Franz

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Guillermo Madero -

Hi Monica,

After reading the thread completely, I can agree with you, it is quite chaotic. There they talk about the rj_insertcode editor plugin, but as things appear to have changed a bit since Moodle 2.4, the instructions given do not seem to work. I tried to follow them but all I accomplished was to completely vanish the editor area sad

A few have managed to have it working, though they don't explain how they did it. As it is still being developed, I suppose it won't be long until they create a page with the final plugin and instructions for each Moodle version.

Regarding the error from the Geshi filter:

$geshi =& new GeSHi($source, $language);

you only need to delete the ampersand to supress it. I also tried this, but code was simply displayed without any fancy attributes.

I do have some good news, however, the TeX filter works Ok. I just enabled it at the text filter plugin page and then added some simple code in a page resource; the image rendered fine, and this was based only in the Mimetex provided  by Moodle.

Average of ratings: Useful (1)
In reply to Guillermo Madero

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Monica Franz -

Hi Guillermo,

I deleted the & and no Debugging messages appear now, but geshi still doesn't work!

Could you please send me the zip file of your geshi version for Moodle 2.5?

I deleted the whole geshi directory and installed it new, Then I changed all php-files-modes to rwxr-xr-x. I turned the filter on in the website-adminblock and put it on first position,

Now, I don't know what to do!

The same I did with TeX filter and copied the mimetexSunOS from Moodle 1.9 to the filter, and this one doesn't work either!

 

 

 

In reply to Monica Franz

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Monica Franz -

Hi Guillermo,

for TeX I started debuging and I had to compile a new mimtex, (wheird) because my old one for SunOS didn't seem to not be up to date.

Now I still doesn't get errors with using texdebug! For that I look at the Math tool forum.

But Geshi still doesn't work and I don't know why!

 

In reply to Monica Franz

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Guillermo Madero -

Hi Monica,

I have just sent you an email with the zip file. As I said there, I think that the best option is to wait for the developers to finish the rj_insertcode editor plugin smile

In reply to Guillermo Madero

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Bob Puffer -

You got that right... that thread is chaotic.

In reply to Guillermo Madero

Re: Geshi filter for Moodle 2.5 - Icon doesn't show up in TinyMCE editor

by Monica Franz -

Hi,

I turned Debugging on and get the error message

"Deprecated: Assigning the return value of new by reference is deprecated in /local/hosting/moodle/filter/geshi/filter.php on line 147 "

Line 147 shows:     $geshi =& new GeSHi($source, $language);

For Tex I didn't get a message and it doesn't work anymore (after upgrade from 1.9 to 2.5) eather.

What shall I do next?

Regards,

Monica