Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I recently downloaded and installed GeSHi Filter for my site. Am I only able to use the Filter by creating a new source code node? I am trying to use the filter inside of a blog post with no such luck. I am using the format:
<code type="php">
// testing
var_dump($value);
echo 'Is this working?';
...
Any help is greatly appreciated.
Thanks,
~ JimmyJam
Comment | File | Size | Author |
---|---|---|---|
#10 | 252621_donothing_01.patch | 11.55 KB | soxofaan |
#7 | 10_1209495252201.png | 161.5 KB | soxofaan |
#7 | 10_1209495277121.png | 108.28 KB | soxofaan |
#7 | 10_1209495358146.png | 249.44 KB | soxofaan |
#6 | geshi_in.txt | 278 bytes | BassistJimmyJam |
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedjust installing GeSHi filter is not enough, you have to enable the GeSHi filter in an input format and use that input format for your blog body.
from the help at yoursite.com/?q=admin/help/geshifilter:
(also note that the source code node is deprecated and will be replaced by a GeSHi CCK field in the future)
Comment #2
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedI have followed all of these steps and I am using the Full HTML Input Format which is setup to use the GeSHi filter. I have even tried using <php> tags, which I did setup, but this still does nothing. It seems as if the content isn't even being processed by the filter. I have the filter setup to use <pre> tags, but when I view the source of the published entry, I do not see them.
Comment #3
soxofaan CreditAttribution: soxofaan commentedThis is probably due to a conflict between filters. For example, the html filter should come before the GeSHi filter. Check the "filter conflicts" tab on the GeSHi filter settings page.
If this does not help, please create a new input format, with only the GeSHi filter enabled and check if the filtering works with this new input format.
Comment #4
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedAccording to the "filter conflicts" tab, there are no known conflicts. I created a new input format with only the GeSHi filter enabled and it still does not work. I am still not even getting <pre> tags around my code.
Comment #5
soxofaan CreditAttribution: soxofaan commentedcan you give an example of input and resulting output?
please attach as files because the markup would be messed up in these comments
In attachment: the output I get for the given input
settings:
* input format: urlfilter+htmlfilter+linebreakfilter+geshifilter
* inline CSS, pre container
* GeSHi Library 1.0.7.20
* <foo> and [foo] tags
* C++ language enabled
Comment #6
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedI have used the exact same setting that you described and it still did not work. I am currently using version 1.0.7.21 GeSHi Library. My results are attached.
Comment #7
soxofaan CreditAttribution: soxofaan commentedhmm, from your results it seems like GeSHiFilter is not invoked in any way
I attached some screenshots of my settings to make sure we are on the same page
Comment #8
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedI changed the "Default highlighting mode" to "As plain text" to match your settings. I had it set to "Do nothing" at first. Now everything works fine. I still don't see why this wasn't working with my previous setting, since my <code> tags included the language="php" attribute.
The important thing is that it is working now. Thanks a lot for everyone's help.
Thanks,
~ JimmyJam
Comment #9
soxofaan CreditAttribution: soxofaan commentedyour problem is solved,
but this is a bug
"do nothing" should be overruled by language="cpp" and such
Comment #10
soxofaan CreditAttribution: soxofaan commentedfirst iteration of a patch to fix this
patch could be smaller, but to make it more elegant I did some refactoring
still to do: add SimpleTest tests
Comment #11
soxofaan CreditAttribution: soxofaan commentedFixed for HEAD (drupal 6 version) by http://drupal.org/cvs?commit=113914
problem also exists in 5.x-2.x-dev
Comment #12
soxofaan CreditAttribution: soxofaan commentedfixed for 5.x-2.x-dev by http://drupal.org/cvs?commit=113917
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.