Hi,
I see both code for Favorites and Subscription in the code-base.
Will these two concepts exist in AnsPress 2.0? Or is Favorites “old” code and Subscription the new concept?
Hi,
In anspress-master\includes\user.php
the user-profile page is rendered and each tab in the menu is rendered by this code:
$o .= '<li'.( $user_page == $k ? ' class="active"' : '' ).'> <a href="'. $m['link'] .'" class="ap-user-menu-'.$k.$class.'">'.$m['title'].'</a> </li>';
This is near line 604 in https://github.com/wp3/anspress/blob/master/includes/user.php
.
I would like a change in this rendering because the current implementation has issues when you add a custom tab and use a font-awesome icon as tab-icon. Since the icon class is applied to the anchor tag, the font of the link text is affected by the font-awesome style. So could you please change the tab rendering to something like this:
$o .= '<li'.( $user_page == $k ? ' class="active"' : '' ).'> <a href="'. $m['link'] .'" class="ap-user-menu-'.$k.'"><i class="'.$class.'"></i>'.$m['title'].'</a> </li>';
So I added a container for the icon.
Only remaining issue with this replacement code is that it does not add a space between the icon and the link text. Though that should be handled in CSS (I think) and I’m not an expert in that area, so I leave that to people with more experience 🙂
Thanks,
Michiel
Hi,
I figured out how to add a custom tab to the user-profile.
I love the extension-pattern that you applied! Thanks!
One issue I found was that the tab-page which I registered with
ap_register_user_page('testtab', __('Test tab', 'ap'), array('AnsPress_User_Page_Test', 'output'));
came first in the menu list. Probably because I called the ap_register_user_page
too early.
Anyway, it started me thinking that things might get nasty when multiple plugins want to add a tab -> in which order will they be added?
So I have made some changes to the anspress-master\includes\user.php file in such way that you can now specify an order when registering a tab:
ap_register_user_page('testtab', __('Test tab', 'ap'), 90, array('AnsPress_User_Page_Test', 'output'));
If you agree to it, you can find the changes here: https://www.dropbox.com/s/l2mu2mtfv1kiwwa/user.php?dl=0
I have all the changed sections marked with the //MVRM
comment, so you can easily find my changes.
Greetings,
Michiel
Will you remove the rank, Point, badges stuff and create extensions?
Will you add back the “Direct link to answer” Thing? (https://github.com/wp3/anspress/issues/112)
And please comment on the following issues on github (or close them if its already implemented):
https://github.com/wp3/anspress/issues/230
https://github.com/wp3/anspress/issues/229
https://github.com/wp3/anspress/issues/226
https://github.com/wp3/anspress/issues/225
https://github.com/wp3/anspress/issues/224
https://github.com/wp3/anspress/issues/223
https://github.com/wp3/anspress/issues/222
https://github.com/wp3/anspress/issues/221
https://github.com/wp3/anspress/issues/220
https://github.com/wp3/anspress/issues/219
https://github.com/wp3/anspress/issues/209
https://github.com/wp3/anspress/issues/207
https://github.com/wp3/anspress/issues/202
https://github.com/wp3/anspress/issues/181
https://github.com/wp3/anspress/issues/171
https://github.com/wp3/anspress/issues/161
https://github.com/wp3/anspress/issues/152
https://github.com/wp3/anspress/issues/151
https://github.com/wp3/anspress/issues/111
https://github.com/wp3/anspress/issues/109
https://github.com/wp3/anspress/issues/107
https://github.com/wp3/anspress/issues/106
https://github.com/wp3/anspress/issues/102
https://github.com/wp3/anspress/issues/101
When you select an answer as best answer, the button markup does not update.
The text remains “Select Answer” and the markup remains the same: white button with green border.
Only after refresh, the button is completely green and the text is “Unselect Answer”.
The registration of best answer seems to work correctly though.
Hi,
If you add a comment to an answer of a question, you cannot edit that comment anymore unless you first refresh the page.
Hi,
I found that the user who posts an answer to a question can mark his own answer as best.
This does not work right after submitting the answer, clicking at that moment on the “Select Answer” button does nothing.
But after page refresh the user who posted the answer can select it as best answer.
Shouldn’t it be so that only the user who asked the question can select best answer?
In the new version, I have a huge style bug on the question page:
http://zoker.me/go/ryxjQ
The main content is above all the other content…
Also the url style is very strange, should be “site.com/support/question/’question-name'”
When registered user answered once he/she could not answer second time it asking again please login/register to ask. Also some one comment not answer their comment also appering at the bottom of the page. Could you help me thank you
If you go to the overview page of a given tag (eg: http://localhost:8080/questions/question_tag/php) you get a Not Found page.