Extension talk:InputBox

Jump to: navigation, search

About this board

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

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

How can I allow a user to search by pageid?

Stevenpcox (talkcontribs)

I would like users to be able to look up an article based on pageid.

Using ?curid=PAGEID I can add the pageid to a url and go directly to the page. I would like to have a search function where the user input the pageid into a field, mediawiki appends the URL and the desired page opens up.

This should be easy. The only thing I cannot figure out is how to have the user type the pageid into a field and hit enter. From there I can turn it into a variable and inject it into the URL.

Reply to "How can I allow a user to search by pageid?"
Cpiral (talkcontribs)

The namespaces parameter doesn't take the space character. So there's no searching talk namespaces. Quoting or underscoring fails to help. This is an 8 yr old problem?

Please accept the namespace numbers directly that are output the URL. Please accept namespace aliases. Please ignore capitalization. Please ignore whitespace between the field separator. Thanks a lot.

Reply to "Namespaces parameter still broken"

Open created page in new tab. Not in current.

Aka sektor (talkcontribs)

How do I get by clicking on the button creation page, go to the new tab and does not remain in the current? What is correct in extension code, if in no other way?


Как сделать, чтобы по нажатию на кнопку создания страницы, переходило в новую вкладку, а не оставалась в текущей? Что поправить в коде расширения, если по-другому нельзя?

Ciencia Al Poder (talkcontribs)

Add this JavaScript code to your wiki:

// Create page form: open on new window
  $('form.createbox').attr('target', '_blank');
Aka sektor (talkcontribs)

Thank you very much. Work fine.

Dturtill (talkcontribs)

Is there any way that this can be used to create a subpage of the page the button is on, please.

Eg if the button was on a page called January the create button would create a subpage called January/whatever the title was entered

Ciencia Al Poder (talkcontribs)

Yes. Add:

Mattho69 (talkcontribs)

Hi !

Is it possible to use InputBox with VisualEditor ?

Bozomal (talkcontribs)

I guess you are asking about the create article "problem"?

I'm a newbie, so probably what I'm suggesing might be very bad, but worked for me

here is suppoed to be a solution, but not working for me

so I search in the source files and found that if you change the file /extensions/Inputbox/Inputbox.classes.php and change action to veaction (see below) the magic happens. This doesn't work When you are using the parameter prefix, it won't create an article with prefix in the name.

$htmlOut .= Xml::openElement( 'input',
        'type' => 'hidden',
	'name' => 'veaction',
	'value' => 'edit',
Mpconnick (talkcontribs)

An easier way (now) to do this is add the parameter 'useve' for InputBox. I'm not sure when this was added, but I'm running MediaWiki 1.26.2.






Mattho69 (talkcontribs)

Thanks for that ;-)

Do you know if using a preload is possible with VisualEditor?

Swennet (talkcontribs)

@Mattho69 Did you manage to get preload working with VisualEditor?

Mpconnick (talkcontribs)

I'm not sure what you mean by preload. I'm pretty new to administering an instance of MediaWiki. Still figuring a lot out. Sorry I can't be of more help.

Mattho69 (talkcontribs)

@Swennet Not yet but I hope this will be available soon

@Mpconnick look at Manual:Creating pages with preloaded text

Thanks :-)

OgreMHDW (talkcontribs)

This is currently a bug in VisualEditor. See bug tracking at https://phabricator.wikimedia.org/T51622

Reply to "VisualEditor" (talkcontribs)

Is there a way to add the ajax search suggestion to an inputbox? Thanks

Stefahn (talkcontribs)

I would like to know this too.
In my eyes the search is no fun if there's no autocompletion / suggestions...

Emijrp (talkcontribs)

I have found a hack to add ajax suggestions to any inputbox. You must add the following code to your MediaWiki:Common.js, and refresh browser cache.

document.getElementById('searchform').action = '/w/index.php';
document.getElementsByName('search')[0].id = 'searchInput';
Reply to "Add SearchSuggest to inputbox?"

useve currently not workgin for type=create

Summary by Ciencia Al Poder

Reported as task T147048

Evolution and evolvability (talkcontribs)

When using useve=true and type=create, the url doesn't contain the correct parameter "&vecreate=inputboxcontents"



type        = create

buttonlabel = Create pre-print

placeholder = Pre-print title


break       = no


Ciencia Al Poder (talkcontribs)

Reported as task T147048

Evolution and evolvability (talkcontribs)

As part of the solution, the current syntax calls the url:


Whereas it should call:


If you can remove the empty parameters (preload=&editintro=&summary=&nosummary=&prefix=&minor=) the function should call properly.

Reply to "useve currently not workgin for type=create"
Great Brightstar (talkcontribs)

This would be useful if you insert a InputBox into an element with top-to-bottom direction. --Great Brightstar (talk) 10:04, 18 September 2016 (UTC)

Great Brightstar (talkcontribs)

As my works in Manchu test of Wikipedia, I found the width parameter is not enough in an element uses top-to-bottom direction, if you use it, the box would be very long, and it would out of page even if you add the height in this element (see this page, tested on the latest version of Firefox). So I think this parameter should be added in this extension, but defaulting to nothing (i.e. this parameter should be activated only when you input it).

Ciencia Al Poder (talkcontribs)

What's the use case of having a "vertical" inputbox?

Reply to "Add height parameter"

Button color/class and new section heading

Dvorapa (talkcontribs)

I'd like to propose two new functions to this extension. The first is a button color/class option. E.g. green button could be managed by "buttoncolor=green" or by 'buttonclass=mw-ui-progressive". The second is the level of the new section heading. E.g. 3rd heading could be managed by "headinglevel=3" What do you think? Could they be added?

Quiddity (WMF) (talkcontribs)

@Dvorapa: Re: button colors - One goal of the ongoing design work, is to make a User Interface that is consistent, as in, once people are familiar with a button's action/outcome, they can expect consistent results. Hence, the button to submit a form (as in this extension, and others) should always be a single color (blue in our case). There's some related information at this (slightly outdated) page: Wikimedia Foundation Design/Color usage#Functional Colors.

Re: heading levels - I almost filed a feature-request for this in phabricator, but then I couldn't find any examples (I checked a few dozen pages linked from en:WP:Requests). Here's what I had drafted; please add your use-case, and any pre-existing examples you can find, and post it in phab.

Title: Allow inputbox to create an H3 heading
Description: Suggested feature: The addition of a new parameter, which would let an inputbox specify what Heading level to use, when creating the `section=new`. This would allow editors to use it more flexibly, on pages where the desired practice is to create feedback in a series of H3 sections. Example pages where this practice is wanted (or already done but manually) include ...

Note: I'm not sure if this is technically feasible though. The current system just hooks into the standard "New topic" tab on all talkpages. Adding new code to allow changing the H-level might be more complex than is desired.

KHarold (WMF) (talkcontribs)

This would be super helpful - it is difficult to design a page around the light grey color of the 'create' button.

Quiddity (WMF) (talkcontribs)

@KHarold (WMF) I've commented at Phab:T88038 on the accessibility issues with the current light grey. See my answer to Dvorapa above, re: customizing colors. Hope that helps. :-)

Reply to "Button color/class and new section heading"
Perhelion (talkcontribs)

I wondering there is no option for this as old templates support this on Wikimedia like Template:Clickable_button, I see this because someone used some unicode signs which are not really supported by many systems: &#x1F50D;

Quiddity (WMF) (talkcontribs)

I believe this would be covered by phab:T106948 ("Convert InputBox to use OOJs UI where possible"), but I'll ask some folks...

Quiddity (WMF) (talkcontribs)

I believe that task would cover the issue of extensions/tools which desire to have consistent/pre-determined icons within buttons, see examples in OOjs_UI/Widgets/Buttons_and_Switches. So, after that work was done, additional work could be done on the InputBox extension to include a magnifying-glass icon on the type=fulltext/search/search2 form input buttons by default. However, changing the image manually for each usage of the InputBox, would run counter to the desire for standardization (for a more intuitive/learn-able interface). HTH.

Reply to "why not jquery icons?"