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

I'm using basic editor. If I paste some url like this, https://www.google.co.in/ it should automatically fetch the anchor text from URL-title. Like this : Google . Is there any way to do this in q2a? 

1 Answer

+2 votes
by

I think that it can come true by plugin ( filter_question() / filter_answer() ). However, because it is so difficult, I don't recommend. The reason... It is necessary to consider inner link and mail anchor type. In addition, response performance may worsen by link count and other web site's load state.

It's my just hint. Probably, it is incorrect.

Module reference:
http://www.question2answer.org/modules.php?module=filter

Plugin process.

  1. User clicks submit button.
  2. Called filter_question() / filter_answer() function of your plugin from Q2A core.
  3. Pull out link tags inner content by preg_match().
  4. Get HTML contents by wget() / file_get_contents().
  5. Pull out <title> attribute inner HTML by preg_match().
  6. Replace value of link tags to title.
...