December 10, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts

[Suggestion] enable auto-linking of classes in quoted source to the Qt Documentation

Page  
1

When sample code is provided in the wiki or in the forum, Qt classes used should be linked to their documentation.

I think this should be easy with a parser in Java|Script : Iterating over the appropriate class, then scanning for the QUppercase pattern and modify the DOM element (it’s alreade highlighted).

BTW: next bug found: “Java|Script” (try to remove the pipe char in a posting, then preview)

17 replies

December 10, 2010

Franzk Franzk
Lab Rat
831 posts

It would even be handy if there was some tag we could use to link to the documentation. QtCentre has the feature you mention, but also this: [qtclass]QString[/qtclass], which would result in a link much like QString [doc.trolltech.com] (no [doc.trolltech.com] behind it would make sense in this case — it’s autolinked).

It would be cool if that was available as well.

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

December 10, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts

I’d prefer a full-automated version. Optional markup for code blocks should include only things like:

  • qtversion=[spec] – for explicitly definition of the Qt version used, default is last stable
  • nolink – to inhibit auto-linking

I had already started to implement it, but I’m a java|script beginner (albeit highly motivated ;))

December 10, 2010

Franzk Franzk
Lab Rat
831 posts

Automated in code blocks, yes. Outside, not necessarily.

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

December 10, 2010

Bradley Bradley
Lab Rat
314 posts

I am, of course, in favor of a auto-linking to docs feature. :)

 Signature 

Nokia Certified Qt Specialist.

December 10, 2010

Alexandra Alexandra
Hobby Entomologist
607 posts

I heard a similar suggestion for bug reports. I wonder though, if all the linking won’t confuse people or make the posting itself hard to read. I am all for connecting the forum, the wiki and the documentation as seamlessly as possible.

What do you think about auto-tagging instead of auto-linking? It’s an extra step, that’s for sure, but one would get related content alongside with the documentation.

 Signature 

*THE CAKE IS A LIE*
Web Community Manager - Qt Development Frameworks

December 10, 2010

Bradley Bradley
Lab Rat
314 posts

If the doc links could be made to not have the [domain], I don’t think they would make postings hard to read.

I think tagging and linking serve different purposes. Tagging is useful for finding related posts in the forums. Docs linking is useful for quickly accessing references relevant to the discussion.

 Signature 

Nokia Certified Qt Specialist.

December 10, 2010

Alexandra Alexandra
Hobby Entomologist
607 posts

Point taken. We will look into it.

 Signature 

*THE CAKE IS A LIE*
Web Community Manager - Qt Development Frameworks

December 10, 2010

Bradley Bradley
Lab Rat
314 posts

Note that the [domain] is good in general, especially links to external sites. Although the browser tells me as well, I do like the reenforcement for general links. However, for internal or docs links, I don’t think it is necessary.

 Signature 

Nokia Certified Qt Specialist.

December 10, 2010

disperso disperso
Lab Rat
183 posts

I think that the “[domain.tld]” might be useful to fight against malware, spam, links to NSFW content, etc., but it’s really the intended audience of this site is probably aware enough of this practices to avoid them.

December 10, 2010

Bradley Bradley
Lab Rat
314 posts

Yes, and since internal or other domains under Nokia control are not a thread, the [domain] notations are not necessary.

 Signature 

Nokia Certified Qt Specialist.

December 10, 2010

Franzk Franzk
Lab Rat
831 posts

Alexandra Leisse wrote:
I wonder though, if all the linking won’t confuse people or make the posting itself hard to read.
Which is why the auto linking or doc linking should not contain the [domain] thingy. In any case, you can have a look at the QtCentre forum. Linking to Qt docs is very simple and doesn’t really interfere with the message. Inside code tags auto-linking is enabled, which really isn’t a pain in the butt either.

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

December 11, 2010

GordonSchumacher GordonSchuma..
Lab Rat
93 posts

Indeed – the other thing worth mentioning there is that it would be nice to have easy wiki links – perhaps using “wiki://”? :)

December 11, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts

Alexandra Leisse wrote:
What do you think about auto-tagging instead of auto-linking?
What is auto-tagging? If it means that some tags are added automatically, I think this is a bad idea in most cases. Maybe some forum-specific tags (such as beta, wiki, devnet) could still be useful.

December 11, 2010

Bradley Bradley
Lab Rat
314 posts

Wolf P. wrote:
Alexandra Leisse wrote:
What do you think about auto-tagging instead of auto-linking?
What is auto-tagging? If it means that some tags are added automatically, I think this is a bad idea in most cases. Maybe some forum-specific tags (such as beta, wiki, devnet) could still be useful.

If auto-tagging is like that, it won’t provide quick access to the docs.

 Signature 

Nokia Certified Qt Specialist.

December 11, 2010

GordonSchumacher GordonSchuma..
Lab Rat
93 posts

Auto-tagging could be useful, but 1) I agree with Bradley that it’s quite a different question from auto-linking, and 2) I would be a little surprised if it could be done very well, until we have a script which can parse English well. Hmm…

Actually, I take that back. If the tagging system were set up to feed the posts through CRM114 [crm114.sourceforge.net], I bet it actually could do a decent job of auto-tagging!

Page  
1

  ‹‹ Another Project Elf SPAM?      [Suggestion] Add a list of categories to Forum Home ››

You must log in to post a reply. Not a member yet? Register here!