Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.1k views
in Q2A Core by

My site has the same bug like this: http://www.question2answer.org/qa/11447/1-5-beta-bug-no-selected-class-for-extra-links-in-page-menu

But I can't update my site to V1.5.1 or V1.5.2  since I have done many changes.I know the newest version has fixed it, how can I fix it in version V1.5?

Tks

 

Q2A version: v1.5

2 Answers

0 votes
by

One way would be to check the diffs on Github: https://github.com/q2a/question2answer/commits/ the code changes will be in there somewhere.

Alternatively, if you have marked all your custom changes (i.e. with a special comment) you can backup your Q2A, overwrite with the new version, then copy your changes back.

By the way, it's very likely that most of your changes could be made via plugins or an advanced theme.

by
This feature of Github is so cool! I think I will be the fan of this site.
Actually, I always want to change the code in a controllable way, but never do. Maybe I must begin to find out and mark all I have changed.
0 votes
by
edited by

I find the answer,update qa-page.php, like below:

 

foreach ($qa_content['navigation'] as $navtype => $navigation)
if (is_array($navigation) && ($navtype!='cat'))
foreach ($navigation as $navprefix => $navlink)
if ((substr($requestlower.'$', 0, strlen($navprefix)) == $navprefix)||(strtolower(@$navlink['url'])==$selfpathhtml))
$qa_content['navigation'][$navtype][$navprefix]['selected']=true;
 
but then the next bug appears:
 
...