Hello Schoenitzer! Thank you for nice software. I post my feedback.

  • How about "always-ON" option?
I suppose this program checks the value in instance of (P31), and showing correspondent table in the "quick_props". I think this is cool idea. But at the same time, "instance of" property is not so stable. For example, in MediaWiki (Q83), this script shows nothing. Because there is no statement instance of (P31)software (Q7397). So it is useful if "always-ON" table (which is shown in every item pages) is available. For example, by setting "-1" to "qid" in the "quick_props".
  • How about include your software name in edit summary?
This is nice software. So I think it is informative for various editors if software name appears in edit summary.

Thanks! --Was a bee (talk) 10:04, 31 December 2017 (UTC)Reply

Thank you quick update.--Was a bee (talk) 06:11, 1 January 2018 (UTC)Reply
I already added a option for a preset that is displayed if not instance of (P31) is present. I plan to add a possibility to add something for showing a preset for every value of instance of (P31). But I don't understand your note about MediaWiki (Q83) – it works for me. MediaWiki (Q83) has a instance of (P31)free software (Q341) and free software (Q341)subclass of (P279)software (Q7397) -> so it shows my preset for software (Q7397). -- MichaelSchoenitzer (talk) 15:09, 1 January 2018 (UTC)Reply
@Was a bee: Now also added "any P31". -- MichaelSchoenitzer (talk) 15:59, 1 January 2018 (UTC)Reply
Oh, I searched bottom of the page. Edit box is properly shown at below of claims. I didn't expect such recursive detecting function was implemented. --Was a bee (talk) 17:02, 1 January 2018 (UTC)Reply
"Any P31" works nice! Thank you very much. --Was a bee (talk) 18:21, 1 January 2018 (UTC)Reply

Help for getting it working edit

I added the script to my common.js as you can see at https://www.wikidata.org/wiki/User:ChristianKl/common.js . However when I browse an item like Elsa von Holzhausen (Q47007717) nothing additional happens. ChristianKl13:09, 2 January 2018 (UTC)Reply

@ChristianKl: When I use your setting, it works to me at Elsa von Holzhausen (Q47007717). Input box is shown just below the "+add statement". Browser setting interrupts or other gadget interferes? --Was a bee (talk) 10:25, 3 January 2018 (UTC)Reply
Hello Was a bee !
this is exactly the tool I've been dreaming for years to quickly complete wikisource texts that have been imported by a bot, but I have exactly the same problem. I added the script to my common.js and copied your default settings, but nothing happens when I browse a Q5 item with only P31 set.
could you please help me fix this ? --Hsarrazin (talk) 21:00, 9 January 2018 (UTC)Reply
@Hsarrazin: Oh I'm not developer, so what I can do is little. For my case, I'm browsing with Google Chrome. This script works nice on that. Now I checked in Internet Explorer 11. When I browsing with IE 11, nothing is shown. I pressed debug tool by press F12 key, one error is shown. There is no ":" in line 125. I don't know what this exactly means. If you use IE11, wait User:MichaelSchoenitzer fixing this or try Google chrome[1]. --Was a bee (talk) 14:39, 10 January 2018 (UTC)Reply
@Was a bee:
sorry, I read a little too fast, and thought you were the one who developped it :)
@MichaelSchoenitzer:, can you help me with problem described above, please ? --Hsarrazin (talk) 15:20, 10 January 2018 (UTC)Reply
Busy at the moment. Will come back to this in the next days! -- MichaelSchoenitzer (talk) 23:44, 10 January 2018 (UTC)Reply
@Hsarrazin, ChristianKl: Can you please provide me with more info:
  1. What browser are you using?
  2. It it also not working at a human person?
  3. When you open the web-konsole do you see any errors?
  4. If you enter quick_props in the web-konsole does it show your config (or what else)?
I have some ideas for reasons & improvements but need to know what's really behind the issue. -- MichaelSchoenitzer (talk) 15:25, 12 January 2018 (UTC)Reply
@MichaelSchoenitzer:
Sometimes the tool works but mostly it doesn't and it still doesn't at either the latest Firefox or Chrome version for me on Windows 10. I deactivated my custom CSS and it still doesn't work. I get the error: "I get :JQMIGRATE: jQuery.fn.offset() requires a valid DOM element
load.php:140:200
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: moz-extension://b29a1630-7d3c-49d7-b3f2-923289cd189f/common/common.js
Source Map URL: common.js.map
Full log is at https://pastebin.com/KJXDxZ6N
I"m not sure what you mean with "quick_props in the web-konsole". ChristianKl01:15, 14 January 2018 (UTC)Reply
@ChristianKl: Just to be clear: Is the log from when you opened a item with instance of (P31)human (Q5) (or software (Q7397)) set? With my last point I meant: please if the tool does not show up even through it should, open the browser console (Ctr+Shift+K in Firefox) and type in quick_props and look what result you will be shown (Array [ {…}, {…}, {…} ] or undefined). -- MichaelSchoenitzer (talk) 01:52, 14 January 2018 (UTC)Reply
I did it again with Elsa von Holzhausen (Q47007717) as my test item and for some reasons it now works. In case it stops working again I will report back. ChristianKl01:59, 14 January 2018 (UTC)Reply
@MichaelSchoenitzer: I now have the normal version working but it doesn't update when I change the file with the presets. What do I need to do to make it update? ChristianKl18:28, 14 January 2018 (UTC)Reply
It would be great if the tool would provide multiple P31 values to be chosen in cases where there's no P31 filled. ChristianKl19:41, 14 January 2018 (UTC)Reply
Well, the Idea of the tool is, that you can specify in which situations it should show you which presets. You can make it show you a selection of different P31 values with a configuration-block like this:
	{
		qid: null,
		name: "Noch kein P31",
		defaults: [
			{
				name: "Ist ein",
				pid: 31,
				values: [
					{name: "Mensch", qid: 5 },
					{name: "Software", qid: 7397 },
					]
			}
		]
	},
qid: null tells quickpresets that in case no P31 is set, it should show you a block with Title "Noch kein P31", where you can set P31 to Q5 or Q7397. -- MichaelSchoenitzer (talk) 23:56, 14 January 2018 (UTC)Reply

“Added undefined …” edit

@MichaelSchoenitzer: Whatever I add, it says “Added undefined item_label” with the correct label item_label of the item added as value after the statement was added, but the property used always says “undefined”. The script actually works (i.e. the claim is indeed added), and this bug is hopefully easy to fix. —MisterSynergy (talk) 21:54, 12 January 2018 (UTC)Reply

@MisterSynergy: moved here. Interesting bug. What browser do you use? Can you open the web console and enter quick_props[0].defaults[0].name (and maybe also try a few other numbercombinations) and tell me if the result is undefined or a correct value. -- MichaelSchoenitzer (talk) 01:49, 13 January 2018 (UTC)Reply
@MisterSynergy: Pinging again, since last ping apparently didn't work. -- MichaelSchoenitzer (talk) 01:00, 14 January 2018 (UTC)Reply
quick_props[0].defaults[0].name="gender", quick_props[0].defaults[1].name="occupation", quick_props[0].defaults[2].name="citizenship", quick_props[0].defaults[3].name="given name", quick_props[0].defaults[4].name="family name" (as defined in User:MisterSynergy/quickpresets_settings.js). quick_props[1].defaults[0].name="License", quick_props[1].defaults[1].name="Os", quick_props[1].defaults[2].name="Language", quick_props[1].defaults[3].name="Gui". Both indicies return "undefined" when increased by 1 then. I use the latest 64 bit Firefox. —MisterSynergy (talk) 06:48, 14 January 2018 (UTC)Reply
  Done @MisterSynergy: Found and fixed it! -- MichaelSchoenitzer (talk) 23:48, 14 January 2018 (UTC)Reply
Thanks, works now! —MisterSynergy (talk) 06:11, 16 January 2018 (UTC)Reply

new try : fails to use my presets edit

Hello,

Doing a new try with this tool, that could be very useful :)

I set up my own presets at User:Hsarrazin/common.js -> it should use User:Hsarrazin/quickpresets_settings.js, but in reality, it uses default presets, which I do not need.

I would also like it to propose P31 when there is none : human (Q5), version, edition or translation (Q3331189) or literary work (Q7725634), as I work on wikisource editions.

Could you help me fix this, please ? --Hsarrazin (talk) 09:58, 10 April 2018 (UTC)Reply

Hi, at "édition" and "oeuvre littéraire" you a syntax error: a closing ).
Anyway since several people have problems with the configuration I'm currently working on a new version using a new, better config system as well as an interface for building the configuration…
You're welcome to try it out! To use the new version do the following:
  • Replace the two lines in you commons.js with:
mw.loader.using(['wikibase'], function() {
	$.getScript( 'https://www.wikidata.org/w/index.php?title=User:MichaelSchoenitzer/quickpresets_beta.js&action=raw&ctype=text/javascript', function() {
		var quickpresets = new wb.Quickpresets();
		quickpresets.init();
	});
});
importScript('User:MichaelSchoenitzer/quickpresetsconfigurator.js');
Tell me what you think. Please note: especially the config-interface is not finished yet. -- MichaelSchoenitzer (talk) 19:03, 11 April 2018 (UTC)Reply
[
	
	{
                "qid": null,
                "name": "aucun P31",
                "defaults": [
                        {
                                "name": "est",
                                "pid":  "P31",
                                "values": [
                                        {"name": "humain", "qid":  "Q5" },
                                        {"name": "édition", "qid":  "Q3331189" },
                                        {"name": "oeuvre littéraire", "qid":  "Q7725634" },
                                        {"name": "poème", "qid":  "Q5185279" },
                                        {"name": "article", "qid":  "Q191067" }
                                        ]
                        }
                ]
    },
    {
		"qid":  "Q5",
		"name": "humain",
		"defaults": [
			{
				"name": "sexe",
				"pid":  "P21",
				"values": [
					{"name": "homme", "qid":  "Q6581097"},
		            {"name": "femme", "qid":  "Q6581072"},
		            {"name": "Intersexual", "qid":  "Q1097630"},
		            {"name": "Transfemale", "qid":  "Q1052281"},
		            {"name": "Transmale", "qid":  "Q2449503"},
		            {"name": "Genderqueer", "qid":  "Q48270"}
		           ]
			},
			{
				"name": "Occupation",
				"pid":  "P106",
				"values": [
		            {"name": "écrivain", "qid":  "Q36180"},
		            {"name": "Politicien", "qid":  "Q82955"},
		            {"name": "footballeur", "qid":  "Q937857"},
		            {"name": "acteur", "qid":  "Q33999"},
		            {"name": "peintre", "qid":  "Q1028181"},
					{"name": "physicien", "qid":  "Q169470"}
		           ]
			},
			{
				"name": "pays de nationalité",
				"pid":  "P27",
				"values": [
					{"name": "France", "qid":  "Q142"},
		            {"name": "Canada", "qid":  "Q16"},
		            {"name": "Belgique", "qid":  "Q31"},
		            {"name": "Suisse", "qid":  "Q39"},
		            {"name": "Luxembourg", "qid":  "Q32"}
		           ]
			},
			{
				"name": "Langue parlée",
				"pid":  "P1412",
				"values": [
					{"name": "français", "qid":  "Q150"},
					{"name": "ancien français", "qid":  "Q35222"},
					{"name": "français classique", "qid":  "Q3100376"},
					{"name": "moyen français", "qid":  "Q1473289"},
					{"name": "fr-ca", "qid":  "Q2075394"},
					{"name": "fr-be", "qid":  "Q815549"},
					{"name": "fr-ch", "qid":  "Q1480152"},
					{"name": "occitan", "qid":  "Q14185"},
					{"name": "oil", "qid":  "Q37351"}
					]
			}
		]
	},
	{
		"qid":  "Q3331189",
		"name": "édition",
		"defaults": [
				{
				"name": "Langue",
				"pid":  "P407",
				"values": [
					{"name": "français", "qid":  "Q150"},
					{"name": "ancien français", "qid":  "Q35222"},
					{"name": "français classique", "qid":  "Q3100376"},
					{"name": "moyen français", "qid":  "Q1473289"},
					{"name": "fr-ca", "qid":  "Q2075394"},
					{"name": "fr-be", "qid":  "Q815549"},
					{"name": "fr-ch", "qid":  "Q1480152"},
					{"name": "occitan", "qid":  "Q14185"},
					{"name": "oil", "qid":  "Q37351"}
		    		]
			}
		]
	}
]

Thanks for helping ! the syntax is not easy... Done ! (I copied the settings you give me) but nothing happens :( - on Q51765626, there was no interface when P31 was not set... and there still isn't. --Hsarrazin (talk) 21:54, 11 April 2018 (UTC)Reply

after some testing, on Q5 items, it still displays your configuration, not mine. I don't know what is the problem :(--Hsarrazin (talk) 22:26, 11 April 2018 (UTC)Reply
@Hsarrazin: Found & fixed the bug. Please try if it's now using your config. -- MichaelSchoenitzer (talk) 12:53, 12 April 2018 (UTC)Reply
@Hsarrazin: New ping, since first one failed. -- MichaelSchoenitzer (talk) 12:55, 12 April 2018 (UTC)Reply
Hi MichaelSchoenitzer !
It now load my presets \o/... but fails to add statements, whether I just click on a value or add one throught the special box - it worked, from your presets, yesterday, but didn't anymore 1 hour ago :'( --Hsarrazin (talk) 13:15, 12 April 2018 (UTC)Reply
@Hsarrazin: Fixed two more bugs. (that's why it's still called beta! ;)) -- MichaelSchoenitzer (talk) 14:27, 12 April 2018 (UTC)Reply
It edits now !!! thanks a lot :))
to add new values and properties, do I use Special:ConfigQuickpresets ? will it add them, or replace existing settings ? --Hsarrazin (talk) 14:52, 12 April 2018 (UTC)Reply
Special:ConfigQuickpresets for now can only create a (new) configuration. (It won't save it you have to save it on your self, it will just create it for you) You can of-course by hand join the old an new configuration. I plan on having Special:ConfigQuickpresets beeing able to load the existend config in the future – but that might take a while. -- MichaelSchoenitzer (talk) 23:37, 12 April 2018 (UTC)Reply

User box created edit

Babel user information
de-N Dieser Benutzer spricht Deutsch als Muttersprache.
ȹThis user uses quickpresets.
Users by language

User box is created for this program, Template:User quickpresets. Because there were no logo, I putted the character "ȹ", which consists of q and p. From "quick presets". Feel free to edit, change the template (including logo). Thanks!

Usage
{{#babel:de-N|quickpresets}}
Output
See at the right

--Was a bee (talk) 07:28, 28 April 2018 (UTC)Reply

Thanks a lot! Very cool – I like the idea of using ȹ as logo. -- MichaelSchoenitzer (talk) 14:54, 28 April 2018 (UTC)Reply

Instance and recursive P279 edit

Hi! Today I've tried to set User:Epìdosis/quickpresets - film.js. It works well, apart from one problem: I read "The tool will not only work for items with instance of (P31) set to the specified value, but also for value that are a subclass of (P279) of it (incl. recursive applying)" and I understood that, when I set "qid: 11424", it includes not only items with instance of (P31)film (Q11424), but also items with (e.g.) instance of (P31)short film (Q24862) or instance of (P31)silent short film (Q20667187), because silent short film (Q20667187)subclass of (P279)short film (Q24862) and short film (Q24862)subclass of (P279)film (Q11424). Am I wrong? In fact, it works only with items having instance of (P31)film (Q11424).

Than just a suggestion: the tool supports string datatype ... would it be possible to support also external identifier datatype? Thank you very much, --Epìdosis 18:26, 22 April 2019 (UTC) Ah, and how about supporting time datatype? --Epìdosis 18:41, 22 April 2019 (UTC)Reply

Hi @MichaelSchoenitzer: first of all, tanks for your tool, a great idea and safes a lot of time, editing manually on similar items. unfortunately i am running into similar problems as mentioned above. I have set up a setting for wayside shrine (Q3395121). E.g. wayside cross (Q2309609) is both P31 and P279 of wayside shrine (Q3395121). if i create a new item with wayside shrine (Q3395121) after reloading the page, the quickpresets section is displayed; if i create an item P31 wayside cross (Q2309609) it takes many reloads and a lot of time waiting before quickpresets are shown. The feature, that also P279|P31 of the given qid for a setting brings the setting up to screen is good;
One idea - maybe it is possible to bring in your script - could it be possible to make the qid parameter as [] json-object? e.g. i could set
{
     qid: [3395121,2309609]            // Only apply this preset-block for items with instance of (P31) set to 5
     name: "Wayside Shrines", 
     //...

Thanks in advance, --Mfchris84 (talk) 20:08, 21 December 2021 (UTC)Reply


Hi @MichaelSchoenitzer: i forked quickpresets.js and made some changes according to what i have written above.
1. i added a new function quickpresets_checktypeqid() before calling quickpresets_checktype to check if the qid in the props is set as a number or as an array. both is now possible without changing any existing prop.js files
2. i made a change in your sparql-query. i discovered that this was the reason why i takes such a long time, before subclasses where detected to the given qid. the reason was that the subclass query was based on the item i am editing. if i create a new item, it takes its time before everything is indexed in wdqs. so i changed the query to check if the given object-qid in P31 is P31|P279* of the qid from the props.
finally i want overwrite your running quickpresets.js, if you agree with my corrections, feel free to take the source to your account. --Mfchris84 (talk) 21:58, 21 December 2021 (UTC)Reply

A fork edit

Hi. Nice work! Just to let you know that the wikibase instance http://wiki.personaldata.io is now running its own fork of quickpresets, already modified quite a bit to make it work outside of Wikidata. You might find it interesting to see what it took. Intro to that instance of the tool at https://forum.personaldata.io/t/another-gadget-quickpresets/217 Thanks for your work! Pdehaye (talk) 02:52, 3 January 2020 (UTC)Reply

Specific values for Lexemes space edit

Hi,

I'm a huge user of this tool for my needs on authors and books. But my favorite presets for Q-space also appear in L-space, where I would clearly need other values.

i.e. in Q-space, when no P31 is set, I have the choice for "P31:Human, Edition, Work, Poem, Article, etc." which should NOT appear in L-space.

How can I define different presets for Q-space and L-space, please ? --Hsarrazin (talk) 12:39, 1 April 2020 (UTC)Reply

Edit request: Allow line breaks between values edit

Hello MichaelSchoenitzer, would it be possible to allow line breaks between the values in value lists for a property. The current code prevents this with the result that line breaks are only inside value names with whitespace in them which is quite unexpected and a bit ugly. To achieve that I propose to replace one of the &­nbsp;s in

	    $("<span>&nbsp;<a href='#'></a>&nbsp;∙</span>")

with a regular space character. Thanks a lot in advance, --Marsupium (talk) 12:18, 9 December 2021 (UTC)Reply

only vector skin? edit

Hi, does this script only work on vector skin? Thanks --Robertgarrigos (talk) 07:35, 25 December 2021 (UTC)Reply

Sorry, I see it works on timeless also. How about showing the quicklinks on top of the declarations, instead on the bottom? The problem was that I couldn't find it on a very long page. --Robertgarrigos (talk) 07:49, 25 December 2021 (UTC)Reply

Extending for qualifiers edit

I could see this being very useful for ships which all require significant event (P793) ship launching (Q596643) with qualifier point in time (P585) . You could configure it to provide these values, and just prompt the user to input a date. How easy would this be to do? Vicarage (talk) 23:18, 13 January 2023 (UTC)Reply

Allow selecting multiple values for an item edit

Thank you for making this glorious software! I want to be able to use this for adding multiple values for a single property. For example, I'd like to be able to add multiple property constraint (P2302) in one go by clicking the multiple results that appear in the script's box. Thanks in advance! —Tomodachi94 (talk) 21:44, 22 April 2023 (UTC)Reply

Disregard, it appears it does support this. —Tomodachi94 (talk) 07:18, 24 April 2023 (UTC)Reply

Bug: Quickpresets edits on a property go to the item with the same ID number edit

Hello! Thank you for making this excellent script. I've found a bug where quickpresets edits on properties go to the item of the same number.

For example, Quickpresets edits on Channel One Russia Worldwide program ID (P11749) go to Lydia E. Kavraki (Q11749) instead. —Tomodachi94 (talk) 07:18, 24 April 2023 (UTC)Reply

This bug is caused by the following line: https://www.wikidata.org/wiki/User:MichaelSchoenitzer/quickpresets.js#L-218 Which fleshes out the Q from the string and return the numbers only. So9q (talk) 13:30, 26 July 2023 (UTC)Reply
I keep being fooled by this tool [2][3]. @Waldyrious, MichaelSchoenitzer: Could you fix it please? --Horcrux (talk) 11:17, 22 December 2023 (UTC)Reply

adding dates edit

Hallo Michael,

könnte man das Skript dahin erweitern, dass auch die Eingabe von Daten als value möglich ist?

Herzliche Grüße, Jonathan Groß (talk) 12:46, 15 September 2023 (UTC)Reply

Not working on firefox edit

Hello! First of all, thank you so much for this tool, it looks great and I'm sure if I make it work I will be using it on the daily.

I'm using Firefox version 120.0 (64 bits)

If I use the file with your settings, it works. If I put that same content inside my own quickpresets settings, it doesn't, even though I'm not changing anything. I also have the reference in my commons.js. I use other tools without problem, and I'm at a loss here.

If you could give me a hand I'd appreciate it!

Thank you! Samthony (talk) 13:46, 26 November 2023 (UTC)Reply

Hi @Samthony:! I think you need to add the line "importScript( 'User:MichaelSchoenitzer/quickpresets.js' );" (which activates the gadget itself) before the line "importScript( 'User:Samthony/quickpresets.js' );" (which contains your settings), otherwise the gadget cannot work. --Epìdosis 15:48, 26 November 2023 (UTC)Reply
Well, that's embarrasing haha
Thank you! It worked like a charm Samthony (talk) 15:53, 26 November 2023 (UTC)Reply

Cant Figure out how to add Strings (& Image-Links) edit

Hey Fellow Enthusiasts!

Im working on cataloging thousands of historic cuneiform signs and need to add a link to an image (Property:P18) i've uploaded to wikimedia and cant figure out how to make it work with quick presets. Additionally i have to add a so called "Gottstein Code"(Property:P11957) which is nothing more than an individual String, which is not working either. Example Entry : Q123594174

My settings file: User:Ursenstein/quickpresets settings.js

Help would be appreciated <3 Ursenstein (talk) 12:07, 1 December 2023 (UTC)Reply

Bonus Question: Is it possible to add qualifier to an entry?


Ursenstein (talk) 13:07, 1 December 2023 (UTC)Reply

Return to the user page of "MichaelSchoenitzer/quickpresets".