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

Getting the "Subject" string into preloadparams[]

1
Andreluciani (talkcontribs)

I'd like to make the preloadparams[] value equal to the "Subject" or 'title' field, when creating a new page.

I'm not sure if there is any easy way to do that, so I'm trying with some code management without success since I'm quite a beginner with php.

In that way I could set the only parameter I want to change ($1) to the title of the new page. If there's other way to do that, it would solve my problem as well.

Thanks

Reply to "Getting the "Subject" string into preloadparams[]"

preloadparams[] Doesn't work (version 1.24.1)

6
Dshinks (talkcontribs)

Hi All,

I'm using InputBox for the first time. All seems to be working well apart from one feature: preloadparams[].

InputBox text

<inputbox>
type=create
preload=Template:Preload_Page
preloadparams[]=abcde
</inputbox>

In the preload page I'm calling, I'm expecting it to replace the string $1 with the text abcde, but it just outputs $1.

Ideally, I want to pass in a category string (like [[category:categoryname]]) but I thought I'd just start off simple to get it working.

Any ideas where I'm going wrong?

Thanks

Ciencia Al Poder (talkcontribs)

You're not going wrong, but apparently support for preloadparams was added for the 1.25 version of InputBox and it's not present in 1.24

Doing a grep of the code of 1.24 doesn't match anything for preloadparams, but for 1.25 it does. I've fixed the compatibility column.

75.175.9.66 (talkcontribs)

The code to support preloadparams[] was added before the extension was forced into 1.24. I've got it running on 1.23 at the moment.

I had to pull the extension with git and force it back to the commit where support was added:

git clone https://git.wikimedia.org/git/mediawiki/extensions/InputBox.git
cd InputBox 
git reset --hard 474dd170d24e3710144a5ae0a4ddfea1b520773e

No idea about the stability. Its version shows up in Special:Version as "0.3.0 (474dd17) 01:47, 13 November 2014".

Andreluciani (talkcontribs)

Well, I'm having the exact same problem, but I have no shell access. Would be there any easier solution? (A whole mediawiki upgrade is possible but it would be great to solve without doing that).

Thanks

Andreluciani (talkcontribs)

Actually I've solved this changing the code that comes with it. It's working just fine right now!

Reply to "preloadparams[] Doesn't work (version 1.24.1)"
SapoPT (talkcontribs)

Hi, I have a header search box but I can't find a way to edit it and use InputBox, more precisely i wanted to do something like this:

<inputbox>type=search namespaces=Main**,Help </inputbox>

So users could selected categories to search. How can I change this?

Thanks

Reply to "Editing page header searchbox"
Cavila (talkcontribs)

it would be great if this extension had options for word completion. Some of the code could perhaps be borrowed from Extension:Semantic Forms, which for example lets you autocomplete on a given namespace.

Emijrp (talkcontribs)

I found this Manual:Enabling autocomplete in a form but doesn't work for me.

Reply to "Autocomplete"

Search bar default settings?

2
Summary by AmazingTrans
AmazingTrans (talkcontribs)

Is it possible to make the top right search bar to select File & Main, other than Main only?

AmazingTrans (talkcontribs)

This was the solution:

Manual:$wgNamespacesToBeSearchedDefault

AmazingTrans (talkcontribs)

I noticed, when i created the following, the buttons width size tend to cover up the text in Internet explorer.

Instead of seeing Create, I see Creat

http://snag.gy/pOt5V.jpg


<inputbox>
type=create
</inputbox>

<inputbox>
type=search
</inputbox>
AmazingTrans (talkcontribs)

okay this is weird. it only happen when i don't login.

when i login, this happens. ideas?

AmazingTrans (talkcontribs)

It seems that there is a css file with the following attribute mw-ui-button min-width 4em;

That is causing this.

Should i remove this line? which css file do i edit?

Reply to "Create buttons and other buttons"
Quiddity (WMF) (talkcontribs)

I was trying to add preloadtitle= to the docs. It's explained and works as part of the URL at Manual:Creating pages with preloaded text#Loading the preload file, e.g. https://www.mediawiki.org/w/wiki.phtml?title=Project:Sandbox&action=edit&section=new&preloadtitle=New_Header - but it doesn't seem to be working properly as part of the inputbox...

Can anyone explain what I'm doing wrong?

<inputbox>
   type=comment
   preloadtitle=Log
   default=Project:Sandbox
   </inputbox>


Cpiral (talkcontribs)

Whoever has heard of "preloadtitle" is less likely to be able to suggest an answer. I've heard of "preload".

Quiddity (WMF) (talkcontribs)

Ah, if we use the type=commenttitle and default=test title that will give a preloaded title.

Reply to "preloadtitle"

Skip to a particular point in a category

2
CodeCat (talkcontribs)

MediaWiki allows you to skip to a particular point in a category by using the URL. For example, https://en.wiktionary.org/w/index.php?title=Category:English_lemmas&pagefrom=bear skips to the word "bear" in te category. It would be incredibly useful (vital even, for a dictionary) to be able to do this more easily. Could a new inputbox type be added that lets you fill in the term to skip to in a category?

Ciencia Al Poder (talkcontribs)

That would probably be easier to do as a JavaScript gadget, so it's available on all category pages without the need to add an input box manually on every page.

Reply to "Skip to a particular point in a category"
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?"

Button color/class and new section heading

1
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?

Reply to "Button color/class and new section heading"