public function get_address_question($item, $class, $escape = true) { $html = '<div id="qn-' . $item->id . '" class="question-item well well-transperant qn-page-header">'; $html .= '<div class="question-title qtype-' . $item->question_type . '"><i class="fa fa-question-circle"></i> ' . CJFunctions::escape($item->title) . '</div>'; $html .= '<div class="question-description">' . CJFunctions::process_html($item->description, $this->_bbcode, $this->_content) . '</div>'; foreach ($item->responses as $response) { if (!empty($response->free_text)) { $parts = explode('|||', $response->free_text); if (count($parts) == 7) { $response->free_text = '<address><strong>' . CJFunctions::escape($parts[0]) . '</strong><br>'; $response->free_text .= CJFunctions::escape($parts[1]) . '<br>'; if (!empty($parts[2])) { $response->free_text .= CJFunctions::escape($parts[2]) . '<br>'; } $response->free_text .= CJFunctions::escape($parts[3]) . ', ' . CJFunctions::escape($parts[4]) . ', ' . CJFunctions::escape($parts[6]) . '<br>'; $response->free_text .= CJFunctions::get_country_name(CJFunctions::escape($parts[5])); } else { $response->free_text = ''; } $html .= '<h4>' . JText::_('LBL_ANSWER') . '</h4>'; $html .= '<div>' . $response->free_text . '</div>'; } } $html .= '</div>'; return $html; }