User:Daric Gaersmith/Templates/ResetSandbox/archive 1

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search
This is an archive of past User_talk:Daric_Gaersmith/Sandbox/Pa discussions. Do not edit the contents of this page, except for maintenance such as updating links.
User-Daric Gaersmith-sandbox pa.png The following discussions took place while this template was being created in my sandbox. There is some useful information here that may still be useful if other Editors want to make use of this template for themselves.

Wondering What I'm Doing?[edit]

I want my Sandboxes to be able to declare for themselves what their current purpose is, so that every time I change the use of a Sandbox I don't have to update my profile page and my Userspace Layout template. I want to be able to simply {{subst}}itute this info in from a userspace template, one that has the ability to {{#define}} and then {{#save}} a parameter called purpose, which will contain a text string value which gives a short explanation of the current use / purpose of the Sandbox. I envision being able to reset one of my Sandboxes with this simple command...

{{subst User:Daric_Gaersmith/Templates/ResetSandbox | purpose=Revamping the [[Lore:Vampirism]] page.}}

If I can get it working with {{#listsaved}} and move it to Template space (as per below), it could be even easier, for example...

{{subst ResetSandbox | purpose=Revamping the [[Lore:Vampirism]] page.}}

Also parameters for {{Editing Allowed}} could be included to make collaboration in Sandboxes even easier to set up.


Using the Information[edit]

This then will be read in from the Sandbox page whenever my profile page or my Userspace Layout template is loaded. Each Sandbox will have its own purpose variable, and I can then iterate through them using a {{#load}} from the Sandbox page to get at the current value of purpose, followed by a {{#define}} to make a local copy of the value, and then the purpose variable is {{#unset}} so that it can be reused for the loading of the purpose from the next Sandbox.

The reason for doing it this way is that, as mentioned on the Metatemplate instructions, "{{#load}} will not override existing variables of the same name." The way around this is apparently to use {{#listsaved}}, but I don't know how to apply that to a set of subpages of my userspace yet. If anyone can give me some advice, (or even just some Jak), I'd really appreciate it. Darictalk 12:01, 16 March 2013 (GMT)

If I could work out how to apply {{#listsaved}} to a set of subpages in a userspace, I could bottle it and sell it to other editors on this wiki, so that any pages under User:<AnyUsername>/Sandbox/ could be checked to see if they have a purpose variable. Just an idea of how useful this could be. Darictalk 12:14, 16 March 2013 (GMT)
I'm not sure I've understood everything you're proposing, but two things come to mind: first, you may or may not want to implement a "user" variable as well or calling the template would list everyone's sandboxes rather than just your own, I think. If you assume that any call will always be in the user's space, you'll be able to get a template to figure out the user using #titleparts, though, which may be a better method overall.
Second, I don't think you need to do the whole #define/#unset thing. Putting the #load in the template then displaying the text is sufficient. The next time the template is called, it starts off fresh. You can see that if you look at an old copy of one of my sandboxes...the various Ayleid Ruin descriptions are loaded and displayed by {{Place Link}} in turn in the same way I think you're proposing would be done for your sandboxes. Robin Hood  (talk) 19:08, 16 March 2013 (GMT)
Thanks for the input RH. Your example is what I would say is a "textbook case" of using {{#listsaved}} the way it was meant to be used. I'm trying to apply it to my own userspace, and that is where the problem you identify above, of finding everybody else's Sandboxes, hits. I'm having a look at {{#titleparts}}, thanks for that tip. I couldn't find any information about it on our wiki, so had to Google it. I see how it could help with this, yes.
As for "the whole #define/#unset thing", I did that because I was worried about {{#load}} ignoring the contents of the purpose variable for subsequent Sandboxes on the same load of the page. The idea is that an Editor might have multiple Sandboxes in their userspace, and I want to be able to get at the purpose for each one individually. Sure, if I can get {{#listsaved}} to work, then "the whole #define/#unset thing" would be redundant. I'll have a go with your example and {{#titleparts}} together. Thanks again for your help. Darictalk 22:01, 16 March 2013 (GMT)
I've just been thinking about it, and I think you'll still end up having to implement a user variable. Have fun playing. Do you want me to set up a #save'd purpose in one of my sandboxes, just so you can be sure yours are working correctly? Robin Hood  (talk) 22:53, 16 March 2013 (GMT)
That would be really helpful, actually, so that I can make sure my code doesn't reference anyone else's Sandbox purpose. Hey, any idea why it takes so long to update? I have tried purge and tried bypassing my browser's cache (Shift-F5 for Firefox) but nothing seems to change until a couple of hours later. I guess it has something to do with how {{#save}} saves the information in the database, but I'm not sure. Instant gratification is always preferred, but the delay is not such a bad thing in this instance, as the purpose of an individual Sandbox should not change within the couple of hours it takes to reflect the last change. Darictalk 23:10, 16 March 2013 (GMT)

() Done. Feel free to alter the sandboxes for any reason if you need to. As for the delay, from what we've experienced elsewhere, it seems you might have to save the page more than once in order to get it to update properly. That's about all I can suggest. Robin Hood  (talk) 01:21, 17 March 2013 (GMT)

"save the page more than once" That worked almost instantly! Very strange, and something I'd need to be mindful of in future when using this template. It is also probably a strong reason NOT to release this to the great unwashed, unfortunately. If anyone likes what I'm doing here, they're welcome to copy it once it is completed, but I won't be moving it to Template space unless this need for saving the page more than once can be resolved. Otherwise, the gains from not having to update a profile page when resetting a Sandbox are lost and Patrollers become unhappy. Darictalk 03:25, 17 March 2013 (GMT)
Actually, I just thought, once this is all working properly, I intend to use it by {{subst}}ituting it into the Sandbox in question, so that gives an extra save anyway. I hope that will be sufficient to kickstart the update to the database. Darictalk 03:34, 17 March 2013 (GMT)
So, I gave up trying to template this, as it was just too difficult. Whenever I tried to {{subst}}itute in the code, it would bring in everything, including everything that was inside <noinclude>..</noinclude> blocks. Instead, I have just added it to my Templates page, so that each time I want to reset a Sandbox and give it a new purpose, I just go there and copy the code, edit the Sandbox in question, and replace all the existing code with the code I copied. My dreams of bottling it and selling it to other editors on this wiki are over. It is something I will defintely use in my own userspace, as it still achieves its intended purpose, of alleviating the need for edits to my profile page and my Userspace Layout template every time I reset a Sandbox.
I couldn't even get that working, which should have been the easy part for me. So I never did get around to trying to use {{#listsaved}} and your example, Robin Hood, but thanks anyway for all your help with this. Darictalk 08:07, 18 March 2013 (GMT)
No problem, happy to help. I may give it a try at some point, but this whole conversation makes me realize that it's not as easy as it sounds on the surface. Robin Hood  (talk) 08:21, 18 March 2013 (GMT)

It's Alive![edit]

I finally worked out how to get this all working properly, and it doesn't need to be {{subst}}ituted at all. Thanks Robin Hood, you have been a great help. At present everything is working as I had expected it to. I am ready to move this to my own templatespace and start using it. It would be implemented like this...

{{User:Daric_Gaersmith/Templates/ResetSandbox
|sndbx=pa
|purpose=This is where the purpose goes.
|collab=user
|users={{user|RobinHood70}}, who has been so helpful in getting this working.
}}

As I have noted in the docs for it, there is still room for improvement, using {{#titleparts}} to automatically capture the name of the sandbox from the pagename. I could then make some generic icons to replace my nice custom ones for others to use, and maybe incorporate rpeh's box template code into it, so that users can select their own colors, and then, then... it will be ready for bottling and selling. Darictalk 02:47, 21 March 2013 (GMT)

Additional ideas — rather than incorporating rpeh's box template code into it, we could just move the box code into Templatespace, as I had suggested before. Of course, to make this work for other editors, it would also require that sndbx be added to the {{#save}}. Then we could use your fandangled {{#listsaved}} to iterate over all the sandboxes within a user's userspace. But that's getting ahead of myself. Darictalk 03:01, 21 March 2013 (GMT)
If this is moved to Templatespace, the picture in the left of the box could be made static, and could be something more Elder Scrolls related, such as a picture from the ashlands or of Solstheim, to represent sand in a "sandbox". A custom image using the Creation Kit to show a child sitting down amongst the ash, with some toys (such as a "shrinkified" pitchfork, shovel and bucket) would look really cool. I don't have the CK myself, so I'd need some help with that. It would be much simpler to have the image as static. Mine is more complex than it probably needs to be. Darictalk 04:33, 21 March 2013 (GMT)
I definitely think the box would make sense to move to Template space, since a number of people use it. I'll look more at the rest of this tomorrow...I'm too tired to focus properly right now. Robin Hood  (talk) 04:35, 21 March 2013 (GMT)
As I have indicated below, I have forked this to my own templatespace. Having a sandbox filled with sand that defines a sandbox template means that I cannot set a purpose for this particular sandbox, as it would conflict with the sand that is already here. I might just migrate/archive this discussion to User:Daric_Gaersmith/Templates/ResetSandbox/archive_1 for posterity, and reset this sandbox. There are still some useful ideas in here and some great input from RobinHood that shouldn't just get consigned to this sandbox's History. Any comments, or requests to continue developing this for the general Editor community, should be lodged here within the next 48 hours, before I reset this sandbox. Daric 13:47, 26 March 2013 (GMT)

Rolled Out To My Own Templatespace[edit]

Version 1152794 of this Sandbox template, and its associated documentation, has now been migrated to my own templatespace and I am satisfied with its functionality for my own use as is. Any further edits to this sandbox are purely for the benefit of other editors who may also want to make use of this template. See the discussion above for some ideas about how it can be improved for general use. Darictalk 09:43, 21 March 2013 (GMT)