Kaydeethree (talk | contribs) (v0.6. getting started on the other parser.) |
No edit summary |
||
Line 59: | Line 59: | ||
:::::What about icons? --{{User:Pcj/sig}} 19:41, December 5, 2009 (UTC) |
:::::What about icons? --{{User:Pcj/sig}} 19:41, December 5, 2009 (UTC) |
||
::::::Obviously I'm going to have to make a few concessions to get non-displayable info parsed: icon, quality, qbegin to name a few. I'm in the middle of writing the parser for this syntax now, see /tooltip for what I've got so far. --<span style="border-bottom: 1px dotted;cursor:help;" title="WoWWiki bureaucrat">[[User:Kaydeethree|k]]_[[User_talk:Kaydeethree|d]]<sup>[[Special:Contributions/Kaydeethree|3]]</sup></span> 08:34, December 6, 2009 (UTC) |
::::::Obviously I'm going to have to make a few concessions to get non-displayable info parsed: icon, quality, qbegin to name a few. I'm in the middle of writing the parser for this syntax now, see /tooltip for what I've got so far. --<span style="border-bottom: 1px dotted;cursor:help;" title="WoWWiki bureaucrat">[[User:Kaydeethree|k]]_[[User_talk:Kaydeethree|d]]<sup>[[Special:Contributions/Kaydeethree|3]]</sup></span> 08:34, December 6, 2009 (UTC) |
||
+ | |||
+ | I take it the auto-cat is out the window now? {{User:Coobra/Sig4}} 09:02, December 6, 2009 (UTC) |
Revision as of 09:02, 6 December 2009
So... Cataclysm is coming. We're going to have to change all ~31,500 item tooltips anyway.
Why not take advantage of this to kill {{Tooltip}} and roll our own extension written in php? One less interpreted language to deal with and it'll still work with things like {{Item}}.
Things to keep in mind:
- We only will have 11(ish) stats to keep track of instead of the 20+ we have now:
- character sheet five: agility/intellect/spirit/stamina/strength
- Bonuses still on gear: armor/block (shields only)/crit/haste/hit/mastery
- I intend to have those attributes/bonuses explicitly listed and not defined as
|attrib=+125 stam<br/>+250 int
- Syntax on wiki-pages will be slightly more humane than what we're having to do now.
On-article syntax I've been thinking about would be something along the lines of:
<item name="kd3's awesome item"
id=12345 <!-- will be mandatory in the tooltip itself, even though we're not going to display it like we do for quests -->
icon="inv weapon thunderfury"
q=e <!-- "quality: epic". type as much or as little as you like as long as you're not being ambiguous -->
b=p <!-- example: e-equip, p-pickup, u-use, a-account. you could also use the keywords bop/boe/bta/bou -->
unique <!-- just the presence of the keyword is enough. if it's special--Unique (50), u=50 will work -->
armor=123
type=2h sword <!-- cloth head? back? gun? ->
block=9001
sta=22 <!-- explicitly defined! item doesn't have any stamina? don't add it -->
int=22
str=22
agi=22
spr=22
hit=150
haste=300
crit=450
mastery=9001
equip="Something special not covered by hit/haste/crit/mastery"
use="A use line too"
read
open
lock=450
/>
The parser needs to do the grunt work, not secondary users like {{item}} or the javascript tooltips and especially not random users trying to add tooltips to the wiki. Chances are this is going to require changes to item/itembox/etc, but not if it can be helped. I dunno about the auto-categorization issue either.
Thoughts? I have yet to write any code; that's going to start soonish. --k_d3 01:40, December 2, 2009 (UTC)
- This would probably be best done using Semantic MediaWiki, otherwise I'm pretty sure it would require some fancy template work to make it work with {{loot}} et al. --Pcj (T •C ) 01:43, December 2, 2009 (UTC)
- If we could get it to work that way it'd be better. The question is, will crucially kill us in our sleep for enabling SMW on wikia's biggest wiki? --k_d3 01:47, December 2, 2009 (UTC)
Though if we do go the SMW route I'd probably shelve the tooltip extension option and reconfig {{Tooltip}} to handle the semantic metadata instead.- Saner on-article syntax is key whatever route we choose. --k_d3 02:49, December 2, 2009 (UTC)
- I'm not sure whether shifting some part of this implementation to PHP is a good idea -- the extension would probably not be editable by most users/admins, so the turnaround time for any updates it would require is a concern. From here, the XML tag syntax isn't much better than MW's template syntax; we could probably just as easily clean up the tooltip template to look about the same. [Performance-wise, it's worth investigating how template output can be cached.]
- If we're going the full-blown PHP extension route, it might be more interesting to have things like <tooltip item="12345"/> and let the software be responsible for maintaining a cache of item stats. There is a potential issue with PTR or uncommon items, but perhaps that can be addressed in some fashion. -- foxlit (talk) 03:26, December 5, 2009 (UTC)
- The more simple the on-wiki syntax the extension is able to parse the better. I'm still in the "let's get something written; ease of use be damned" phase. Feel free to tweak my code, though I should probably put it on github or gcode to be easier. Without even me trying to, my little testwiki's already caching what output I'm creating, so I expect explicitly putting mostly-formatted tooltips in the message cache and then pulling from the cache for js tooltips/etc will only help keep crap from hitting the database.
- We still need to define the items on-wiki somewhere (so we can handle ptr/beta stuff), but yah, my intent for doing this is to get items directly in the database so we can reference stuff by its id/name and not have to overload {{tooltip}} yet again. Probably by (ab)using SMW if crucially doesn't kill us for suggesting it -- I'd rather not have to define "yet another wow item schema"... That is, if he'd ever get on irc when I am.
- Want to display an itemlink for {{item}}? <itemlink id=foo> or <itemlink name="bar">. Want to get an icon for {{costitem}} or {{itembox}}? <icon id=foo>. And so on.
- Re updates to the code -- how often do we have to change {{tooltip}}? Every few minor content patches with big changes centered around expansions? (Guess why I'm trying to do this now...) If the turnaround time is under a day or two I don't see much pain to be had. --k_d3 04:37, December 5, 2009 (UTC)
- Up to v0.5. The parser for key-mode is nearly done. Still need to write code for unique[-eq], set pieces and locked. Still thinking about how to handle the native language case (think: copy/pasting a tooltip from the armory/wowhead/curse in to our edit box and having it work properly). I'll probably come up with an answer when I wake up. (Yay sleep!)
- Also trying to decide how I want to put items in the database. Ideas? Please poke crucially/uberfuzzy if you see them on IRC. The techs need to be in on this too. --k_d3 08:57, December 5, 2009 (UTC)
I take it the auto-cat is out the window now? (Sssss/Slithered) 09:02, December 6, 2009 (UTC)