[Mediawiki-l] Multiple types of edit in editpage.php??

Jordi Domingo jordidr at gmail.com
Sun May 8 11:47:29 UTC 2005


Hello, basically I would like to know if I can modify editpage.php to
show multiples types of edit and "link" them. I mean, my wiki would
present a first page where you select an archive (the button brings to
second page), a second page where you select a msgid/msgstr of the
presented (the button brings to third page),and the third page where
you edit the message. All three are "action=edit" pages,and i modified
index.php to enter as action=edit.

But some problems I encounter (the fact it's that I don't know if that
multiple edit is possible, however; apart, note I read/save to php
level, no using DB for the contents):
- I modify the editpage.php using things "if currentpage==1 do this,
else if ==2...". The idea is when submit in the first page, go to the
second...but it doesn't seem to capture tthe $intpo: that is, when I
submit, now it backs to actual screen (doesn't show previewnote
because I change manually beginning the editform...)

(in function editform)

global $currentscreen;
		
		global $intpo;
		if (!($intpo==true)){
			$intpo=false;
		}

if ( 'preview' == $formtype ) {  #do this because else it goes to
preview when I submit
		    $formtype = 'initial';
		}

(later....)

if ($currentscreen==1) {
				
		        if ($intpo){
		       	
				$pcurrentscreen=3;
				$filepo=$fileintroduced;
				
			}
			else {
				
				$wgOut->addHTML( "<form id=\"intpoform\" name=\"intpoform\"
method=\"post\" action=\"$action\" enctype=\"multipart/form-data\">");

				$introducepo="Introduce  .po file: <input tabindex='3' type='text'
value=\"$filepo\" name=\"$fileintroduced\" maxlength='50' size='30'
/><br />";
				$wgOut->addHTML( "$introducepo
				<input tabindex='5' id='intpo' type='submit' value=\"Edite file\"
name=\"$intpo\" accesskey=\"I\"  title=\"Edite file\"/>");
			
				$wgOut->addHTML( "</form>\n" );
			}
			
		}
	

Basically, I would be glad If i know it's possible,all this "multiple
edit" stuff. If besides you know why the form doesn't pass the
intpo=true and so automatically go to next page, better, because at
these moments I see all wrong :(

Lot of thanks

Jordi

Text of other prior messages maybe useful....
>>>>>>>>>>>><
- the first in which you can load a file (.po) from your computer,
- the second in which you see some messages of the .po and you can try
the one which you want
- and the third, the one that I have already developed:default
action=edit, you can modify/introduce your translation.

As i say, the three pages of my web application should be more or less
editable...so, I forget special pages, and modify my editpage.php to
use code depending of the screen/page showing. I created a variable
inicializated to 1, and presents what i would like in my first page; I
change manually to 3, and presents what I had done as editpage, and
therefore...

If i control the variable dinamically (initializated to 1 and
incrementing when pressing the button that goes to next page), would
this be a good (although maybe a bit "dirty") solution?
>>>>>>>>>>>>>>>>



More information about the MediaWiki-l mailing list