Skip to navigation | Skip to content

Share your knowledge. Make a difference.

OpenACS

1 - I can do better 2 - Jury's out 3 - Pretty darn good 4 - Splendiferous 5 - Awesometastic (by 1 person)   Your rating: 1 - I can do better 2 - Jury's out 3 - Pretty darn good 4 - Splendiferous 5 - Awesometastic

Ranked #12340 in Tech & Geek, #239542 overall

Rated G. (Control what you see)

I'm creating this lens for the PowerfulIntentions Techy team to easily research and record information concerning anything about the Open ACS architecture that we're operating on.

Only the Techy team will be able to see the  PI admin area. 

 

HTML Area & WYSIWYG Widget 

Forum OpenACS Development: HTMLArea - Current Issues and Future Development
The Toolkit for Online Communities

Forum thread about HTML area - the widget, last updated October 2005. Considering different widgets to use.
Forum OpenACS Development: Curious about htmlarea widget and text-or-html dropdown -- is it still there?
Question and reply about using HTML in widget.

In the new (oacs-5.2 & +) ad_form html_area, I notice that the dropdown for the type (plain text, html, something else) is gone... does this mean that this widget is -always- supposed to return html as its value?

So if you ever did want to bring it back, you'd scan the string for tag-looking things and change them so they're not, put
where the newlines are, etc etc?

i suppose, you mean: in which situations does the format menu show up, when ad_form encounters a richtext widget (e.g. one passes a widget spec like the following to ad_form text:richtext(richtext),nospell,optional ...).

When a rich text editor is enabled (rte or xinha) and the client has java script enabled, a rich text widget returns always HTML, therefore the format menu does not make sense and is not dsplayed. Even worse, the format menu can cause inconsitencies, when the user says: its plaintext, but the rich text editor returns always html, where in other situations (e.g. no javascript enabled) the flag says the truth.

The rich text editor is enabled either globally for a site (kernel parameter UseHtmlAreaForRichtextP) or per widget (property htmlarea_p in the widget spec).

so, if i understand correctly, you have the rich text widget enabled, but you do not want it in certain situations. Here you can set htmlarea_p to 0 in the widget spec.
Forum OpenACS Development: Problem in moving values into Richtext widget from another form
Rich Text editor and HTML Problems

Don't set the value like that. You need a richtext datastructure.

Something like this

-edit_request {
set description [template::util::richtext::create $content $mime_type]
}

Where mime type can be whatever it was created as. Text/enhanced text/plain text/html

Usually the mime type should be stored in the database.
KevinRoth.com :: View topic - Are users able to type in Javascript & have it displayed?
My Post and a reply at KevinRoth forums. Looks like Javascript will not display in new widget.
KevinRoth.com :: View topic - WYSIWYG Tab: inserting links replaces url with "../"
Responses to questions on Kevin Roth forum, about Absolute vs relative links.
Forum OpenACS Development: Saving Javascript and CSS in the HTML area of Widget
Question on OpenACS forum
Enabling WYSIWYG Tutorial
The following section shows how you can modify your form to allow WYSIWYG functionalities.

Convert your page to use ad_form (some changes but worth it)

Here an examples. From:

template::form create my_form
template::element create my_form my_form_id -label "The ID" -datatype integer -widget hidden
template::element create my_form my_input_field_1 -html { size 30 } -label "Label 1" -datatype text -optional
template::element create my_form my_input_field_2 -label "Label 2" -datatype text -help_text "Some Help" -after_html {Anchor}
UseHTMLAreaForRichtextP
UseHtmlAreaForRichtextP

Should the richtext widget use the htmlArea widget for richtext editing. 1 = yes, 0 = no. We will also check the browser's User-Agent header to find out if htmlArea works with the given browser.

At PI, the Richtext widget is used. Should we set another paramter for it to use the HTML area?
Permission DeniedEnabling WYSIWYG
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

Most of the forms in OpenACS are created using the form builder, see the section called "Using HTML Forms". For detailed information on the API take a look here.

The following section shows how you can modify your form to allow WYSIWYG functionalities.

Convert your page to use ad_form (some changes but worth it)

Here an examples. From:

template::form create my_form
template::element create my_form my_form_id -label "The ID" -datatype integer -widget hidden
template::element create my_form my_input_field_1 -html { size 30 } -label "Label 1" -datatype text -optional
template::element create my_form my_input_field_2 -label "Label 2" -datatype text -help_text "Some Help" -after_html {Anchor}

Absolute URL being replaced by Relative URL in widget 

Forum OpenACS Development: Absolute URL replaced by Relative URL within Widget.
Open ACS forum post - posted by JvZ
KevinRoth.com :: View topic - WYSIWYG Tab: inserting links replaces url with "../"
replies to this forum post.

AOL Server Documentation for ACS 

AOLserver Documentation
AOLserver Tcl API Reference

Contents
General-Purpose Functions
ADP Functions
File Manipulation Functions
Connection and Socket Functions
Administration Functions
Database Functions
Thread, Cache, and Scheduling Functions
Tcl API - AOLserver Wiki
Tcl API From AOLserver Wiki
Links to all of the Tcl commands provided by the AOLserver core "out of the box". To view a complete list of these commands in alphabetical order, try the Category:Core Tcl API page.

Documentation about Packages in OpenACS system 

Manage Parameters in a Package
Packages have Parameters which can be changed by going to Manage Packages.
Package Specification File
Overview

This document is a guide on how to write a software package for OpenACS. OpenACS packages are installed and maintained with the OpenACS Package Manager (APM) which is part of the acs-admin package. This document presents reasons for packaging software, conventions for the file system and naming that must be followed, and step by step instructions for creating a new package for the "Notes" example package.
Server file layout

Here is how an OpenACS 5 server is laid out starting from the Server root (ROOT):

Figure 11.1. Server file layout diagram

ROOT/
bin/
Various executables and scripts for server maintanence.
content-repository-content-files/
content repository content stored in the filesystem.
etc/
Installation scripts and configuration files.
packages/
acs-admin/
acs-api-browser/
... many many more...
workflow/
log/
Server error and access logs
tcl/
bootstrap code
www/
Pages not in packages (static content, customized pages)

See much more detail at the hyperlink above - Package file layout diagram.

TEMPLATING SYSTEM 

Demonstration of Templating System with samples
As the links reveal, the "Data" files have the extension .tcl and the "Template" files have .adp. If you want to see a little behind the scenes, you can look at the tcl code into which we compile the template. The last column will deliver the resulting page to your browser.

Mechanisms underlaid in red are known to not work.

Web developer Resources 

Interactivetools.com Forum: Web Development: Web Design & Coding (HTML, CSS, JavaScript, etc)
Interactivetools.com wrote the code in this file:

/pi/packages/acs-templating/www/resources/htmlarea.js

These are the forums supporting web developers.
htmlArea.com discussion forums: WYSIWYG Forums: WYSIWYG Editor Discussion
Forum about WYSIWYG editors
JavaScript Compiler
Commands for compiling JavaScript

WYSIWYG Editors 

Web Software Components: WYSIWYG Editors: FCKeditor at htmlArea.com
This HTML text editor brings to the web many of the powerful functionalities of known desktop editors like Word. It's really lightweight and doesn't require any kind of installation on the client computer.
As it is Open Source, you are allowed to use it
X
Julieanne

About Julieanne

I'm a Webmaster, a Scuba Diver, a Swimmer, a home based business owner and I love to travel. I also like to see people solve their health challenges, that's why I have all the lenses about health.

The Gold Coast in Australia where I live, is now my favourite city!  With 70 kilometres of beaches to visit, what more could I ask for? 


 

 

Julieanne's Pages

See all of Julieanne's pages