We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe this helps, it shows an edit notice directly under "Answered on ... by ..." like it can be found with the questions:
public function post_meta($post, $class, $prefix=null, $separator='<BR/>') { // only link when there are actual revisions if(in_array($post['raw']['postid'], $this->rev_postids)) { $url = qa_path_html('revisions/' . $post['raw']['postid']); // question meta if(isset($post['when_2'])) { // $post['when_2']['data'] = '<a rel="nofollow" href="'.$url.'" class="'.$class.'-revised">' . $post['when_2']['data'] . '</a>'; // prefix is only set "vor x Minuten", but after a week the date is displayed (no prefix), e.g. "Mär 3" $meta_before = !empty($post['when_2']['prefix']) ? $post['when_2']['prefix'] : ''; $meta_before .= ' '.!empty($post['when_2']['data']) ? $post['when_2']['data'] : ''; $post['what_2'] = ' <div class="post-meta-edited"> <a rel="nofollow" href="'.$url.'" class="'.$class.'-revised">' . $post['what_2'] . '</a> '.$meta_before.' </div> '; // $post['who_2']['suffix'] .= ''; unset($post['who_2']); unset($post['when_2']); } // answer edit, q2a core does not give them a what_2 for the edit else if(isset($post['when'])) { // get edit time and editor $lastedit = qa_db_read_one_assoc( qa_db_query_sub(' SELECT updated, userid FROM ^edit_history WHERE postid = # ORDER BY `updated` DESC LIMIT 1 ', $post['raw']['postid']) ); $meta_before_arr = qa_when_to_html(strtotime($lastedit['updated']), qa_opt('show_full_date_days')); $meta_before = isset($meta_before_arr['prefix']) ? $meta_before_arr['prefix'] : ''; $meta_before .= $meta_before_arr['data']; $post['what_2'] = ' <div class="post-meta-edited"> <a rel="nofollow" href="'.$url.'" class="'.$class.'-revised">Edited</a> '.$meta_before.' </div> '; } } parent::post_meta($post, $class, $prefix, $separator); }
The text was updated successfully, but these errors were encountered:
What is the situation this works in? When does Q2A not have the what_2 but you need to show something in the edit history?
what_2
Sorry, something went wrong.
I did implement it for the answers and this happened, so I added the:
// answer edit, q2a core does not give them a what_2 for the edit
I did not dig into the issue. Just fixed the problem.
Could be that my qa-theme.php or one of my plugins removes that.
No branches or pull requests
Maybe this helps, it shows an edit notice directly under "Answered on ... by ..." like it can be found with the questions:
The text was updated successfully, but these errors were encountered: