using html in category and event description

  • nycps
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 6 months ago #11841 by nycps
I followed the instructions for being able to add html to my event description and this seems to work well in events but I can't say it works in the category description. Although it seems to take some of the code not all of it sticks. For instance i am putting a table in my event description and i can't seem to set the table border to Zero. it keeps turning it to One. I tried to set the border color to white and that also did not work.

What can i do?

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 6 months ago - 13 years 6 months ago #11845 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: using html in category and event description
Hi

Please use the step below :

1. Open the file administrator/components/com_eventboooking/controller.php

2. Find save_category function in the file :
Code:
function save_category() { $post = JRequest::get('post' , JREQUEST_ALLOWHTML); $model = $this->getModel('category') ; $cid = $post['cid']; $post['id'] = (int) $cid[0]; $ret = $model->store($post); if ($ret) { $msg = JText::_('EB_CATEGORY_SAVED'); } else { $msg = JText::_('EB_CATEGORY_SAVING_ERROR') ; } $task = $this->getTask() ; if ($task == 'save_category') { $url = 'index.php?option=com_eventbooking&task=show_categories' ; } else { $url = 'index.php?option=com_eventbooking&task=edit_category&cid[]='.$post['id'] ; } $this->setRedirect($url, $msg); }

3. Change the line :
Code:
$post = JRequest::get('post' , JREQUEST_ALLOWHTML);

To :
Code:
$post = JRequest::get('post' , JREQUEST_ALLOWRAW);

After that, it will work as expected !

Tuan
Last edit: 13 years 6 months ago by Tuan Pham Ngoc.

Please Log in or Create an account to join the conversation.

  • nycps
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 6 months ago #11861 by nycps
that worked thank you. I think it will be helpful to others if you added that to the common questions section.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 6 months ago #11883 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: using html in category and event description
This issue only happens on some special servers, so I don't add it to Common Problems and Soltuons forum ! But I will remember this post and send link to customers who has the same question !

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc