PDA

View Full Version : using the <code> tag


Mark
02-24-2006, 09:37 AM
One of the only troubles I have add with vbdrupal is the use of the <code> tag in articles. I also installed the BBcode module in hopes that the [code] tag would work but it didnt. Everythign works fine in the forums, just have this trouble when submitting article, blog etc in drupal.


For now my users are using <textarea> in Full HTML mode to show code examples...

Any hints or ideas?

myetalk
02-24-2006, 09:40 AM
I haven't tested out the <code> tag for vbDrupal yet, but thanks for pointing that out.

I have had some problems with Filtered HTML and HTMLArea also, so they are also using Full HTML to filter out all the linebreaks...

Mark
02-24-2006, 09:48 AM
Yeah i disabled htmlarea.. just a little too clunky for me.

I shoudl also note that when viewing articles as administrator if the writer has posted say..

[code]
<?php

my php stuff
?>
[code]

i do not see the <?php it seems to go into parsing php rather than just displaying the text. happens even using
<textarea>
<?php
</textarea>

Only as admin so not a biggie.

myetalk
02-24-2006, 09:53 AM
Yeah i disabled htmlarea.. just a little too clunky for me.

I shoudl also note that when viewing articles as administrator if the writer has posted say..

[code]
<?php

my php stuff
?>
[code]

i do not see the <?php it seems to go into parsing php rather than just displaying the text. happens even using
<textarea>
<?php
</textarea>

Only as admin so not a biggie.
cool, thanks for the heads-up...

Mark
02-27-2006, 09:36 AM
Can we confirm this as a bug? or possibly just something I did in my customization efforts...

tamarian
02-27-2006, 10:02 AM
It's not a bug in drupal, just a missing feature. There is a module on drupal.org for bbcodes.

Mark
02-27-2006, 10:33 AM
It's not a bug in drupal, just a missing feature. There is a module on drupal.org for bbcodes.


Yeah I added that module, every bbcode worked except the <code>, [code] tag.

tamarian
02-27-2006, 12:39 PM
Yeah I added that module, every bbcode worked except the <code>, [code] tag.

Are you sure? Have you confirmed that all other bbcode tag work, or simply used HTML alternatives. You may need to tweak the order of filters to make sure the bbcode filter gets used.

Mark
02-28-2006, 09:11 AM
Yes I'm sure, the other bbcode's are definately working... just not the code tag (either version <> [])

I've adjusted the order of filters every which way.. still no go.

but shouldnt the <code> tag work in full HTML mode even without the bbcode add on? Even on this site when I try and use <code> in the book page creation it does not work.

Mark
03-03-2006, 03:56 AM
does anyone have any ideas for fixing this?

Can anyone confirm the same issue? or have this working?

Mark
03-05-2006, 02:25 PM
If anyone else runs into this snag, you need to install the codefilter module http://drupal.org/project/codefilter

dendrob
05-27-2006, 06:16 PM
anyone having a problem with the [size="#"] tag??? It's not showing up for me