Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Feature Request: Change Direct question URL to question title

+7 votes
243 views
asked Aug 6, 2015 in Q2A Core by Gurjyot Singh
It is one of the best feature that other QA softwares offer. If we paste a link to a question either complete or with question ID then instead of that link, the Question title should be shown there. The question title will be linked to that question.

Not only in answers or questions but also in comments and wall posts this would be awesome.
commented Aug 7, 2015 by steven2
It sounds great but I Don't know how users like their links display as title, without them asking for it?
commented Aug 7, 2015 by Gurjyot Singh
Its the same way in Facebook. It never asks you to show just a link or some summary of the page.
Similarly if the link is from the same website then that should show as Question title.
commented Aug 7, 2015 by Gurjyot Singh
Hello @igael... I don't understand what you needed to say. But all I want is, if we paste a link from the same website then it should take the form of a question to which it is linked (either with some summary of it or not).

2 Answers

0 votes
answered Aug 11, 2015 by Scott
Pretty good idea! This would be quite straightforward to do with a filter plugin.
+1 vote
answered Aug 12, 2015 by q2apro

I needed to read your post three times to understand what you mean :)

So:

1. an internal link to another question gets posted, like that: http://www.question2answer.org/qa/29743/edit-by-bothering-too-many-people

2. Instead of the link, in the post text it appears like: "Edit by" bothering too many people

What to do:

1. As Scott stated, you need a filter plugin. This has to check the text for http://yourdomain.com/

2. As soon as you find such an internal URL within the text, you need to extract the /postid/ (questionid)

3. Then you want to call the database and receive the title of the question.

4. Finally you replace the <a href="URL">HERE</a>, the HERE with the title.

Not super easy but possible in 2 - 3 hours, I'd say.

...