Open main menu

Extension talk:InputBox

About this board

For the page history, see also here. / previous talk on this page


RonnieV (talkcontribs)

Is there also a way to tell InputBox to not create a new section (== Section ==), but a subsection (=== Subsection ===)? Thanks in advance, ~~~~

Ciencia Al Poder (talkcontribs)

No, that's currently not possible

Reply to "Creating subsection"
RonnieV (talkcontribs)

I'd like to give a user an option by using an inputbox to start a new section on (the same) page. Using type=commenttitle, the input of the InputBox is available in the URL and will be used as the name for the section. I'm also using a prefill to offer the user a structure to enter (one) more thing. Is there an option to use the content of the Infobox in the prefill-page or in the resulting section?

If not, is it possible to combine two Inputboxes, so that the content of both is available to create a section with, one for the sectionname and one for the content? Thanks in advance, RonnieV (talk) 16:27, 25 February 2019 (UTC)

Reply to "Combining boxes or using input"

Mobile compatibility of preload

2
Summary by Ciencia Al Poder
Trizek (talkcontribs)

While editing a form that uses InputBox, I realized that the form I've created is not preloading anything on the default skin for mobile. The page briefly displays some code and is then replaced by a blank page.

I've tried to see if it was due to my form, but that's not the case.

Ciencia Al Poder (talkcontribs)
Reply to "Mobile compatibility of preload"

How to select single namespace to search in

3
Erutuon (talkcontribs)

In Category:Wiktionary-namespace discussion pages on the English Wiktionary, I want to have the inputbox search only in the Wiktionary (Project) namespace, to override user preferences (because I didn't have the Wiktionary namespace selected and saw no results!) and maybe save server resources.

Adding searchfilter=Wiktionary: ... doesn't work, because the filter is placed at the end of the search query (that is, if you enter blah in the box, you get the query blah Wiktionary: ...) and then the namespace filter doesn't work. Adding namespaces=Wiktionary works, but it adds whitespace (a <br> tag) between the textbox and the button; maybe the extension tries to create checkboxes and fails because there's only one namespace.

Any non-buggy way to choose one namespace to search in?

Quiddity (WMF) (talkcontribs)

I believe the prefix=Wiktionary: parameter will give the same result as the namespaces=Wiktionary parameter.

Erutuon (talkcontribs)

Oh yes, that works. Thanks!

Reply to "How to select single namespace to search in"
95.174.66.61 (talkcontribs)

Is autocompletion possible in search type InputBox?

Quiddity (WMF) (talkcontribs)
Reply to "Autocomplete possible?"

%5B0%5D inserted into URL in stead of %5B%5D

2
Evolution and evolvability (talkcontribs)

There seems to be an issue with the preloadparams[] = parameter, where instead of including %5B%5D the text %5B0%5D is included, where the extra "0" prevevnts it from functioning.

see example: wikiversity.org/wiki/WikiJournal_Preprints

Any ideas for fixing this?

Ciencia Al Poder (talkcontribs)
Reply to "%5B0%5D inserted into URL in stead of %5B%5D"

Customise Button and Text Field colour, drop-shadow, border, etc?

2
62.96.213.62 (talkcontribs)

Hi, is it possible to modify the button colours, borders etc? And maybe the search box also?

Domtron vox (talkcontribs)

Haven't tried this for the input box, but you can make custom changes to the mediawiki CSS via the MediaWiki:Common.css page. Giving it a quick look the CSS classes your interested in is "mw-ui-button", "mw-ui-input", "mw-ui-input-inline", and possibly "mw-inputbox-centered" for the whole form area. (I just pulled these from the browser via the JS dev tools)


A bit late, but maybe it is useful to you or someone else.

Reply to "Customise Button and Text Field colour, drop-shadow, border, etc?"
131.111.85.79 (talkcontribs)

Is there a way to look for/create pages with suffixes, as in prefix? If not, I don't suppose it would be a viable implementation? It'd be hella useful in some case.

Reply to "Suffix search/creation?"

Entering Content of New Section?

11
Johnywhy (talkcontribs)

I'd like an input box setup to create a new section to an existing page.

  • The user would enter the content of the new section
  • The section title would be hardcoded into the inputbox.
  • The page name would be hardcoded into the inputbox.
  • On submitting, the user would not be redirected to the target-page-- they'd remain on the current page.

Reading the extension manual, it seems none of this would be possible. Hope someone can prove me wrong.

Ciencia Al Poder (talkcontribs)

It's not possible. You'll need to

  • search for another extension (if one exists)
  • code your own one
  • use JavaScript for that and use the api to create the section on submit.
Johnywhy (talkcontribs)
This post was hidden by Ciencia Al Poder (history)
Johnywhy (talkcontribs)
Ciencia Al Poder (talkcontribs)

If the edit is going to be done on the same wiki where the JavaScript is being executed, JavaScript will be sending the same cookies that use the browser. Then, you don't need to login with JavaScript.

Johnywhy (talkcontribs)

You mean cookies for the user-login?

I thought bot-login is separate from user-login.

Ciencia Al Poder (talkcontribs)

I'd guess you want your users edit under their main account and not under their bot account. If not, disregard my previous comment.

Johnywhy (talkcontribs)

We need our bot to perform write-actions as logged-in user.

But also need to perform reads. i guess the reads could be under bot account, or user account-- doesn't matter cuz there's no write being logged.

So, since we're doing writes as logged-in user, then will keep things simple to perform reads with same cred.

Good idea!

Now i have to figure out how a bot can use the logged-user's cred.

Ciencia Al Poder (talkcontribs)

I don't see any relation between the original question (being able to create a new section from an input box) and bot edits.

Johnywhy (talkcontribs)
Reply to "Entering Content of New Section?"
Barny1952 (talkcontribs)

I am running Mediawiki version 1.30. I have inserted the line <wfLoadExtension( 'InputBox' );> in LocalSettings.php . In addition I have downloaded the latest <InputBox>-files and copied them into /extensions/InputBox/. But in Special:Version this extension <InputBox> did not appear in the listing. And after writing

<inputbox>

type=create

break=no

</inputbox>

in the main page did not make appear the create box.

Can anybody help me?

Addendum: Now it works. I have changed the chmod of LocalSettings.php to 644. By upgrading my wikimedia installation it was set to 444.

Jenbme (talkcontribs)

I have the same issue – but chmod on LocalSettings.php is set to 644. Any other thoughts as to why this might not be working?

Barny1952 (talkcontribs)

I am sorry, but I have made no futher investigastions on this issue.

Reply to "Extension: InpuBox not activated"
Return to "InputBox" page.