There is also an easy way to deal with only layer module, but it will be worse the performance of your site. I will show fastest and flexible logic (This is a program for advanced users). I wonder it is difficult for you?
*1: qa_db_posts_basic_selectspec() in qa-include/db/selects.php L127 *2: Add lines at L189
$selectspec['source'].=' LEFT JOIN ^users ON ^posts.userid=^users.userid'; $selectspec['columns']['bio']='^userprofile.content'; $selectspec['source'].=' LEFT JOIN ^userprofile ON ^posts.userid=^userprofile.userid AND ^userprofile.title="bio"'; if ($full) {
*3: Add function
function post_meta($post, $class, $prefix=null, $separator='<br/>') { $this->output('<span class="'.$class.'-meta">'); if (isset($prefix)) $this->output($prefix); $order=explode('^', @$post['meta_order']); foreach ($order as $element) switch ($element) { case 'what': $this->post_meta_what($post, $class); break; case 'when': $this->post_meta_when($post, $class); break; case 'where': $this->post_meta_where($post, $class); break; case 'who': $this->post_meta_who($post, $class); break; } $this->post_meta_flags($post, $class); if (!empty($post['what_2'])) { $this->output($separator); foreach ($order as $element) switch ($element) { case 'what': $this->output('<span class="'.$class.'-what">'.$post['what_2'].'</span>'); break; case 'when': $this->output_split(@$post['when_2'], $class.'-when'); break; case 'who': $this->output_split(@$post['who_2'], $class.'-who'); break; } } if($class=='qa-a-item') { if(!empty($post['raw']['bio'])) { $this->output('<span style="display:block" class="'.$class.'-bio">'); $this->output(qa_shorten_string_line(str_replace("\n", '<br/>', strip_tags($post['raw']['bio'])),120)); $this->output('</span>'); } } $this->output('</span>'); }
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.