User talk:Technical 13/Scripts/OneClickArchiver

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Technical 13 (talk | contribs) at 17:35, 15 June 2015 (→‎Changing default sequence to match numbered archives: {{Resolved}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Change in behavior

FYI, I had to change {{Archive basics |archive=User talk:Tom.Reding/Archive %(counter)d |counter=1 |maxsize=153600}} to {{Archive basics |archive=User talk:Tom.Reding/Archive 1}} for OCA to work for me. The last time I successfully used it was 00:23, 13 March 2015‎, the day before the last update.   ~ Tom.Reding (talkcontribsdgaf)  01:16, 22 March 2015 (UTC)[reply]

  • The script looks for each parameter to be on its own line. I am pretty sure it inherited that trait from its predecessor (which was a lot more strict as to spacing and whatnot). I've fixed your specific instance and I'll look at fixing the source soon. :) — {{U|Technical 13}} (etc) 03:01, 22 March 2015 (UTC)[reply]

Only on users' talk page

Leaving this here in case this is useful for anyone else.

I didn't want risk hitting an archive button on a page where I shouldn't. The below should restrict loading the script to the users' own talk page.

if (mw.config.get( 'wgCanonicalNamespace' ) === 'User_talk' && mw.config.get( 'wgUserName' ) === mw.config.get('wgRelevantUserName')) {
	importScript( 'User:Technical_13/Scripts/OneClickArchiver.js' );// Backlink: [[User:Technical_13/Scripts/OneClickArchiver]]
}

Let me know if there is a better way!

Cheers. — Strongjam (talk) 17:43, 30 March 2015 (UTC)[reply]

Strange error message, at least it's strange to me...

I just updated to the newest script, and when I hit archive, the following error message popped up (Safari v8.06):

OneClickArchiver errors!
The following errors detected:
  Unable to find |headerlevel=
     Default value: 2
  Unable to find |archiveheader=
     Default value: "{{Aan}}"

It archived the section I wanted to archive with seemingly no issues other than the error message.  ???? Is there something I need to do to fix it? AtsmeConsult 16:23, 10 May 2015 (UTC)[reply]

  • What OS (Mac OSX, Win7, X11(linux/android), etc)? Those messages are just to inform you the since information is missing from the archival template, the script assumed those values as needed. Usually they don't show up unless asked for. — {{U|Technical 13}} (etc) 16:42, 10 May 2015 (UTC)[reply]
  • My fault - I went back into common.js to make sure I added the script correctly and found where I left part of the old script in tact - deleted it and all works fine. Sorry to have bothered you. (PS: Mac OS X Yosemite) As you probably know by now, code is not my forté. Thanks for all you do. WP would be downgraded a notch without you. 🌹AtsmeConsult 16:48, 10 May 2015 (UTC)[reply]

Hi could someone explain how to use the OneClickArchiver?

Hi, could someone explain how to use the OneClickArchiver? I followed the scant instructions given and nothing really happened. How do I use this? Thanks. Softlavender (talk) 09:13, 11 May 2015 (UTC)[reply]

UPDATE: Never mind, I've figured it out. Softlavender (talk) 09:31, 11 May 2015 (UTC)[reply]

Multi-click archiver?

Just a suggestion but if possible maybe the ability to click several sections at once? Rather than individual edits for each thread, which can fill up watchlists. –xenotalk 23:07, 18 May 2015 (UTC)[reply]

  • xeno, it's already on the todo list. I'm actually quite busy with school and RL right now, but hopefully I will have a little more time to work on that later. I don't know if you noticed, but the new feature I added so that it can respect maxarchive size and update the counter actually runs as two separate edits. Once I have time to rework it and merge those into a single edit, then I'll be in a much better place to allow archiving multiple sections in one shot. I also need to figure out how that will work in regards to max size restrictions, should it try to put as many sections in the current archive as possible and then start the new one or go the easier root of just putting everything in the current archive and increasing the index? Should it check if the current archival will push it over the limit and if so increment before archiving? Currently it puts it in the current and then increments, but I'm worried that doing that for multiple sections may result in pages that are way too big for a single archive. Anyways, it is on the todo list, but I have a lot to think about as to what and how and no time at the moment. Thanks for reminding me about it though and letting me know it is still a desired feature. :) — {{U|Technical 13}} (etc) 23:54, 18 May 2015 (UTC)[reply]

Changing default sequence to match numbered archives

Resolved

Ok - the archive counter on my user TP is currently set to #10. The archive counter on a different TP I'm archiving is currently set to #2. When I clicked on the archive button beside the sections it didn't archive to 2, it created an archive for 10 which is my TP counter How do I get the archiver to sync up to the correct archive number on a given page instead of following my TP sequence? Atsme📞📧 21:09, 27 May 2015 (UTC)[reply]

@Technical 13: ^^ does the issue I described above sound anything like the issue John Carter had over at AN? Atsme📞📧 02:04, 29 May 2015 (UTC)[reply]
  • Sorry Atsme, I had been away and then as soon as I got back I had other stuff to deal with. This post is kind of stale, and I'm not sure what you are pointing to on ANI. Could you elaborate or link me to the archived discussion please? I apologize in advance for being kind of scatterbrained right now. — {{U|Technical 13}} (etc) 16:11, 15 June 2015 (UTC)[reply]
Ok - from memory - (uh oh) - I have archiver going well on my user TP. No issues. I created and co-authored an essay, but someone else created the TP for the essay before I got a chance to do it. On Safari, the (archive) button never goes away - it is always on regardless of default settings. The archive number on my user TP is on #10. The archive settings on the essay TP is #2. When I clicked the archive button to archive the discussion on the essay TP, instead of archiving it to #2, it archived it to #10. How do I make archiver work with archive number sequencing relative to the page I'm archiving instead of defaulting to my TP sequence? Atsme📞📧 17:21, 15 June 2015 (UTC)[reply]
  • Atsme, can you give me a link to the talk page so I can see the header used? The script always uses whatever is on the page it is on, it should never be using the one that is on your talk page, so I'm very confused and I'm guessing a link to see it will make it clear. :) — {{U|Technical 13}} (etc) 17:26, 15 June 2015 (UTC)[reply]
Okay, found it based on your editing history, and replied there. Happy archiving! — {{U|Technical 13}} (etc) 17:35, 15 June 2015 (UTC)[reply]

Error

Hi @Technical 13:. I installed your script at Meta and tried to archive m:RFH, but it seems that it does not respect MiszaBot's config template, as it did archived the thread at m:Meta:Requests for help from a sysop or bureaucrat/Archive 1 (now deleted). Maybe I did something wrong? Best regards. MarcoAurelio (talk) 17:59, 8 June 2015 (UTC)[reply]

  • MarcoAurelio, that was because you tried to use it on a page that uses dated archives instead of indexed archives and 1CA isn't set up to be able to handle dated archives yet. It may be something I add in the future, if I continue editing at all. — {{U|Technical 13}} (etc) 16:09, 15 June 2015 (UTC)[reply]