dyabol
Forum Replies Created
-
Hi jiya112,
maybe at your table in the database has a different name, check the prefix. Please send me your npu-upload.php file.Hi jasnon,
thank you for your feedback. In Dashboard->Gallery->Public Uploader is radiobox “Uploads Require Approval”. Works fine for me. Or did you mean something else?Thats my file with multiples upload and gallery chooser: npu-upload.php
Forum: Plugins
In reply to: [NextGEN Public Uploader] Need to be able to upload multiple imagesMaybe it’s not a very good solution, but it works for me.
Solution:
In file /nextgen-public-uploader/inc/npu-upload.php replace lines 201, 270.
from:
$strOutput .= "\n\t<input type=\"file\" name=\"imagefiles\" id=\"imagefiles\"/>";to:
$strOutput .= "\n\t<input type=\"file\" name=\"imagefiles[]\" id=\"imagefiles\" multiple=\"multiple\" />";On line 488 replace:
from:
$this->handleUpload();to:
$count = count((array)$_FILES['imagefiles']['tmp_name']); $x = $_FILES['imagefiles']; for($i=0; $i<$count; $i++){ $_FILES['imagefiles']['name']= $x['name'][$i]; $_FILES['imagefiles']['type']= $x['type'][$i]; $_FILES['imagefiles']['tmp_name']= $x['tmp_name'][$i]; $_FILES['imagefiles']['error']= $x['error'][$i]; $_FILES['imagefiles']['size']= $x['size'][$i]; $this->handleUpload(); }On line 139 replace:
from:
$this->handleUpload_widget();to:
$count = count((array)$_FILES['imagefiles']['tmp_name']); $x = $_FILES['imagefiles']; for($i=0; $i<$count; $i++){ $_FILES['imagefiles']['name']= $x['name'][$i]; $_FILES['imagefiles']['type']= $x['type'][$i]; $_FILES['imagefiles']['tmp_name']= $x['tmp_name'][$i]; $_FILES['imagefiles']['error']= $x['error'][$i]; $_FILES['imagefiles']['size']= $x['size'][$i]; $this->handleUpload_widget(); }Thats all!
Thats my file with multiples upload and gallery chooser: npu-upload.php
Solution:
In nextgen-public-uploader/inc/npu-upload.php
Comment or delete lines 199, 272:
$strOutput .= "\n<input type=\"hidden\" name=\"galleryselect\" value=\"{$gal_id}\">";and between the lines 200, 201 (for Shortcode Form) and 269, 270 (for Widget Form):
Exemple:
$strOutput .= "\n\t<div class=\"uploader\">"; <--- paste $strOutput .= "\n\t<input type=\"file\" name=\"imagefiles\" id=\"imagefiles\"/>";Paste this:
$strOutput .= "\n\tChoose gallery:: <select name=\"galleryselect\">"; $sql = "SELECT gid, title FROM wp_ngg_gallery ORDER BY title"; $result = mysql_query($sql); while ($array = mysql_fetch_array($result)) { $strOutput .= "\n\t<option value=\"".$array['gid']."\">".$array['title']."</option>"; } $strOutput .= "\n\t</select><br><br>";Thats all!
Hi David, Frisco theme is very nice. Good work! Thats repairs very useful.