Home
Random
Recent changes
Special pages
Community portal
Preferences
About Sundering
Disclaimers
Sundering
Search
User menu
Talk
Contributions
Create account
Log in
Patches
|
Items
|
Quests
|
Creatures
|
Dungeons
|
NPCs
Attributes
|
Skills
|
Titles
|
XP Augmentation
|
Luminance Augmentation
|
Tailoring
Character Creation
β’
New Player Guide
β’
User Interface
β’
Glossary
Editing
Forum:Filtered Whatlinkshere Results
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Forumheader|General}} <!-- Please put your content under this line. Be sure to sign your edits with four tildes: ~~~~ --> {{Post | Indent = : | Text = For a while now I've been trying to figure out a way to get more specific Whatlinkshere results, ideally we could filter results by category however I've been unable to discover any way of doing that currently. I have however come up with a partial solution for at least some types of items that would be easy to implement and could be changed if needed without lots of cleanup edits. I realized that it's possible to make invisible links on pages (a link that isn't actually displayed, but will cause the page to show up in the whatlinkshere list) and that you can also have a whatlinkshere link to a nonexistent page, which allows us to specify a page for a specific type of links we want to filter for (just Shopkeepers, just Creatures, just Locations, etc). These special links can automatically be included in component templates. For example, to get a list of just shopkeepers that sell a particular item, we can place this: <nowiki>[[{{PAGENAME}}/Sold By|<nowiki></nowiki>]]</nowiki> inside the <nowiki>{{Inventory Item}}</nowiki> template since it is only used on [[:Category:Shopkeeper|Shopkeeper]] pages. This would automatically create a link to each item for that shopkeeper of the format [[Item/Sold By]] which would then be used in the <nowiki>{{Sold By}}</nowiki> template which would be modified from a straight whatlinkshere link to <nowiki>[[:Special:Whatlinkshere/{{PAGENAME}}/Sold By]]</nowiki>. So instead of including all links (like recipes and patch pages etc, it would only list shopkeepers. I was trying to think what else we could use this for and so far I've come up with: * Items included in recipes. * Creature locations (I will need to make a component template for creature lists that will be closer to item lists). (I'm leaning towards being able to specify the type of location as well, so we could get separate lists for dungeons and landscape locations). * Trophies (may not be possible without changing the template in a significant way). Are there any other ones that would be good to include? Also input on whether to include this for just item types that generate big lists and skip smaller ones that could be ready through quickly, or to do this for them all.--[[User:Tlosk|Tlosk]] 11:17, 10 May 2009 (CDT) }} {{Post | Indent = :: | Text = That's a very clever solution. I was going to suggest looking at the Semantic MediaWiki extension, but it appears that it doesn't support to-many relationships (like the shopkeeper selling multiple items). --[[User:Widgeon|Widgeon]] 17:29, 11 May 2009 (CDT) }} {{Post | Indent = :: | Text = I'm not sure I understand exactly how this will work, but if you say we can just modify the templates and it will work, then it sounds good to me. I agree with the things you listed. I would divide creatures into 3 types instead of 2: Dungeons, POIs, and general landscape - the listings found in Geographic Area and Town pages. --[[User:An Adventurer|An Adventurer]] 18:10, 11 May 2009 (CDT) }} {{Post | Indent = ::: | Text = Yeah it's kind of convoluted, but thankfully the implementation is transparent and a poster doesn't have to do anything different. However once implemented it will break existing vendor/recipe links so I'm going to wait until we finish updating existing entries with the new templates to turn the key so to speak (in the meantime we'll just get the full list of links like normal). But so you can see it in action, here's a hardcoded example: Old style (all links) for [[Stout]]: This item is sold by [[:Special:Whatlinkshere/Stout|one or more shopkeepers]]. New style (just shopkeepers) for [[Stout]]: This item is sold by [[:Special:Whatlinkshere/Stout/Sold By|one or more shopkeepers]]. This first one finds all pages that link to "Stout," but the second one just the pages that link to "Stout/Sold By" and that's only the pages using the new shopkeeper template. --[[User:Tlosk|Tlosk]] 20:11, 11 May 2009 (CDT) }}
Summary:
Please note that all contributions to Sundering may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Sundering:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
If you're new to the wiki, please take a moment to review our
Naming Conventions
and
Page Templates
. Using proper article names and image formats/sizes keep the wiki clean and helps avoid duplicate entries. Thanks!
Templates used on this page:
Template:Forumheader
(
edit
)
Template:Post
(
edit
)