Extension talk:InputBox

Jump to: navigation, search

About this board

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


Kiwi-wi (talkcontribs)

Hello,

It seems the visual editor option does not work, for the create type.

the  'useve=1' parameter should open the visual editor.

Possible bugfix start in Inputbox.classes.php :

By commenting out the following lines everything seems fine :

//      $htmlOut .= Html::hidden( 'preload', $this->mPreload ); (line 393)

//      $htmlOut .= Html::hidden( 'editintro', $this->mEditIntro ); (line 397)

I think those may be iffed depending on the $mUseVE parameter

Regards,

ManosHacker (talkcontribs)

The known bug relies on the prefix parameter, which is not passed to the VE call from InputBox. Are you using the prefix parameter?

Reply to "Visual Editor Option not working"

How to change "save changes, show preview, show changes" button design

1
42.153.61.69 (talkcontribs)

How to change the default design of "save changes, show preview, show changes" button on newly installed wiki to the inputbox design used by both MediaWiki and Wikipedia on the action=edit page? (It's a lot more user-friendly)

Reply to "How to change "save changes, show preview, show changes" button design"
Evolution and evolvability (talkcontribs)

Is there any way to implement an option to choose between basepage prefixes in the same way that |namespaces= can search a specific namespace?

I would like to be able use the |type=create option with a preset list of prefixes, e.g.:

<inputbox>
type = create
prefixes = Option1/**, Option2/, Option3/
</inputbox>

For context, I'm looking to include on v:WikiJournal_Preprints the following:

<inputbox>
type        = create
buttonlabel = Create pre-print
placeholder = Pre-print title
prefixes      = WikiJournal of Medicine/**, WikiJournal of Science/, WikiJournal of Humanities/, WikiJournal of Extra/
break       = no
preload     = WikiJournal_Preprints/preload_draft
</inputbox

Would that be something possible to implement?

Reply to "Multiple basepage prefix option?"

Search for articles that start with a string.

3
Marianian (talkcontribs)

Hi,

How do I configure InputBox to search for articles that begin with a specific string in the main namespace, such as "NationStates Issue No. " (with a trailing space)?

Best, Marianian

Quiddity (WMF) (talkcontribs)

Are you trying to setup either:

  • Just pre-made searches for a specific string?
    • this is what you describe above. It would be easiest to just give plain search links, e.g. example search.)
  • An inputbox that enables users to add text to the pre-made search string?
Marianian (talkcontribs)

Hello,

A NSindex (NSindex.net) user recently suggested to me that I find a way to bring up articles for any given issue just by typing a three digit issue number.

Articles for each issue follow the format "NationStates Issue No. [number]", e.g. "NationStates Issue No. 100" for the article about the 100th issue on NationStates.

The idea that I am trying to achieve is that, for example, when someone types "100" and clicks "search" or something, the article "NationStates Issue No. 100" automatically comes up. It’s like "I feel lucky" except with wiki articles on NSindex.

Best, Marianian

Reply to "Search for articles that start with a string."
Crysis19 (talkcontribs)

I'm not sure why but using InputBox is breaking things. I didn't realize it until I go to create a Subpage and see how broken it is.

A simple Inputbox, using preload=Template:Characters creates the page Tester. On this page is a slash-removal link to a subpage History.

The goal is when viewing the page Tester, the link will read as History, and take you to Tester/History when clicked.

What happens instead is the link takes you to /History instead. Which is a subpage of nothing. If you try going to Tester/History through the browser address bar, and put PARENTPAGE on that afterwards, it gives you TEMPLATE:PARENTPAGE as a result.

Does anyone know how to fix this? Or will I have to go back to creating pages with the subst template feature instead?

Crysis19 (talkcontribs)

Actually, more testing seems to make this a flaw in MediaWiki itself.

As I just created a page "Tester2" with subst:Template:Characters in it. And now it's being seen as a template page instead of it's own page. Because the subpage links do not work, and it's parent is Template:ParentPage.

So I'm not sure what is wrong. It seems like something is royally screwing up my MW installation.

Because going directly to a page named "Jason", creating it, typing in for a link to a subpage named History, and previewing it, and it doesn't work right.

Reply to "Pages Created are Broken"

Several input boxes forms a name for an artilce

8
Fokebox (talkcontribs)

Could someone let me know if it is possible to make that several input boxes forms a name for an artilce? Example: First input box has name of the book, second author of the book and result is "Name of the book - Name of the author"

Quiddity (WMF) (talkcontribs)

Hi Fokebox. Please could you give us more details about "the problem you are trying to solve"? What you have given above is "the solution you think might work", which doesn't help us understand alternative ways we might be able to help you. Thanks!H

Fokebox (talkcontribs)

So I would like to have for example two boxes. I want to fill author name to the first one and book name to the second one and after pressing button create page I want to have a result Author Name - Book Name

Quiddity (WMF) (talkcontribs)

Ah, I think I understand. It is not possible to have two separate textfields that automatically combine using this.

What you could do instead, is use the "placeholder" parameter to give the editor a hint about the preferred title convention. E.g.

 
 <inputbox>
 type=create
 placeholder=Author Name - Book Name
 prefix=Special:Mypage/
 break=no
 buttonlabel= &nbsp;                     foo                    &nbsp;
 </inputbox>

which results in

Hope that helps.

Fokebox (talkcontribs)

Thank you! I did so, but I wanted two separate boxes ) one for Author another for Book ) ... any way it also fine for me

Fokebox (talkcontribs)

I have one more question - How can I set button width?

Quiddity (WMF) (talkcontribs)

I've added a hacky example to my demo above. Please don't overuse it!

Fokebox (talkcontribs)

I did so before your example ) I thought there is a set for button width just like for input itself )

Reply to "Several input boxes forms a name for an artilce"
67.78.106.74 (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';
Nicolas NALLET (talkcontribs)

This hack could drive an server error if don't replace by your article path which could be : wiki or w or index.php or anything else you have configurerd.

In the example above the article path is just w

Reply to "Add SearchSuggest to inputbox?"
Aka sektor (talkcontribs)

I solved issue with opening creation page in a new tab: Topic:Tgoy9eqm9yhkl8ec

However, now there is another. How to make it so that the form is cleaned?

It turns out that a new tab is opened, and the text in the form remains on the previous one.

Russian:

Решил вопрос c открытием в новой вкладке: Topic:Tgoy9eqm9yhkl8ec

Однако теперь есть другой. Как сделать так, чтобы форма при этом очищалась? Получается, что открывается новая вкладка, а на предыдущей остается текст в форме.

Reply to "Text remains in the form"

How to avoid the namespace selection box?

3
Kghbln (talkcontribs)

When using type "search" or "fulltext" one gets the namespace selection box like e.g. here. However if I click on "Content pages" shortcut at the top of the box like e.g. there the namespace selection box is hidden.

To cut it short: How do I direct the search to e.g. the Content namespaces. I am asking because on a mobile skin we get about 15 to 20 cm of box shown before any possible result which is just overdoing things.

Quiddity (WMF) (talkcontribs)

This seems to be impossible, at the moment. (To use specific keywords: You're asking for a way to make any searches (not just through the InputBox extension) send you to the "Content" tab (&profile=default) instead of the "Advanced" tab (&profile=advanced)

The tab you end up on, is based on whether we individually (as logged-in users), have ever selected the checkbox "Remember selection for future searches" in the "Advanced" search tab. -- You can confirm this by doing a test search in a Private/Incognito window.

I've filed phab:T170011 with the request for a method to reset it. (I believe it might still be possible by resetting all user-preferences. But that's obviously not optimal.)

----

Semi-related: There's ongoing work at m:WMDE Technical Wishes/AdvancedSearch to rethink the Advanced Search - both making it clearer, and making more of the advanced functionality easier to use. I'll send a note to one of the people working on it, with your points, and ask if there are separate mockups for the mobile UI, yet. Thanks!

Kghbln (talkcontribs)

Thanks a lot for your extensive reply which is as much appreciated as creating the task on phabricator as well as making discovery/wmde aware of the need for a mobile specific path.

Indeed if you are not logged in the namespace selection box is not shown. However if you are logged in the namespace selection box is shown even if you did not check "Remember selection for future search"

I kinda expected that it is currently not possible to do this. As a first step it will probably by nice if the namespace selection box may be toggled with a collapsed view by default.

Reply to "How to avoid the namespace selection box?"
C Wagner (talkcontribs)

Is there a way to get focus on InputBox?

Quiddity (WMF) (talkcontribs)

I don't think there is (certainly not documented).

There is a semi-related FAQ at w:en:Wikipedia:FAQ/Main_Page#Why doesn't the cursor appear in the search box, like with Google? which might help explain why that isn't a standard feature. I'm not a developer, but the code in w:en:MediaWiki:Gadget-searchFocus.js might be adaptable to that use, if you absolutely must have that functionality somewhere?

Hope that helps.

Reply to "autofocus"