1
Dona_Brasil
Xoops Code

Can it be edited or be disabled site-wide?

2
tom
Re: Xoops Code
  • 2008/4/12 13:25

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


There is no simple way to turn all the BB code off, Some modules allow the use of different editors like plain text ones, so there maybe options within those modules.

Not all modules carry this option though, You could however comment the code out of the templates.

Which modules would you want them disabling on, I know you said site-wide, but which ones are these. Also do you wish to do that on comments too.
Kind Regards.
Tom

http://bassmanthemes.com
http://www.xoopslance.com

3
Dona_Brasil
Re: Xoops Code

@ tom

It is about the Article module (not to confuse with "Articles").

I have a side with user-added content, so usability is important. I note that BB code (sometimes?) overwrites the <code> tag, and users do not immediately see/understand that it is solved by unchecking the "enable XOOPS code" box (or do not even see that there is a problem).

Disabling on comments is less urgent.

4
tom
Re: Xoops Code
  • 2008/4/12 14:25

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


I'm sorry, I'm not entirely sure I understand your second post?

Do mean they use the code tag instead of another one?

If you can please clarify a little further I maybe able to help.
Kind Regards.
Tom

http://bassmanthemes.com
http://www.xoopslance.com

5
Peekay
Re: Xoops Code
  • 2008/4/12 15:37

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


You can swap the DHTML editor interface for a plain textarea field by replacing instances of 'XoopsFormDhtmlTextArea' with 'XoopsFormTextArea' E.g. in the Xdirectory module you would replace:

$modlinkform->addElement(new XoopsFormDhtmlTextArea(_MD_DESCRIPTIONC 'moddesc' null 850), false);

with:

$modlinkform->addElement(new XoopsFormTextArea(_MD_DESCRIPTIONC 'moddesc' null 850), false);

However, users can still enter Xoopscodes to format text.

To disable Xoopscodes completely I guess you would need to hack the patterns and replacements in /class/module.textsanitizer.php?
A thread is for life. Not just for Christmas.

6
Dona_Brasil
Re: Xoops Code

@ Tom:

The problem occurs on this site as well.

Suppose I want to publish a line of code like this:

sudo dpkg --get-selections grep '[[:space:]]install$'awk '{print $1}' list_of_installed_packages


What you see above is the wrong code, the correct code is found in this article on cloning Ubuntu.

Do you see the difference? A media wiki link was created by XOOPS

That is because the checkbox "Enable XOOPS Code" (on XOOPS.org, you'll see it below the form where your type your message in this forum) was enabled. It is enabled by default.

Is this clear?? Let me know if I need to explain more.

7
Dona_Brasil
Re: Xoops Code

@ Peekay

In that case, it is very deep in the XOOPS architecture (???).

Do you think I should file a bug report? Like "If the code tags are used, bb codes or XOOPS codes should be disabled even if they are enabled in the rest of a message. Or a webmaster shoud be able to disable XOOPS Code by default to avoid confusion."

8
Peekay
Re: Xoops Code
  • 2008/4/12 19:14

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Oh.. I see.

You mean the XOOPS 'code' tag, not XOOPS codes (a.k.a. BB Codes).

What you are saying is using [ code ][ /code ] renders the pasted code incorrectly. In the Ubuntu example, I guess the square brackets in the pasted line will be upsetting the sanitiser as it will think they are XOOPS code tags.
A thread is for life. Not just for Christmas.

9
Dona_Brasil
Re: Xoops Code

Quote:

You mean the XOOPS 'code' tag, not XOOPS codes (a.k.a. BB Codes).


More or less, but thanks for making me see why it is not understood: there is two times the term "code"

Oops....

What I mean is XOOPS codes (a.k.a. BB Codes) within the XOOPS 'code' tag. Or more accurately, codes within the XOOPS code tags that are rendered by XOOPS as being XOOPS codes (a.k.a. BB Codes).

The reason that this results in a bug is that some codes are interpreted as XOOPS codes (a.k.a. BB Codes). This should not happen within the XOOPS 'code' tag.

10
tom
Re: Xoops Code
  • 2008/4/12 19:58

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


As Peekay, it may have something to do with the sanitiser.

Your best bet would be speaking with one of the main developers here on XOOPS.

I always envisaged the BB code tag, allowing you encapsulate the code, so not sure why it's causing you issues. I'll be honest in saying that I tend not to use the code button on my sites, in fact I tend to code it out as it confuses the heck out of my users.

Report it as a bug too if you wish, this may get some further attention from the developer.
Kind Regards.
Tom

http://bassmanthemes.com
http://www.xoopslance.com

Login

Who's Online

218 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits