Mediawiki search form autocomplete not working on my custom skin - mediawiki

Hello gurus of Mediawiki,
I am having trouble with modifying one of my custom mediawiki skin (1.26).
I followed the mediawiki skinning guide to create a search form within my BaseTemplate. I am using the provided API method makeSearchInput to create the search input box. But for some reason, its not doing the auto-complete as it is supposed to do. I have looked into other mediawiki skin examples, tried to duplicate the settings to see if I can get it to work, but nothing really helped.
<form class="mw-search" role="form" id="searchform" action="<?php $this->text('wgScript'); ?>">
<?php
echo $this->makeSearchInput(array('id' => 'searchInput'));
echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
?>
</form>
When I look into the network activity, all of the other skins where the autocomplete works, I can see the network connectivity sending commands to the api.php each time I input any character into the input box. But for some reason, it doesn't send anything on my own custom skin. It almost looks like it doesn't even attempt to send the query. I have been searching online but without any luck in discovering what the problem is. Since it works on the other skins on the same server, it's probably not the global settings that I am missing but it could be something that I missed on skin configuration. I am not trying to do any fancy modification, so I must be doing something silly. I have been struggling and wasting many hours on this, so now I am here asking for the help...
Does anyone have any idea on what could be causing this?
Any help would be very very much appreciated.
Sincerely,

Related

New to HTML and need advice

I want to build a financial management website for a company. I want to create inputs where the user can add information and then they can see a summary of their data along with a graph, and also be able to do forecasts.
Honestly, I have no idea where to start on this. I'm new to HTML, but I've done a few tutorials and I've worked with C# in the past. I just bought a website domain and I have installed Wordpress.
Any advice is welcome. Thanks in advance.
I am beginner just like you.I see that you need frontend(client side) and backend(database).My opinion is to try learn this 5 first:HTML,CSS,JavaScript,MySql,PHP.After that you will have better vision what you can do.Good learning resourses are:
https://www.codecademy.com/learn
https://www.bento.io/
html5rocks
css-tricks
sqlzoo.net/
Google it,learn and work hard.Good luck.
I am a beginner too.
Here you've got my advices:
Try to start to understand how HTML works. (You need to know that HTML never acts at the server.
After you study tables, divs and some CSS (image is very important).
Its time to start studying PHP.
With a very low level of PHP (knowing how variables work) and all HTML you've learnt before, you will be able to create a simple webpage that contains a sign up.
Now its time to introduce that data in some place.
Where will you do it?
Thats right, you will do it in a MYSQL database.
So for a perfect server you need ---> HTML+CSS+PHP+MYSQL+attitude
P.S. I recomend you to buy a rapberry pi and install APACHE server and MYSQL on it so you can fight face to face with HTML, CSS and PHP without useing Wordpress
If you want the user to be able to input data, you can use a <form> tag. Here's an example:
<form method="post">
<input type="text" id="input">
<input type="submit" id="sub">
</form>
If you want the data to be displayed to the user through the website, you can use document.getElementById("body tag id here").innerHTML = "data here".

Inserting or copy/pasting picture to a textbox

I have a file with a textarea (named "Resolution support") in which you can explain how to solve a problem. My problem is that a user would be able to add a picture for a better explaining. If he copy/paste or he has to click and drag or anything i don't care, he HAS TO be able to put a picture into the textarea.
I wondered if another textbox that can do this would exist and what Type does the textbox has to be in PhpMyAdmin.
My textarea :
<textarea name="Escalade" class="longInput" cols="80%" rows="19" wrap="hard">
</textarea>
Without some kind of JavaScript WYSIWYG library this is not possible as vanilla textarea only takes text (clue is in the name).
I assume that you are viewing the submissions in phpMyAdmin which is an interface onto a MySQL database. It is good for developing stuff but not so great as an admin user interface long term. What you are asking about are called transformations.
Here are some tutorials on storing images in a database:
http://www.hockinson.com/programmer-web-designer-denver-co-usa.php?s=47
http://w3schools.invisionzone.com/index.php?showtopic=48068
How to store file name in database, with other info while uploading image to server using PHP?
Here are some lists of WYSIWYG editors:
http://www.sitepoint.com/html5-wysiwyg/
https://github.com/cheeaun/mooeditable/wiki/Javascript-WYSIWYG-editors
Those phpMyAdmin transformations:
http://docs.phpmyadmin.net/en/latest/transformations.html
That is about as much help as can be offered to you without seeing the PHP code behind the form at the very least. Hope this helps.
If someone is looking for an answer, I had asked my profesor and he answered that what I was looking for is a "Rich Text Editor". I'm using ckeditor with the plugin prgfilemanager. It allows me to insert pictures but I cannot copy/paste them which is pretty annoying...
You can try it here http://ckeditor.com/demo I hope it will help you if you have the same problem that I had :)
While it is true that you cannot use a textarea, the answer is very simple. You can use a content editable div, grab the contents as html and write it to a databae using AJAX and PHP.
Just name a div like this:
<div class="my_article" contenteditable></div>
and pass the contents on the click of a button into a JS variable and then pass that into PHP using AJAX.
var content1 = $('.my_article').html();
If anyone needs further help please comment and I'll be happy to obligue.

Wordpress - Making the backend more user friendly. Custom fields?

I'm developing a Wordpress website for a client based on Avada-theme and am a little worried, that the client is likely to mess up formatting and styling when being confronted with the standard back-end + WYSIWYG editor.
Let's take the URL: http://www.consilio-suedwest.de/angebote/ as an example.
So this is what the code looks like in the text view inside the first content box:
Die Zukunft aktiv und erfolgreich gestalten
Instead of having the client to edit the content boxes, I would like to display simply a text only field with a small description like "content box 1" in which the client can type in plain text.
Then this plain text would have to be transported with some kind of shortcode into the correct place.
So it would have to be something like.
[[plain text here]]
I don't know if something like this exists or what options I have to create a functionality like this. I did some research and, of course, stumbled upon custom fields, but it seems like I have to get into editing php.files and stuff which I don't want to do.
Appreciate your help
Take a look at the Advanced Custom Fields plugin. It has greatly helped me with improving the UI experience for WordPress admins.
It allows you to create a wide variety of custom fields, and has an extensive filtering feature to place the fields only on the pages/posts you want. For example, if you had a "Services" page, and several pages that were children of Services, you could create a "Services Description" text field that only displays on pages with Services as its' parent.
If you made a text field called "services_description" in your php code, you would call the value of the field using this:
<h3><?php the_field('services_description'); ?></h3>
If you wanted to check if the field had a value before drawing the tag, you'd do this:
<?php if(get_field('services_description')){ ?>
<h3><?php the_field('services_description'); ?></h3>
<?php } ?>
You can use many different field types, with their own settings. A sampling of the fields are:
Text Field
WYSIWYG Editor
Image Field
Gallery
Repeater
Color Picker
and many more.
They also have a great support/documentation system on their website, so you can learn how to utilize all of the various fields.
Sure, you could hand-code custom fields to your site, and there's plenty of tutorials out there to do that, but ACF is great for rapid deployment of custom content, so I'd really recommend it. They have a free and a paid version, but you should be fine with the free version.
I just noticed your last line about not wanting to edit php files. That is going to be extremely tricky in almost any solution to this. There are ways that you can hook into the_content() to alter what goes in it, but even that would still require altering your functions.php file.

how to set auto complete option to on

I have many websites like Facebook where we write a email address and we just click a button, from this a list of email address's rolls down.
Can anyone tell me how this is achieved? Can it be done with just HTML or do i need to learn any other language?
This is accomplished using Javascript or AJAX requests to query the databases "live" and the return a data set. If I understand you correctly like on Facebook where you type in a Friends name and it will pull back a full list of names which may be your friends.
Jquery, Ajax, Javascript, PHP and Mysql would be some good researching points.
It would be worth searching for "How to create a PHP Ajax request to auto populate HTML fields"
If you are referring to Auto Complete within a browser this is a local setting which is controlled by the end user or their administrator and from what I am aware from HTML alone you can not manipulate this.
I fully agree with Steve's answer. In addition you might want to check out the following:
http://ajaxdump.com/2010/08/11/10-cool-auto-complete-scripts-using-ajaxjquerymootoolsprototype/
http://www.freshdesignweb.com/jquery-ajax-autocomplete-plugins.html
Hope it will help you
Well i go on and search a lot and then i found this is very simple!!
you just need is to type autocomplete = "on" and give it a name and then make a submit button
the code goes here:
<input type="text" name="Name" autocomplete="on" />
<input type="submit" />

Gmail iOS App uses custom html tags - any info?

So I was looking through the Gmail iOS App (2.0.1) and saw some included html files like calendar.html:
<h1>
<?cs #trans description Title for screen in welcome sequence describing the
ability to immediately act on calendar events. (Maximum characters: ~25) ?>
Instantly RSVP</h1>
<p>
<?cs #trans description
Reference to being able to receiving emails for calendar events and being able
to act on the events immediately.
(Maximum characters: ~100 depends on line breaks) ?>
Respond to Google Calendar invites right from the app.
</p>
I was wondering if anyone knew what the ?cs tags were for. I did try googling it but I couldn't find anything. Maybe its an internal google thing? Any info would be nice. I'm just trying to learn about iOS/Google programming style.
<? … ?> is an XML processing instruction. They are not document data, but are intended for the underlying XML engine.
Typically processing instructions are used by an XML engine as a way of embedding control flow (<? if test="condition" ?>) and commands (<? echo "string" ?>) into the XML document.
Here it looks like cs is a kind of meta command. cs #trans description appears to be a label for for some kind of user help.
I'm sorry it doesn't directly answer your question, but a better understanding of the form might help you learn more about the function.
My guess would be that those bits of text inside the <?cs> tag are used during development by an internal Google localization tool to explain the purpose of the following text to a translator. They are probably not displayed or used anywhere in the running application.