Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
525 views
in Q2A Core by
I want to format certain keywords as they are displayed within the question.

I've looked and looked but can't find where to do this.  Can someone point me in the right place?

Thanks

2 Answers

0 votes
by
Try modifying the function qa_post_html_fields(...) in qa-app-format.php - this is where a lot of HTML formatting takes place for title and content.
+1 vote
by

See app/format.php:

function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $options = array())

// Post content

if (@$options['contentview'] && isset($post['content'])) {

You can also use the qa-theme.php and override those functions:

function q_view_content($q_view)

{

if(!empty($q_view['content']))

{

if(substr_count($q_view['content'], '`') >= 2)

{

$q_view['content'] = $this->mycustomfunction($q_view['content']);

}

}

// default

qa_html_theme_base::q_view_content($q_view);

}

public function a_item_content($a_item)

{

if(!empty($a_item['content']))

{

if(substr_count($a_item['content'], '`') >= 2)

{

$a_item['content'] = $this->mycustomfunction($a_item['content']);

}

}

// default

qa_html_theme_base::a_item_content($a_item);

}

public function c_item_content($c_item)

{

if(!empty($c_item['content']))

{

if(substr_count($c_item['content'], '`') >= 2)

{

$c_item['content'] = $this->mycustomfunction($c_item['content']);

}

}

// default

qa_html_theme_base::c_item_content($c_item);

}

...