FlightGear wiki:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 7: Line 7:
This is also why it is important for other developers/contributors to know who came up with a certain idea and who originally supported/supports it, possibly months (or even years) after a discussion took place - which is why good ideas should not just be preserved, but accompanied by corresponding quotes, linking back to the original discussion, so that potential contributors can make up their own minds to determine if/how they want to get involved in some effort or not. The script that you can find below is intended to help with this (as well as allowing people to easily reuse forum/devel list announcements in wiki articles, e.g. to update the changelog, newsletter or "release plan/lessons learnt" section) - it allows people to easily copy&paste important discussions over to the wiki, without having to rewrite any text, and without having to put together proper cquotes manually. In fact, it's a matter of just a few seconds.
This is also why it is important for other developers/contributors to know who came up with a certain idea and who originally supported/supports it, possibly months (or even years) after a discussion took place - which is why good ideas should not just be preserved, but accompanied by corresponding quotes, linking back to the original discussion, so that potential contributors can make up their own minds to determine if/how they want to get involved in some effort or not. The script that you can find below is intended to help with this (as well as allowing people to easily reuse forum/devel list announcements in wiki articles, e.g. to update the changelog, newsletter or "release plan/lessons learnt" section) - it allows people to easily copy&paste important discussions over to the wiki, without having to rewrite any text, and without having to put together proper cquotes manually. In fact, it's a matter of just a few seconds.
Use this article's discussion page to get in touch (e.g. if there are any bugs/problems or features requests).}}
Use this article's discussion page to get in touch (e.g. if there are any bugs/problems or features requests).}}
 
== Example Output ==
The output may look like this (click the link to see the original forum posting):
{{FGCquote
  |The upcoming FlightGear version (3.2) will contain a canvas-based map dialog, including a modular "plugin" system for creating custom map layers and charts with roughly ~50 lines of code, most of it boilerplate. <br><br>This is entirely XML/Nasal based (scripted) - symbols can be pretty much anything, raster or vector images (png or svg), but even animated. Styling can be customized, too.<br><br>For more info, I suggest to check out:<br><br>[[MapStructure#Porting_the_map_dialog|http://wiki.flightgear.org/MapStructure ... map_dialog]]<br>[[File:MapStructureDialog.png|250px]] <br>
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=212558#p212558
    |title=<nowiki>Re: Get objects to show up on Map/Radar</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Sat Jun 14</nowiki>
  }}
}}
 
== Background & Installation ==
== Background & Installation ==
* A simple userscript extension implemented in JavaScript
* A simple userscript extension implemented in JavaScript
Line 18: Line 29:
* copy/mark some relevant portion of text (the script converts links, images and even youtube videos - wiki images are properly converted, too)
* copy/mark some relevant portion of text (the script converts links, images and even youtube videos - wiki images are properly converted, too)
* and directly get a full cquote paragraph (including author, date, thread and URL) that you can add to the wiki here using CTRL+C & CTRL-V  
* and directly get a full cquote paragraph (including author, date, thread and URL) that you can add to the wiki here using CTRL+C & CTRL-V  
* the output may look like this:
 
{{FGCquote
== Known Limitations ==
  |The upcoming FlightGear version (3.2) will contain a canvas-based map dialog, including a modular "plugin" system for creating custom map layers and charts with roughly ~50 lines of code, most of it boilerplate. <br><br>This is entirely XML/Nasal based (scripted) - symbols can be pretty much anything, raster or vector images (png or svg), but even animated. Styling can be customized, too.<br><br>For more info, I suggest to check out:<br><br>[[MapStructure#Porting_the_map_dialog|http://wiki.flightgear.org/MapStructure ... map_dialog]]<br>[[File:MapStructureDialog.png|250px]] <br>
* our regexes may fail once the HTML DOM of the source changes (e.g. phpBB/theme update), so we should better show a warning when that's the case {{Not done}}
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=212558#p212558
* it may make sense to provide multiple regexes that are tried in order {{Not done}}
    |title=<nowiki>Re: Get objects to show up on Map/Radar</nowiki>
* The script uses a conventional JavaScript alert() box for providing the output, these dialogs are typically restricted to a max size of ~10kb-we may need to explore other/extended options  {{Not done}}
    |author=<nowiki>Hooray</nowiki>
* The script has already seen several iterations and created dozens of cquotes we're using in various places, but it might be possible to use the script to update previously created cquotes/FGCquotes automatically, instead of using the getSelection() helper, we could register a '''match''' for wiki.flightgear.org with the '''action=edit''' set, so that we can directly process all text of an edited page (using AJAX calls to open the URL in the background would make sense) {{Not done}}
    |date=<nowiki>Sat Jun 14</nowiki>
 
  }}
== Feature Requests & Ideas ==
}}
 


== The Script ==
== The Script ==

Navigation menu