Album Mod - Multiple File Uploads - MorpheusX

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
monkey
Mitglied
Beiträge: 93
Registriert: 31.12.2003 10:59
Wohnort: Dornburg
Kontaktdaten:

Album Mod - Multiple File Uploads - MorpheusX

Beitrag von monkey »

hi!

Also, das Multipile File Upload Add-On für den Album-Mod funktioniert nur unter MorpheusX nicht richig, also gar nicht :-D

Es kommt immer die Fehlermeldung "Bad Upload". Gut geschaut warum die kommt:

Code: Alles auswählen

if( !isset($HTTP_POST_FILES['pic_file']) )
{
 message_die(GENERAL_ERROR, 'Bad Upload');
}
hm gut, ab ins template:

Code: Alles auswählen

<script language="JavaScript" type="text/javascript">
<!--
var gFileuploadCounter = 1;
var fileBrowseHTML = '<input class="post" type="file" name="pic_file[]" size="49" \/><br \/>';
<!-- BEGIN switch_manual_thumbnail -->
var fileThumbBrowseHTML = '<input class="post" type="file" name="pic_thumbnail[]" size="49" /><br \/>';
<!-- END switch_manual_thumbnail -->

[...]

// this function add the file input form field... and should be cross-browser compatible
function AddFileField()
{
	if (gFileuploadCounter <= {S_MAX_FILE_UPLOADS} )
	{
		gFileuploadCounter++;

		if(document.all)
		{
			document.all.file_browse.innerHTML += fileBrowseHTML;
			<!-- BEGIN switch_manual_thumbnail -->
			document.all.file_thumb_browse.innerHTML += fileThumbBrowseHTML;
			<!-- END switch_manual_thumbnail -->

			if ( gFileuploadCounter > {S_MAX_FILE_UPLOADS})
			{
				document.all.addbutton.style.visibility = 'hidden';
			}
		}
		else
		{
			// IE501+ and NS6+
			document.getElementById("file_browse").innerHTML += fileBrowseHTML;
			<!-- BEGIN switch_manual_thumbnail -->
			document.getElementById("file_thumb_browse").innerHTML += fileThumbBrowseHTML;
			<!-- END switch_manual_thumbnail -->

			if ( gFileuploadCounter > {S_MAX_FILE_UPLOADS})
			{
				document.getElementById("addbutton").style.visibility = 'hidden';
			}
		}
	}
}

function InitForm()
{
	// initialise the form and prepare it for uplaod fields...
	gFileuploadCounter = 1;
	if(document.all)
	{
		document.all.file_browse.innerHTML = '';
		<!-- BEGIN switch_manual_thumbnail -->
		document.all.file_thumb_browse.innerHTML = '';
		<!-- END switch_manual_thumbnail -->
		document.all.addbutton.style.visibility = '{DYNAMIC_GENERATION_STATUS}';
	}
	else
	{
		// IE501+ and NS6+
		document.getElementById("file_browse").innerHTML = '';
		<!-- BEGIN switch_manual_thumbnail -->
		document.getElementById("file_thumb_browse").innerHTML = '';
		<!-- END switch_manual_thumbnail -->
		document.getElementById("addbutton").style.visibility = '{DYNAMIC_GENERATION_STATUS}';
	}

	// init the first upload field, is ALWAYS visible !
	AddFileField();

	<!-- BEGIN pre_generate -->
	// pre-generate the rest of the fields
	while (gFileuploadCounter <= {S_MAX_PREGEN_FILE_UPLOADS} )
	{
		AddFileField();
	}
	<!-- END pre_generate -->
}
// -->
</script>

Code: Alles auswählen

<form name="upload" action="{S_ALBUM_ACTION}" method="post" enctype="multipart/form-data" onSubmit="{S_ON_SUBMIT}">

[...]

 <tr>
   <td class="row1" valign="top"><span class="gen">{L_UPLOAD_PIC_FROM_MACHINE}:</span></td>
    <td class="row2">
      <span id="addbutton" class="gen">
        <input type="button" value="{L_ADD_FILE}" onClick="AddFileField()" class="liteoption" />
      </span>
      <div id="file_browse" style="position:relative;"></div>
   </td>
 </tr>

[...]

So, in dem Form-Tag "method" auf "get" geändert und man sieht, dass wirklich nichts von "pic_file" übergeben wird ??? hm.

nur bei MorpheusX !!!

gut,
<input class="post" type="file" name="pic_file[]" size="49" \/><br \/>
mal per hand in das div eingetragen:

Code: Alles auswählen

    <input type="button" value="{L_ADD_FILE}" onClick="AddFileField()" class="liteoption" />
      </span>
      <input class="post" type="file" name="pic_file[]" size="49" \/><br \/>
      <div id="file_browse" style="position:relative;"></div>
   </td>
Und diesen eine Feld funktioniert. Trage ich so 2 ein, funktionieren die Beiden...
Also liegt es an der add-field Funktion, oder?


Weiß jemand Rat? Wäre echt klasse!
Benutzeravatar
monkey
Mitglied
Beiträge: 93
Registriert: 31.12.2003 10:59
Wohnort: Dornburg
Kontaktdaten:

Beitrag von monkey »

i hobs selber rausgefunden...
läuft nun wie es soll.
Pingu
Mitglied
Beiträge: 12
Registriert: 08.07.2006 14:30

Beitrag von Pingu »

@Monkey:
Wie ist denn Deine Lösung?
Habe dieses Problem jetzt auch! (-> Template "SwiftBlue", aber auch "SubSilver")
Antworten

Zurück zu „phpBB 2.0: Mod Support“