Forum OpenACS Development: Re: html tags on chat package

Collapse
Posted by Iuri Sampaio on
Gustaf,

Here it is the scenario i am trying to accomplish:
The functionality is the possibility to attach files on real time, when people are having a conversation in the chat. (i.e. Add download file link within a chat room)

In the chat room template (i.e. ajax-chat-script.adp) I created a button "Add a file", which is a link to an ad_form on an extra popup.

Once submited, the formulary adds the file in the content repository as well as its respective revision.
Then a message, with the link available to download the file, is sent to the chat room and the popup is closed

However, i got problems with posting the message in the chat room.

1) Somehow, the link has not been posted in the chat room. Online users can't see the new message with the link to download the file.
I used the API [chat_message_post $room_id $user_id $message $moderator_p], in the end of the ad_form new_data block. I believe i missed something to make the message go through

Please see the code for the file file-add.tcl
http://pastebin.com/AvxWPjjZ

2) how to make this link html enable

Do I make sense?

cheers,