1
mboyden
XOOPS Codes Explained
  • 2007/5/27 19:26

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


XOOPS Codes are designed as simple but secure HTML replacements that many modules can and still use. Today's content management systems tend to use WYSIWYG editors, but not all modules do (unless you hack their code). This is somewhat legacy XOOPS because I (and most others) recommend using WYSIWYG wherever possible.

Because of the limitations of this display/input interface, I can't be as clear in this message as I can on my personal website, so you may want to read my article on XOOPS Codes. I hope this helps.

XOOPS CODES
===========
XOOPS Codes are processed in the MYTS (My Text Sanitizer) class which is XOOPS_ROOT/class/module.textsanitizer.php and you'll find this functionality in the function xoopsCodeDecode. It's a mess of regex pattern replacement information so be prepared to know your regex if you take a look at it.

XOOPS CODES TRANSLATIONS
=======================
To use a XOOPScode, embed it like this:
[xoopscode]text[/xoopscode] and/or
[xoopscode=value]text[/xoopscode]

Format: xoopscode=value => replacement [notes]
-----------------------------------
siteurl=value => text [expects URL relative to site root, no starting slash]
url=value => text [value can start with http, https, ftp or domain relative]
color=value => text [don't add the #]
size=value => text
font=value => text<
email => text [text can start http, https, ftp or relative]
b => text
i => text
u => text
d => text
quote =>
text

img => [4 usages, see next section]

Images
-------
Images depends upon whether or not images are allowed or not. There are four variations of each. [Note: alvalue only allows left, right, or center; idvalue only allows number]:

Images Allowed:
img =>
img align=alvalue =>
img id=idvalue => <em>text</em>
img align=alvalue id=idvalue => <em>idvalue</em> [Note: exactly this order -- id before align will not work;]
Images Not Allowed:
img => text
img align=alvalue => text
img id=idvalue => text
img align=alvalue id=idvalue => idvalue [Note: exactly this order -- id before align will not work;]

[Note: value can be enclosed in single or double quotes. This same function removes javascripts and about:'s.]

FINAL NOTES
==========
I'll note that based on the image codes that most people probably don't use these XOOPS codes because the image translations aren't always necessarily congruent to what I would expect usage should be especially when both id and align are used, but that's a topic for another discussion.

My recommendation is to use WYSIWYG editors (my personal favorite is FCKeditor) and not the standard DHTML text area editor making XOOPS codes moot. I hope that's the overall forward direction as I don't think users should need to learn XOOPS, BB or Wiki codes (kind of like learning DOS). But I did on one site, and the users needed to know the codes, thus this page. I think philosophically, the DHTML editor ought to have a helper pop-up window link to give you a look into those codes.

If you have more questions, e-mail me and I'll respond.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

2
hackbrill
Re: XOOPS Codes Explained
  • 2007/5/27 20:04

  • hackbrill

  • Friend of XOOPS

  • Posts: 283

  • Since: 2005/7/14


I found your website articles to be informative and a good resource for XOOPS users. Thanks for sharing!

3
McDonald
Re: XOOPS Codes Explained
  • 2007/5/27 20:08

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


The codes you use in the left column called 'Xoops code' on your website is actually standard BBCode.
The code is not specific XOOPS code, php-Nuke is using it in their editors too.

4
davidl2
Re: XOOPS Codes Explained
  • 2007/5/28 12:35

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


I've started to add this to XoopsWiki.org as well - thank you for the useful information.

5
marcionline
Re: XOOPS Codes Explained

Is there a way to disable XOOPS Codes just for a moment?

For example, in vBulletin you can use [noparse][ b]text [/ b][/noparse]. So the text inside those tags is not processed and will be showed exactly as typed (in example above, [ b]text[/ b] would be showed).

In XOOPS, if you type [ code][ b]text[/ b][/ code], for example, the text [ b]text[/ b] is processed anyway, even if it is inside of [ code] tag.

6
adrock
Re: XOOPS Codes Explained
  • 2007/6/22 21:58

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


word.

Perhaps an immediate fix for the DHTML editor issue...is to change the input form so that it gives the visual appearance of it's intended function.

Can't tell you how many bazillions of users have said "Oh...you mean if I type what I want in that little area and format it with the buttons, it inserts it into the text area below?!"

Luckily, there are a half dozen or more posts and articles available through this site and elsewhere explaining in step by step manner, how to add FCK Editor, TinyMCE, and all the others.

I've also found that depending on the technical expertise of your users...a wysiwyg editor can actually cause MORE problems in the end. None of them appear to clean their code of redundant or non-used tags...non of them can force compliance with XOOPS or XHTML or CSS fully...and I have yet to find one that works correctly cross browser, without needing to alter odd amounts of code in countless other areas of an already flawless layout and/or CMS system.

Even with this one little piece of WYSIWYG Editor 'ickyness'....I still think XOOPS offers the most options for content customization and display personalization of all of the CMS's.

Making a custom theme can take less than 30 minutes for anyone familiar with HTML or CSS on a production level, and even if you just use say Dreamweaver as a hobby...it won't take more than a day or two tops to clone the default theme, and tweak it to suit your needs.

Ahhh-well.... thanks for reading my 2cents worth!
Affordable Web Hosting - Family - Fun!...and not always in that order!

7
adrock
Re: XOOPS Codes Explained
  • 2007/6/22 22:01

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Quote:

marcionline wrote:
Is there a way to disable XOOPS Codes just for a moment?

For example, in vBulletin you can use [noparse][ b]text [/ b][/noparse]. So the text inside those tags is not processed and will be showed exactly as typed (in example above, [ b]text[/ b] would be showed).

In XOOPS, if you type [ code][ b]text[/ b][/ code], for example, the text [ b]text[/ b] is processed anyway, even if it is inside of [ code] tag.


when submitting the p[ost...simply uncheck the checkbox that says 'Use XOOPS Code' before submitting.

Yahoo <--- see!
Affordable Web Hosting - Family - Fun!...and not always in that order!

8
MadFish
Re: XOOPS Codes Explained
  • 2007/6/23 2:01

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


Thanks! Please consider submitting this as a XOOPS FAQ as well!

9
BlueStocking
Re: XOOPS Codes Explained

I like the editor that comes with xoops.
Clean, simple and does the job very well.
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

10
bleu_
Re: XOOPS Codes Explained
  • 2007/6/23 5:51

  • bleu_

  • Just popping in

  • Posts: 32

  • Since: 2006/8/1 2


the DHTML extended view which is obtained after installing Frameworks can give you an optimized default XOOPS bbcode editor (includes wiki links and you can select text and apply bbcode directly to it)

Login

Who's Online

237 user(s) are online (114 user(s) are browsing Support Forums)


Members: 0


Guests: 237


more...

Donat-O-Meter

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

Latest GitHub Commits