function execute()
 {
     global $wgOut, $wgStylePath;
     $wgOut->setArticleBodyOnly(true);
     $wgOut->addHTML(" \n<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' dir='ltr'>\n<head>  \n    \n       <title> " . wfMsg('upload') . "</title>\n    <style type='text/css' media='screen,projection'>/*<![CDATA[*/ @import '" . wfGetPad('/extensions/min/f/skins/WikiHow/main.css') . "'; /*]]>*/</style>\n    <script type='text/javascript' src='" . wfGetPad('/extensions/min/f/skins/common/wikibits.js,extensions/wikihow/prototype1.8.2/prototype.js,extensions/wikihow/prototype1.8.2/effects.js,extensions/wikihow/prototype1.8.2/controls.js,skins/WikiHow/gaWHTracker.js&rev=') . WH_SITEREV . "'></script>\n\n    <style type='text/css'>\n    BODY { background-color: #DEF; }\n\n    DIV#UploadForm {\n        background-color: #DEF;\n        margin: 0;\n    }\n\n    DIV#UploadForm P { margin: 10px; }\n\n    DIV#UploadForm DIV {\n        margin: 1px 2px;\n        padding: 1px 2px;\n    }\n\n    DIV#UploadForm DIV.formL {\n        width: 150px;\n        float: left;\n        font-weight: bold;\n    }\n\n    DIV#UploadForm INPUT, DIV#UploadForm SELECT {\n        background-color: #FFF;\n        border: 1px solid #666;\n    }\n    DIV#UploadForm SELECT { font-size: .9em; }\n\n    DIV#UploadForm INPUT.cbox {\n        border: none;\n        background-color: #DEF;\n    }\n    DIV#UploadForm INPUT#wpIgnoreWarning { margin-left: 15px; }\n\n    DIV#UploadForm INPUT#wpUpload {\n        margin-top: 5px;\n        cursor: pointer;\n        cursor: hand;\n    }\n\n    DIV#UploadForm P#ULimages {\n        float: left;\n        text-align: center;\n    }\n\n    DIV#UploadForm P#UploadButtons {\n        text-align: center;\n        margin-top: 13px;\n    }\n    DIV#UploadForm P#UploadButtons INPUT { margin: 0 25px; }\n\n    #uploadcamera {\n        float: right;\n        margin: 10px;\n    }\n    </style>\n</head>\n            <body><div id='UploadForm'>\n<img src='" . wfGetPad('/extensions/UploadPopup/uploadcamera.gif') . "' width='100' height='104' id='uploadcamera' />");
     UploadForm::execute();
     // finish off the HTML
     $wgOut->addHTML("</div></body>\n            </html>");
 }
	function execute() {
		// override MW's UploadForm with only the bits we want
		global $wgOut, $wgStylePath, $wgRequest;
		$wgOut->setArticleBodyOnly(true);
		$wgOut->addHTML("
 			<html>
                <head>
                    <title>". wfMsg('ct_upload', htmlspecialchars( $this->mType ) ) . " </title>
                </head>
            	<body>");
		$wgOut->addHTML("<h2>". wfMsg('ct_upload', htmlspecialchars( $this->mType ) ) . " </h2>");
		UploadForm::execute();
		$titleObj = SpecialPage::getTitleFor( 'CustomToolbarUpload' );
        $wgOut->addHTML("
				<script type='text/javascript'>
				var myForm = document.getElementById('uploadwarning');
				if(myForm != null) {
					myForm.action='".$titleObj->getLocalURL( 'action=submit' )."';
					var el = document.createElement('input');
				    el.type = 'hidden';
				    el.name = 'wpDestFileWarningAck';
				    el.value = '".$wgRequest->GetVal("wpDestFileWarningAck")."';
					el.id = 'wpDestFileWarningAck'
				    myForm.appendChild(el);
					
					var el2 = document.createElement('input');
				    el2.type = 'hidden';
				    el2.name = 'wpDestFile';
				    el2.value = '".$wgRequest->GetVal("wpDestFile")."';
					el2.id = 'wpDestFile'
				    myForm.appendChild(el2);
					
					var el3 = document.createElement('input');
				    el3.type = 'hidden';
				    el3.name = 'type';
				    el3.value = '".$wgRequest->GetVal("type")."';
					el3.id = 'type'
				    myForm.appendChild(el3);
				}
				</script>
				</body>
        	</html>");
	}
Beispiel #3
0
/**
 * Entry point
 */
function wfSpecialUpload()
{
    global $wgRequest;
    $form = new UploadForm($wgRequest);
    $form->execute();
}