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

Link address(relative path) of user avatar / name may not be set definitely. I want this address to be absolute path. This is because 404 error occurs when plugin calls qa_get_one_user_html() or qa_get_user_avatar_html() and plugin use this HTML at another hierarchy pages. If possible, I want to add argument to output absolute path to these API functions.

  • qa_get_one_user_html()
  • qa_get_user_avatar_html()
Q2A version: V1.6
by
I understand the problem, but why are you caching the output of these functions instead of calling them when you need them?
by
Thanks gid for your reply. I made plugin that use Ajax.
http://www.question2answer.org/qa/25217/new-plugin-notification-pro

Actually, I want to make by one SQL without using these functions. But it is difficult to generate user anchor by relation with qa_get_favorite_non_qs_map(). Because I think that engineers who make dynamic(high level) view by Ajax will increase, I hope that these function can also output absolute path.
Thanks again.
by
OK. You might find it interesting to see how qa_ajax_post(...) in qa-content/qa-page.js and qa-ajax.php work together to solve this problem by passing the qa_root and qa_request JS variables to the Ajax server-side script. The problem with using absolute URLs is you need the user to have set their site URL correctly.
by
I got it(qa_ajax_post()). Because it is slightly difficult, time is necessary for analysis. ^_^;;

Please log in or register to answer this question.

...