How can I display the selected value of the option using PHP?
For example I have this code:
<script language=javascript>
function sevent()
{
var xx = document.xx.sbox;
if(document.xx.sbox.selectedIndex != 0)
alert("selected is "+xx.selectedIndex);
else alert("None is selected");
}
</script>
<form name=xx>
<select name=sbox onChange="sevent()">
<option value="default">Select Option</option>
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
</select>
</form>
Here, it prompts whatever option you select. What I wanted to do is to display
the value of the selected option using PHP. How can do it?
Thanks. ^_^
I am the WikiSysop of my Bikol Thesaurus. I need also other people as
administrator(s) in order to supervise synonym/meaning contributions of users.
And also, users will know who the administrators are. How can i promote a user
as one of administrators?
Thanks guys!
2009/11/23 Roan Kattouw:
> You need to use action=import, not action=upload to import files.
> Uploading the file as described there does not mean uploading it with
> action=upload, but uploading/embedding it in an HTTP request to
> action=import.
Thanks, but can you give me the exact format and preferably a sample
request for doing this? It's not clear from the documentation.
Cheers,
-jani
2009/11/20 Roan Kattouw (Catrope):
> MediaWiki 1.15 does not have an upload API module. There will be one
> in the 1.16 release (whenever that is), and the upload API is also
> enabled on Wikipedia.
Well, darn it. How do API imports in 1.15 work then? From the API:Import
page:
" Pages can be imported with action=import, either by uploading an XML
file or by specifying a page from another wiki (also known as
transwikiing)."
I'm trying to use the API to slurp in export files generated by another
program.
Cheers,
-jani
Greetings,
I'm trying to upload a file via the API and wget, based on this from
http://www.mediawiki.org/wiki/API:Edit_-_Uploading_files :
api.php ? action=upload & filename=Test.txt & file=file_contents_here & token=+\
Login and fetching token is OK, but on upload...
wget --load-cookies cookies.txt -O upload.xml \
--post-data "action=upload&filename=atlasmw-export.xml&file=[content
goes here]&token=$EDITTOKEN" \
$API
I get this:
<error code="unknown_action" info="Unrecognized value for parameter
'action': upload" xml:space="preserve">
What's wrong? Is this MediaWiki's way of saying it's not happy with with
the lack of multipart/form-data...? I'm using MediaWiki 1.15.1.
And yes, I'm aware that wget probably isn't the best choice for this.
Pointers to working code in any language (PHP etc) are welcome.
Cheers,
-jani
Hi there,
I'm using the API to extract the raw wiki text from my pages, using
the "?action=query&titles=Main_Page&export&exportnowrap" syntax. That
works perfectly.
Now I would like to get the templates expanded out in the result, so I
use: "?action=query&titles=Main_Page&prop=revisions&rvlimit=1&rvprop=content&rvexpandtemplates",
which does the job, as expected, but it also strips out the comments.
My problem is that the comments are meaningful to me (I use them to
help process the wiki text in subsequent steps).
Is there a way to expand templates with the API, but leave the
comments intact?
Thanks,
Kevin
--- MENSAJE AUTOMATICO ---
Estoy probando mi lista de contactos. Pueden ignorar este msg.
Mis mejores deseos para todos.
--- AUTOMATIC MESSAGE ---
I'm testing my contact list. Please ignore this msg.
My best wishes for all.