Widget talk:TreasureCardFilter/Archive 1

From Unforgotten Realms Wiki
Jump to navigationJump to search

This page is an archive. Do not edit the contents of this page. Please direct any additional comments to the current talk page.

Hey. Well done, I am impressed by how this works. The only issue I've found is that the div's for the individual cards don't have id's one the Treasures page, so we can no longer link to them eg. Treasures#Kingfisher Cloth. Which is weird, since I think you did include an id for this on this line of code:

<div class="pure-g content-box " id="<!--{$cardName|escape:'html'}-->" data-card="<!--{json_encode($card)|escape:'html'}-->"  data-cost="<!--{$card.cost|escape:'int'}-->" >

So I think this is just a bug? --Razorhead (talk) 13:31, 6 June 2015 (EDT)

Ah, yeah I added it in after but forgot to purge the Treasures page so it should all work now. I dont think I am using the same ID's as before though. What did you use for the IDs previously? Currently I am using the card name in shorterned format Plornt (talk) 14:00, 6 June 2015 (EDT)
The names of the cards. Do you manually set the ids or does the script do that? --Razorhead (talk) 14:55, 6 June 2015 (EDT)
The IDs for it currently are taken from the Widget include parameters. So like it has card.wiggly_wrench.name "wiggly_wrench" would be the ID. Im not sure I can use the name of the card as ID since it contains spaces, not exactly sure how it handles that. Plornt (talk) 15:00, 6 June 2015 (EDT)
The problem is the capitalization or lack thereof. Links don't differate between _ and spaces I think. For example Treasures#kingfisher cloth works. Skydivizer (talk) 15:41, 6 June 2015 (EDT)
Thanks, using the card name now to fit what we already had! Plornt (talk) 15:53, 6 June 2015 (EDT)
Even though the id's are the same as the redirects now, for some reason on my browser going to eg. Treasures#Kingfisher Cloth doesn't scroll the page down to the id like it does for eg. Items#Plate Armor. Does this happen for anyone else? --Razorhead (talk) 18:37, 6 June 2015 (EDT)
I think its because Widgets dont parse the text as MediaWiki syntax. This is what I thought wouldn't work earlier, because usually IDs with spaces in them dont work in HTML. I can try something to do it though without having to edit all the Redirects otherwise we're gunna have to change all the redirects or change the names of the cards in the widget on the Treasures page and then revert back to what I had previously Plornt (talk) 19:48, 6 June 2015 (EDT)
If it comes to that I'll just update all the redirect pages so it works. Just tell me if your idea works or if it doesn't, what the new id's are so I can fix the redirect pages. --Razorhead (talk) 03:59, 7 June 2015 (EDT)
I think its worked, the Kingfisher Cloth one you linked is working! Plornt (talk) 05:03, 7 June 2015 (EDT)
Awesome! This means all the redirections to cards are now working again! Super! --Razorhead (talk) 05:24, 7 June 2015 (EDT)

Sorry to bother you again, but I think that enlarging the gem icons has broken the filtering. When clicking the gems on Treasures, I get redirected to the File page for that gem. I like the larger icons though, but do you know what could've gone wrong? --Razorhead (talk) 12:09, 7 June 2015 (EDT)

Are you able to open the javascript console when you go to the page? (To open the console, on Mac hit: CMD SHIFT K, on PC use F12 - and then click on "Console" tab in the thing that appears). Then try clicking a filter (I just updated it so it shouldnt go to the file page) and screen shot what is in the console. Just so I can see whats going on as its working on my end. Thanks Plornt (talk) 12:14, 7 June 2015 (EDT)
I get nothing when clicking on the gems, but you apparently just made a typo, because the error in the console when loading the page says:
Error: Syntax error, unrecognized expression: [data-gem-data
--Razorhead (talk) 12:18, 7 June 2015 (EDT)
Ah yep! Thanks, fixed now. Not sure why it worked on my end, guessing chrome auto fixed it or something... On a side note I've just noticed we've got discussions now on these pages in the tab bar o.O Plornt (talk) 12:22, 7 June 2015 (EDT)
We've had those for a while now ;) Also, I guess you made me a mod now? Thanks! --Razorhead (talk) 12:25, 7 June 2015 (EDT)
Hah yeah, you seem pretty active and havent done anything to deface the wiki :P Thought'd Id give you deletion privlidges etc as ya may need it Plornt (talk) 12:30, 7 June 2015 (EDT)

This is a topic?

I wonder if it just adds it to the end of the talk page.