Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
620 views
in Q2A Core by
edited by

Hi, using the history plugin I would like to link "my updates" to the user's history section.

In qa-page.php I found the according link at line 652:

            $qa_content['navigation']['user']['updates']=array(
                'url' => qa_path_html('updates'),
                'label' => qa_lang_html('main/nav_updates'),
            );

 

How to set the user path (i. e. get username) at:

                'url' => qa_path_html('user/theusername?tab=history'),

?

1 Answer

0 votes
by
edited by

Well, I decided not to hack the q2a core (because in this case I couldn't find out how), so I did with lovely jquery:

    // change link of "my updates" to user history
    $('a[href$="./updates"]:first').attr('href',  $(".qa-user-link:first").attr('href')+"?tab=history" );

    // extra for 2nd level navigation
    $('a[href$="../updates"]:first').attr('href',  $(".qa-user-link:first").attr('href')+"?tab=history" );

 

and it works :)

...