Understanding Noah's Classifieds/Multiple Image Extension

Problem
In Noah's classifieds an advert can only submit one image, we want to submit n images.

First you will need this new file, save it is image.php in your root folder of Noah. Image.php Source

Target Functionality
Now let's first talk about our target. We want the following features:
 * Obviously all created data must be deleted upon the removal of the advert
 * Use HTML Text as a spacer between images
 * Dynamically create the upload fields so submission is not cluttered
 * Remove a single image without deleting the ad
 * Allow for dynamic setting of maxImageCount, maxImageSize, maxImageThumb and whether single delete function is available

Here is a snapshot of the end result

Modifying gorum/dbproperty.php
Because any and all object_vars are automatically saved to the database it is problematic to use $this->data to pass data from one function to the next. To get around this the following modification needs to be made to dbproperty.php

function getCreateSetStr($base, $typ, $create=TRUE) {    $object_vars = get_object_vars($base); $firstField = TRUE; $query = ""; $typ = $base-&gt;getTypeInfo; foreach( $object_vars as $attribute=&gt;$value ) { 		// NEW DAWID if (!isset($typ["attributes"][$attribute])) continue; // NEW DAWID

Modifying gorum/object.php
Change the function getVisibility as shown

function getVisibility( $typ, $attr ) {    global $gorumroll; if (!isset($typ["attributes"][$attr])) return Form_hidden;

Adding New Database Fields
Firstly we need to add 7 new rows to our category database (Table:classifieds_classifiedscategory)

imagesAllowed, Type int(4), default = 10, Unsigned ThumbSizeX, Type int(10), default = 64, Unsigned ThumbSizeY, Type int(10), default = 100, Unsigned imageMaxSizeX, Type int(12), default = 800, Unsigned imageMaxSizeY, Type int(12), default = 600, Unsigned imageSpacer, Type varchar(250), default = 'HTML TEXT' imageRemove, Type int(2), default = '1'

These are the new rows that I added. From the information you can see that imagesAllowed will have a range of 0-16, thumbSize 0-1024 and imageSize 0-2048. If these are too little or too much adjust accordingly so that it doesn't hog database space.

Here is the SQL Script for adding these

ALTER TABLE `classifieds_classifiedscategory` ADD `imagesAllowed` INT( 4 ) UNSIGNED NOT NULL DEFAULT '10', ADD `thumbSizeX` INT( 10 ) UNSIGNED NOT NULL DEFAULT '64', ADD `thumbSizeY` INT( 10 ) UNSIGNED NOT NULL DEFAULT '100', ADD `imageMaxSizeX` INT( 12 ) UNSIGNED NOT NULL DEFAULT '800', ADD `imageMaxSizeY` INT( 12 ) UNSIGNED NOT NULL DEFAULT '600', ADD `imageSpacer` VARCHAR( 250 ) NOT NULL DEFAULT ' ', ADD `imageRemove` INT( 2 ) DEFAULT '1' NOT NULL ;

Modifying Category.php
Add these to the top of the file just below this one shown. These tell Noah that we have added new fields to the database

/* DAWID JOUBERT IMAGE MODIFICATIONS ADDITIONS */ $category_typ["attributes"]["imagesAllowed"] = array(                "type"=&gt;"INT",                 "text",                 "max" =&gt;"16", 				"default"=&gt;"10"				              ); $category_typ["attributes"]["thumbSizeX"] = array(                "type"=&gt;"INT",                 "text",                 "max" =&gt;"1024", 				"default"=&gt;"128"				              ); $category_typ["attributes"]["thumbSizeY"] = array(                "type"=&gt;"INT",                 "text",                 "max" =&gt;"1024", 				"default"=&gt;"128"				              ); $category_typ["attributes"]["imageMaxSizeX"] = array(                "type"=&gt;"INT",                 "text",                 "max" =&gt;"2048", 				"default"=&gt;"800"              ); $category_typ["attributes"]["imageMaxSizeY"] = array(                "type"=&gt;"INT",                 "text",                 "max" =&gt;"2048", 				"default"=&gt;"600"              ); $category_typ["attributes"]["imageSpacer"] = array(                "type"=&gt;"VARCHAR",                 "text",                 "max" =&gt;"250", 				"default"=&gt;&apos;&lt;br/&gt;&lt;img src="i/spacer.gif" alt="." width="$thumbWidth" height="20" /&gt;&apos;              ); $category_typ["attributes"]["imageRemove"] = array(                "type"=&gt;"INT",                 "bool",                 "default"=&gt;"1"             ); /* DAWID JOUBERT IMAGE MODIFICATIONS ADDITIONS */

Modify lang_en.php as to stay consistent with language scheme
Now we also need to add the following to lang_en.php (and all the other languages you plan on using). For consistency add it after the comment that says "Category"

// Dawid Joubert Image Editing $lll["imagesAllowed"]="Number of Images Allowed"; $lll["thumbSizeX"]="Generated Thumbnails&apos; size X"; $lll["thumbSizeY"]="Generated Thumbnails&apos; size Y"; $lll["imageMaxSizeX"]="Max Image Size X"; $lll["imageMaxSizeY"]="Max Image Size Y"; $lll["imageSpacer"]="HTML Text to place after each image (use as spacer)"; $lll["pictureTemp"]=&apos;Pictures&apos;; $lll["imageFileNotLoaded"]=&apos;Image file not saved/created!&apos;; $lll["imageRemoveEnabled"] = &apos;Enable Image Remove Button &apos;; $lll["removeImage"] = "Remove This Image"; $lll["missingImage"] = "Image does not exist, unable to remove it!"; $lll["detail_removeImage"] = "Image Removal"; $lll["imageRemove"] = "Image Remove Button Enabled?";

Consistency and Assumptions
Images are saved under "$adAttDir/$this->id".".".$ext and their thumbnails "$adAttDir/th_$this->id".".".$ext. This format is not a problem for storing single images but is for storing multiple images. So we will be modifying it.

First to maintain backward compatibility we will keep the current format for the first image in the sequence however the second, third and nth image will have this pattern.

Full Image:"$adAttDir/$this->id"."-$i.".$this->picture

Thumbnails:"$adAttDir/th_$this->id"."-$i.".$this->picture

Where $i is the image number starting from 0 so if a user had six jpeg images they will be named as follows:

pictures/listings/5.jpg		// First image. Shown in advert listing pictures/listings/5-0.jpg	// Second Image. Shown in details view (when viewing the advert) pictures/listings/5-1.jpg	//	"" pictures/listings/5-2.jpg	//	"" pictures/listings/5-3.jpg	//	"" pictures/listings/5-4.jpg	//	""

The function extensions will be saved into the picture row of the advertisement in a comma separated format "jpg,gif,jpg" we will then split this format into an array like this one array("jpg","gif","jpg").

So we will need to modify these functions and some others:
 * delete
 * This function is called when you remove the advertisement
 * showListVal
 * This function is called for every piece of information that is shown both in the advert listing and in the advert's details itself. We need this function so that it now lists all the pictures when viewing the advert details
 * activateVariableFields
 * This function needs to be modified so that it displays options for uploading n amount of images
 * storeAttatchment
 * Modify so that it actually stores all incoming images
 * showDetials
 * Shows the detailed view of the advertisement

delete in Advertisement.php
Replace everything inside

if ($this->picture) { .. Old Code .. };

With this so that the entire block looks like (Now any1 just dare tell me this doesn't look cleaner!!!)

if( $this->picture ) { 		$this->getImageExtensions; $limit = count($this->imageExtensions); for ($i=0;$i < $limit;$i++) { 			cleanDelete($this->getImageName($i)); cleanDelete($this->getThumbName($i)); } 	}

showListVal in advertisement.php
Replace everything in

elseif ($attr=="showpic") { ..old source code... }

With.

elseif ($attr=="showpic") { 	$s="&lt;img src=&apos;$adAttDir/no.png&apos;&gt;";	// Will be overwritten later $this-&gt;getImageLimits; if($this-&gt;picture && $this-&gt;imagesAllowed)	// Do we have any extensions to work with? { 		// Create the image extensions for use $this-&gt;getImageExtensions; $this-&gt;Debug; // Are we in the details view? if ($gorumroll-&gt;method == "showdetails") { 			$limit = count($this-&gt;imageExtensions); $s = &apos;&apos;; for ($i=0;$i &lt; $limit;$i++) { 				if (strlen($this-&gt;imageExtensions[$i]) &gt; 2) {					 					$s .= $this-&gt;getImageHTML($i)."&lt;br /&gt;"; } 			}			 		} 		else {	 			$tempRoll = $gorumroll; $tempRoll-&gt;list = $itemClassName; $tempRoll-&gt;method = "showdetails"; $tempRoll-&gt;rollid = $this-&gt;id; saveInFrom($tempRoll); // Just make the output equal to a single image $s= $this-&gt;getImageHTML($0,tempRoll-&gt;makeUrl,&apos;_self&apos;); } 	} }

hiding the original PICTURE element, advertisement.php
At the top of advertisement.php is $item_typ["attributes"]["picture"] = {..}; Add this to the array "form invisible", this will make sure that it is not added to the form when modifying/creating adds. The above-mentioned declaration will now look like this.

$item_typ["attributes"]["picture"] = array(                "type"='>'"VARCHAR",                 "text",                 "max" ='>'"250", 		"form hidden" // NEW LINE              ); // Fixed on 2007-01-16

ActivateVariableFields in advertisement.php
Modify the function as shown

// NEW CODE DAWID // Create new input boxes for each picture, but only if we are creating a new advert or modifying an existing one $this-&gt;Debug; if (($gorumroll-&gt;method == "modify_form") || ($gorumroll-&gt;method == "create_form")) { 		$this-&gt;getImageExtensions; $this-&gt;getImageLimits; $i = 0; $lll["picture0"]=$lll["pictureTemp"];	// Creates language thingies $showCount=0; $temp = ""; for ($i = 0;$i	&lt;	$this-&gt;imagesAllowed;$i++) { 			// Generate remove text if (($gorumroll-&gt;method == "modify_form") && ($this-&gt;imageRemove)) { 				$tempRoll = $gorumroll; $tempRoll-&gt;list = $itemClassName; $tempRoll-&gt;method = "remove_image"; $tempRoll-&gt;rollid = $this-&gt;id; $tempRoll-&gt;imageID = $i; saveInFrom($tempRoll); $remText = $tempRoll-&gt;generAnchor($lll["removeImage"]); } else $remText = ""; // Just make the output equal to a single image $temp2 = (file_exists($this-&gt;getImageName($i)) ? $this-&gt;getImageHTML($i) : ""); if ($temp2 != "") { 				$showCount++; $temp2 .=&apos;&lt;br/&gt;&apos;.$remText; } 			$temp[$i] = &apos;&lt;br /&gt;&apos;.$temp2; } 		if ($showCount == 0) $showCount = 1; $item_typ["attributes"]["picture0"] = array( 					"type"=&gt;"VARCHAR", 					"multiple file", 					"max" =&gt;"250", 					"count" =&gt; $this-&gt;imagesAllowed, 					"extraLabel" =&gt; $temp, 					"showCount_dj" =&gt; $showCount 				 ); }; 	// NEW CODE DAWID

valid, advertisement.php
This function validates the single image that is uploaded before the image is stored. The rest of the validation is done by the class this one inherits from. Delete it all.

storeAttachment, advertisement.php
This function has been modified almost entirely, just copy over the new function.

function storeAttachment {    global $HTTP_POST_FILES; global $whatHappened, $lll, $infoText; global $adAttDir, $applName, $itemClassName; global $maxPicSize; // New code // Load this class $this-&gt;getImageLimits;		// Get the dimensions and stuff allowed $this-&gt;getImageExtensions; $parsedAtleastOne = false; $count = 0; // Loop for every image allowed for ($i = 0;$i	&lt;	$this-&gt;imagesAllowed;$i++) {		 		if ((isset($this-&gt;imageExtensions[$count]) == false)) $this-&gt;imageExtensions[$count] = "."; if (strlen($this-&gt;imageExtensions[$count]) &gt; 2) { 			$count++; $hasImage = true; } else $hasImage = false; $ind = "picture$i"; if (!isset($HTTP_POST_FILES[$ind]["name"]) || $HTTP_POST_FILES[$ind]["name"]=="") continue; if (!file_exists($HTTP_POST_FILES[$ind]["tmp_name"])) { 			// This should never happen handleError("Temp Image doesn&apos;t exists?? WTF"); continue; } 		if (strstr($HTTP_POST_FILES[$ind]["name"]," ")) {        	$infoText .= $lll["spacenoatt"].&apos;&lt;br /&gt;&apos;; continue; } 	   if ($HTTP_POST_FILES[$ind]["tmp_name"]=="none") continue; if ($HTTP_POST_FILES[$ind]["size"] &gt; $maxPicSize) { 	       $infoText .= sprintf($lll["picFileSizeToLarge2"], $maxPicSize).&apos;&lt;br /&gt;&apos;; continue; } 		$fname=$HTTP_POST_FILES[$ind]["tmp_name"]; $size = getimagesize($fname); if (!$size) { 			$infoText.=$lll["notValidImageFile"].&apos;&lt;br /&gt;&apos;; continue; } 		$type = $size[2]; global $g_Extensions;	// Found in image.php if (!isset($g_Extensions[$type])) { 			$infoText .=$lll["notValidImageFile"].&apos;&lt;br /&gt;&apos;; continue; }	 	// We are checking dimensions anymore as we might as well resize the image /*		if( $size[0]&gt;$this-&gt;imageMaxSizeX || $size[1]&gt;$this-&gt;imageMaxSizeY ) { 			$infoText .=sprintf($lll["picFileDimensionToLarge"], $this-&gt;imageMaxSizeX, $this-&gt;imageMaxSizeY).&apos;&lt;br /&gt;&apos;; $whatHappened = "invalid_form"; continue; }	*/	 		if ($hasImage) $count--; // Instanciate a new image $image = new myImage; // Read the image $image-&gt;ReadImage($HTTP_POST_FILES[$ind]["tmp_name"]); // Remove old pictures and thumbnails cleanDelete($this-&gt;getImageName($count)); cleanDelete($this-&gt;getThumbName($count)); // Save the image extension $this-&gt;imageExtensions[$count] = $g_Extensions[$type]; // Now create our image if ($image-&gt;CreateLocal($this-&gt;getImageName($count),$this-&gt;imageMaxSizeX$,this-&gt;imageMaxSizeY)) { 			// Create the thumb $image-&gt;CreateLocal($this-&gt;getThumbName($count),$this-&gt;thumbSizeX$,this-&gt;thumbSizeY,true); $parsedAtleastOne = true; $count++; } 		else { 			// Why wasn&apos;t it created, could it be because the file format doesn&apos;t support resizing if ($image-&gt;supported == false) $infoText .=sprintf($lll["picFileDimensionToLarge"], $this-&gt;imageMaxSizeX, $this-&gt;imageMaxSizeY).&apos;&lt;br /&gt;&apos;; else $infoText.=$lll["imageFileNotLoaded"].&apos;&lt;br /&gt;&apos;; $this-&gt;imageExtensions[$count] = "."; } 	}    $HTTP_POST_FILES["picture"]["name"]=""; if ($parsedAtleastOne) { 		$this-&gt;updatePictureField; }    return ok; }

showDetails, advertisement.php
Change everything inside

if($this-'>'picture) { ... }

To be

// DAWID if($this-&gt;picture) { 		$s.="&lt;tr&gt;&lt;td valign=&apos;top&apos; align=&apos;left&apos; rowspan=&apos;30&apos; class=&apos;cell&apos;&gt;\n"; $s.=$this-&gt;showListVal("showpic"); $s.="&lt;/td&gt;"; $s.="&lt;/tr&gt;\n"; } 	// DAWID

advertisement.php include image.php
at the top of the file call include("./image.php");

Finally More Functions, advertisement.php
Add these new functions to the top of the file (advertisement.php) This first set can go anywhere before the class declaration

/**********************************/ // Advertisement specific image functions function cleanDelete($name) { 	if (file_exists($name)) { 		// Attempt to delete $ret=@unlink($name); if(!$ret) $infoText=sprintf($lll["cantdelfile"],$name); return $ret; } 	return true; }; function getImageExtensionsFromString($string) { 	return	split(&apos;[,]&apos;, $string); }; function createImageExtensionsStringFromArray($arr) { 	$out = ""; foreach ($arr as $value) { 		$out .= $value.&apos;,&apos;; } 	return $out; } /**********************************/

These second functions must be placed within the class. Place them just after

class Advertisement extends Item {

Okay

/**********************************/ // Advertisement specific image functions function getImageExtensions { 		if (isset($this-&gt;picture)) $this-&gt;imageExtensions = getImageExtensionsFromString($this-&gt;picture); } 	function getImageName($i) { 		if (!isset($this-&gt;imageExtensions[$i])) return ""; global $adAttDir; if ($i != 0) { 			return	$fileName = "$adAttDir/$this-&gt;id"."-$i.".$this-&gt;imageExtensions[$i]; } 		else return	$fileName = "$adAttDir/$this-&gt;id".".".$this-&gt;imageExtensions[$i]; } 	function getThumbName($i) { 		if (!isset($this-&gt;imageExtensions[$i])) return ""; global $adAttDir; if ($i != 0) { 			return	$thumbName = "$adAttDir/th_$this-&gt;id"."-$i.".$this-&gt;imageExtensions[$i]; } 		else return	$thumbName = "$adAttDir/th_$this-&gt;id".".".$this-&gt;imageExtensions[$i]; } 	function getImageHTML($i$,link = false$,target=&apos;_blank&apos;) { 		if (!isset($this-&gt;imageExtensions[$i])) return ""; if (strlen($this-&gt;imageExtensions[$i]) &lt; 2) return ""; $picName = $this-&gt;getImageName($i);	// Get the first image $thName = $this-&gt;getThumbName($i);	// Get the first thumb // If the thumbnail doesn&apos;t exists use the original picture&apos;s name instead. if (!file_exists($thName)) $thName = $picName; if (!file_exists($picName)) return ""; // Okay now we need to find the dimensions of the thumbnail and scale them for viewing. // If it really is a thumbnail we won&apos;t have to scale using html. If it isn&apos;t then we have no 		// other choice as the reason no thumb exists is because this format is not supported by php $size = getimagesize( $thName ); $size = RatioImageSize($size,$this-&gt;thumbSizeX,$this-&gt;thumbSizeY,true); if ($link == false) return "&lt;a href=&apos;$picName&apos; target=&apos;$target&apos;&gt;&lt;img src=&apos;$thName&apos; width=&apos;$size[0]&apos; height=&apos;$size[1]&apos; border=&apos;0&apos;&gt;&lt;/a&gt;$this-&gt;imageSpacer"; else return "&lt;a href=&apos;$link&apos; target=&apos;$target&apos;&gt;&lt;img src=&apos;$thName&apos; width=&apos;$size[0]&apos; height=&apos;$size[1]&apos; border=&apos;0&apos;&gt;&lt;/a&gt;$this-&gt;imageSpacer"; } 	// Get the image settings from this advert&apos;s category function getImageLimits { 		//if (!isset($this-&gt;imageLimitsLoaded)) return; global $categoryClassName; $c = new $categoryClassName; $c-&gt;id = $this-&gt;cid; load($c); $this-&gt;imagesAllowed = $c-&gt;imagesAllowed; $this-&gt;imageRemove = $c-&gt;imageRemove; $this-&gt;thumbSizeX = $c-&gt;thumbSizeX; $this-&gt;thumbSizeY = $c-&gt;thumbSizeY; $this-&gt;imageMaxSizeX= $c-&gt;imageMaxSizeX; $this-&gt;imageMaxSizeY= $c-&gt;imageMaxSizeY; $this-&gt;imageLimitsLoaded = true; // Construct the image spacer $this-&gt;imageSpacer = str_replace(array(&apos;$thumbWidth&apos;,&apos;$thumbHeight&apos;), 					array($c-&gt;thumbSizeX$,c-&gt;thumbSizeY),$c-&gt;imageSpacer); // Quick validation test if ($c-&gt;imagesAllowed) { 			if ($c-&gt;thumbSizeX * $c-&gt;thumbSizeY * $c-&gt;imageMaxSizeX * $c-&gt;imageMaxSizeY &lt;= 0) die(&apos;Image dimensions impossible&apos;); } 	} 	function Debug($text=false) { 		if (false) { 			echo $text; if (isset($this-&gt;imageExtensions)) echo array_to_str($this-&gt;imageExtensions); if (isset($this-&gt;picture)) echo array_to_str($this-&gt;picture); } 	} 	 	function renameImage($from$,to) { 		if (!isset($this-&gt;imageExtensions[$from]) || (strlen($this-&gt;imageExtensions[$from]) &lt; 2)) { 			$this-&gt;imageExtensions[$to] = ""; return; } 		$this-&gt;Debug(&apos;Before Rename&lt;br/&gt;&apos;); $s = ""; // Collect the names $thumbNameFrom = $this-&gt;getThumbName($from); $imageNameFrom = $this-&gt;getImageName($from); // Rename the image if (file_exists($imageNameFrom)) { 			$tempExt = $this-&gt;imageExtensions[$to]; $this-&gt;imageExtensions[$to] = $this-&gt;imageExtensions[$from]; $thumbNameTo = $this-&gt;getThumbName($to); $imageNameTo = $this-&gt;getImageName($to); if (rename($imageNameFrom,$imageNameTo)) { 				if (file_exists($thumbNameFrom)) if (rename($thumbNameFrom,$thumbNameTo) == false) $s .= " Thumbnail $thumbNameFrom couldn&apos;t be renamed to $thumbNameTo&lt;br/&gt;"; } 			else { 				$s .= " Image $imageNameFrom couldn&apos;t be renamed to $imageNameTo&lt;br/&gt;"; $this-&gt;imageExtensions[$to]	= $tempExt; } 		} 		$this-&gt;Debug("After Rename:$s&lt;br/&gt;"); return $s; } 	function updatePictureField { 		global $applName, $itemClassName; $newPic = addslashes(createImageExtensionsStringFromArray($this-&gt;imageExtensions)); if ($newPic == $this-&gt;picture) return; $this-&gt;picture = $newPic; $this-&gt;Debug; // Create the extensions string $query = "UPDATE $applName"."_$itemClassName SET picture=&apos;$this-&gt;picture&apos;". " WHERE id=$this-&gt;id"; executeQuery( $query ); }            // DAWID JOUBERT function removeImage(&$s) {     global $whatHappened, $charLimit, $infoText, $lll$,gorumroll; global $immediateAppear, $allowModify, $adminEmail, $itemClassName; // Load this class $this-&gt;id = $gorumroll-&gt;rollid; load($this); global $mainBoxWidth$,mainBoxPadding; $this-&gt;hasGeneralRights($rights); if (!isset($mainBoxWidth)) $mainBoxWidth="100%"; if (!isset($mainBoxPadding)) $mainBoxPadding="2"; $s.=generBoxUp($mainBoxWidth$,mainBoxPadding); $s1=showTools($this$,rights); $s.=generBoxDown; $s.=vertSpacer; restoreFrom; $s.="&lt;center&gt;".$gorumroll-&gt;generAnchor($lll["back"])."&lt;/center&gt;"; hasAdminRights($isAdm); if( !$isAdm && !$allowModify ) {         return; } 	 $infoText = "fdsaafsd"; if (!isset($_GET[&apos;imageID&apos;])) $_GET[&apos;imageID&apos;] = 0; // Remove image and let user know if (is_numeric($_GET[&apos;imageID&apos;])) { 		$i = abs($_GET[&apos;imageID&apos;]); $infoText = "$i"; // Delete this image if( $this-&gt;picture ) {			 			$this-&gt;getImageExtensions; if (!isset($this-&gt;imageExtensions[$i])) { 				$infoText = $lll["missingImage"]; return; } 			$imgName = $this-&gt;getImageName($i); if (file_exists($imgName)) { 				cleanDelete($imgName); cleanDelete($this-&gt;getThumbName($i)); $infoText = "Image $i has been deleted. "; // Now move down any other images by renaming them. This is the difficult part! $limit = count($this-&gt;imageExtensions); for ($i=$i+1;$i &lt; $limit;$i++) { 					$infoText .= $this-&gt;renameImage($i$,i-1); }	 				// Now we must update this $-&gt;Picture $this-&gt;updatePictureField; } 			else $infoText = $lll["missingImage"]; } 		else $infoText = $lll["missingImage"]; } 	else $infoText =$lll["missingImage"]; } // Map Functionality /**********************************/

gorum/form.php
Open gorum/form.php and modify generForm(..) by adding this to the massive if branch. elseif( in_array("file",$val)) {            $s.=generFileField($attr$,txt, $expl,                                $inputLength, $fieldLength,                                "cell", "", $afterField); } 		// DAWID elseif( in_array("multiple file",$val)) { 			$count = $val["count"]; $s.=generFileField($attr$,txt, $expl, 							  $inputLength, $fieldLength, 							   "cell", "", $afterField,$count, 							   isset($val["extraLabel"]) ? $val["extraLabel"] : false, 							   isset($val["showCount_dj"]) ? $val["showCount_dj"] : false); }		 		// DAWID elseif( in_array("text",$val) ) {            $s.=generTextField("text",$attr$,txt, $expl,                                 $base-&gt;{$attr},$inputLength$,fieldLength,                                "cell", "", TRUE, $afterField); }

gorum/generformlib_filebutton.php
Open gorum/generformlib_filebutton.php and go to generFileField(..) and copy the changes (or replace the entire function)

// DAWID JOUBERT function generMultipleFileJavascript($count,$postText,$idUsed,$theHiddenValue,$shownCount="1",$preText="my",$style=&apos;&apos;) { 	// The big problem is getting init events to load with the page... return "\n&lt;script type=\"text/javascript\"&gt; &lt;!-- var maxElements$idUsed = $count; var currentID$idUsed = -1; var addTextLine; function addEvent$idUsed { 	if ((currentID$idUsed &lt; 0) || (currentID$idUsed &gt;= maxElements$idUsed)) 	{ 		addTextLine.className = \"hiddenRow\";	 		return; 	} 	var ni = document.getElementById(\"$preText\"+currentID$idUsed+\"$postText\"); 	ni.className = \"$style\"; 	currentID$idUsed++; 	if ((currentID$idUsed &lt; 0) || (currentID$idUsed &gt;= maxElements$idUsed))  	{ 		addTextLine.className = \"hiddenRow\";	 		return; 	}	 } function initEvents$idUsed { 	var start =$shownCount; 	for (i = start;i	&lt;	maxElements$idUsed;i++) 	{ 		var ni = document.getElementById(\"$preText\"+i+\"$postText\"); 		ni.className = \"hiddenRow\"; 	} 	currentID$idUsed = start; 	addTextLine = document.getElementById(\"$preText"."addText"."$postText\"); 	addTextLine.className = \"$style\"; return true; } //--&gt; &lt;/script&gt; &lt;style type=\"text/css\"&gt; &lt;!-- .hiddenRow { 	display:none; } .shownRow { } --&gt; &lt;/style&gt;"; } // DAWID JOUBERT: Count is used and it represents how many consecutive files the user may upload. // If this is more than one it will add so many fields, including dynamic html (javascript for it). // It will take the field&apos;s name and parse a number to it at the end, removing the last current character. // So if you want to use this feature make sure your $name=image0 because 0 will be replaced with the integer count function generFileField($name,$label,$explText,$size="",$maxlength="",                        $tdCl="", $spanCl="", $afterField="",$count=1,$extraLabel = false,$showCount = 1) {     global $list2Colors, $jsElementCount;     $s="";     $labelCl="label";     if (isset($list2Colors))  	{         if ($list2Colors && $tdCl=="cell") {             $tdCl="cell2";             $labelCl="label2";         }         $list2Colors = ($list2Colors + 1) % 2;     } // Dawid Joubert if ($count &gt; 1) { 		$addMore = true; $preText = &apos;my&apos;; $postText = $name; $idUsed = $preText$.postText; $newName = substr($name,0,-1);	// Remove last character // Okay now generate our javascript! } else $addMore = false; // Dawid joubert // First construct our template field for ($i = 0;$i &lt; $count;$i++) { 		// First Cache the new field $t=""; $t.="&lt;tr"; if ($tdCl!="") $t.=" class=&apos;$tdCl&apos;"; if ($addMore) $t.=" id=&apos;$preText$i$postText&apos;"; $t.="&gt;&lt;td"; if ($tdCl!="") $t.=" class=&apos;$labelCl&apos;"; $t.="&gt;"; if ($spanCl!="") $t.="&lt;span class=&apos;$spanCl&apos;&gt;"; if ($i == 0) $t.=$label; if (isset($extraLabel[$i])) $t.=$extraLabel[$i]; if ($spanCl!="") $t.="&lt;/span&gt;"; if($explText && $i = 0) $t.=generExplanation($label,$explText); $t.="&lt;/td&gt;&lt;td&gt;\n"; if ($addMore) $name = $newName$.i; 			$t.="&lt;input type=&apos;FILE&apos; name=&apos;$name&apos;"; if ($size!="") $t.=" size=&apos;$size&apos;"; if ($maxlength!="") $t.=" maxlength=&apos;$maxlength&apos;"; $t.="&gt;\n"; $jsElementCount++; $t.=$afterField; $t.="&lt;/td&gt;&lt;/tr&gt;\n"; // Done caching $s.=$t; } 	// Dawid if ($addMore) { 		if ($showCount != $count) { 			// Show the add more button $t=""; $t.="&lt;tr"; if ($tdCl!="") $t.=" class=&apos;hiddenRow&apos;"; $t.=" id=&apos;$preText"."addText"."$postText&apos;"; $t.="&gt;&lt;td&gt;&lt;/td&gt;&lt;td"; if ($tdCl!="") $t.=" class=&apos;$labelCl&apos;"; $t.="&gt;"; if ($spanCl!="") $t.="&lt;span class=&apos;$spanCl&apos;&gt;"; $t.="&lt;a href=\"javascript:;\" onclick=\"addEvent$idUsed;\"&gt;Add another File&lt;/a&gt;"; if ($spanCl!="") $t.="&lt;/span&gt;"; $t.="&lt;/td&gt;&lt;/tr&gt;\n"; $s.= $t; } 		// Insert the javascript just before &lt;/head&gt; global $g_Extras$,g_extraDoOnLoad; $g_Extras.= generMultipleFileJavascript($count$,postText$,idUsed$,name+time,$showCount$,preText$,tdCl); $g_extraDoOnLoad .= "initEvents$idUsed;\n"; }    return $s; }

gorum/object.php
Modify it to this function getDefault( $typ, $attr ) { 	// DAWID if( !isset( $typ["attributes"][$attr] ) ) { return ""; } 	// DAWID else $attrInfo = & $typ["attributes"][$attr]; //if (!isset($attrInfo["type"])) echo "attr:$attr "; if( isset($attrInfo["default"]) ) { return $attrInfo["default"]; }    //if(!isset($attrInfo["type"])) echo $attr; if( ereg("INT", $attrInfo["type"]) ) { return 0; // Note: even if min==1 !!! }    if( ereg("CHAR", $attrInfo["type"]) ) { return ""; // Note: even if min==1 !!! }    if( ereg("TEXT", $attrInfo["type"]) ) { return ""; } }

constants.php
Add this anywhere in constants.php

$allowedMethods["remove_image"] = '$base->removeImage(&$s);';

gorum/init.php
Add this to the bottom of function showHtmlHead

elseif ($language=="lt") { $s.="&lt;META HTTP-EQUIV=&apos;content-type&apos; CONTENT=&apos;text/html;". " charset=windows-1257&apos;&gt;"; }    $s.="$headTemplate\n"; $s.=$this-&gt;showCss; // DAWID JOUBERT HOOK—needed for javascript hooking global $g_Extras$,g_extraDoOnLoad; $s.=$g_Extras; $s.=" &lt;script type=\"text/javascript\"&gt; &lt;!-- function doOnLoad { 	$g_extraDoOnLoad } //--&gt; &lt;/script&gt;"; $s.="&lt;/head&gt;\n"; // DAWID JOUBERT return $s; }

Source Code
Download here: http://www.noah.inv.pl/forum/index.php?topic=228.msg656#msg656

Trouble Shooting
Having trouble copying source from wiki?

Wiki errs on some of the characters.. many ' have been changed to &apos; and should be reverted

Italian Language
The Italian language file has been translated. Here it is:

&lt;?php // If you don&apos;t find a language file in your language in this directory, // you should translate this file and save as &apos;lang_xx.php&apos; (where xx // is the country abbreviation). For how to translate, you can take the // already translated files as an example. // // Some instructions: don&apos;t insert any new line breaks in the file however long // a line is! Don&apos;t rewrite anything else, only what you translate! Don&apos;t // change the order of the lines! Don&apos;t write any spaces or new lines after the last line of the file // (careful! some text editors put new lines at the end of the files automatically)! // // Translate the other language file, too: &apos;gorum/lang/lang_en.php&apos;! // If you are ready with the files, you must write the following line // in &apos;constants.php&apos; to activate the new language: // $language="xx"; // (of course without the leading &apos;//&apos; comment tag) // // If you are ready with the translation, please, send us the translated // language files (classifieds@phpoutsourcing.com), so that we can release // them in the next version! // // New for translation: $lll["settings_showSubmitAd_expl"]="If this is unchecked, only admin can submit an ad"; $lll["settings_expiration_expl"]="0 means that the ads never expire - i.e. expiration disabled.&lt;br&gt;&lt;br&gt;Warning: Once you disable ad expiration, don&apos;t re-enable it again later any more!"; $lll["u_maintitle"]="Noah&apos;s Classifieds update process"; $lll["secure_copy"]="It is recommended to save a rescue copy from the old version of Noah&apos;s Classifieds before the update.&lt;br&gt;Copy the program files in a separate directory and make a data base dump for sure!&lt;br&gt;Click OK to continue, or Cancel to abort the update process!"; $lll["ready_to_update"]="Ready to update data base %s to version %s?&lt;br&gt;"; $lll["invalid_version"]="The given version is invalid: %s"; $lll["updateSuccessful"]="The update successfully completed.&lt;br&gt;Hint: As admin, click on the &apos;Check&apos; menu point to view the state of the classifieds system!"; $lll["updating"]="Updating from version %s to version %s..."; $lll["already_installed"]="The given software version %s is already installed."; $lll["backToForum"]="Return to the classifieds."; $lll["settings_showChangePassword"]="Mostra &apos;Cambia password&apos;"; $lll["settings_showLogout"]="Mostra &apos;Logout&apos;"; $lll["settings_showLogin"]="Mostra &apos;Login&apos;"; $lll["settings_showRegister"]="Mostra &apos;Registra&apos;"; $lll["settings_showMyProfile"]="Mostra &apos;Il Mio Profilo&apos;"; $lll["settings_showMyAds"]="Mostra &apos;I Miei Annunci&apos;"; $lll["settings_showSubmitAd"]="Mostra &apos;Invia Annuncio&apos;"; $lll["settings_showRecentAds"]="Mostra &apos;Annunci Recenti&apos;"; $lll["settings_showMostPopularAds"]="Mostra &apos;Annunci Popolari&apos;"; $lll["settings_showSearch"]="Mostra &apos;Cerca&apos;"; $lll["settings_showHome"]="Mostra &apos;Home&apos;"; $lll["menuPointsSep"]="Impostazioni Menu"; $lll["expirationProperties"]="Impostazioni scadenze"; $lll["imageProperties"]="Limiti upload immagini"; $lll["otherProperties"]="Altre Configurazioni"; $lll["settings_renewal"]="Numero volte che un utente puo&apos; prolungare la scadenza del suo annuncio"; $lll["settings_allowModify"]="L&apos;utente puo&apos; modificare il suo annuncio"; // ShoppingCart: $lll["addToChart"]="Aggiungi al carrello"; $lll["shoppingCartLink"]="Link al carrello"; $lll["addedToTheCart"]="The item has been added to the end of the cart. Increase the amount if you want to purchase more items!"; $lll["shoppingcart"]="shopping cart item"; $lll["shoppingcart_ttitle"]="My shopping cart"; $lll["shoppingcart_recent_ttitle"]="Most recent purchases"; $lll["shoppingcart_track_ttitle"]="My purchases"; $lll["shoppingcart_title"]="Item title"; $lll["shoppingcart_ownerName"]="User"; $lll["shoppingcart_amount"]="Amount"; $lll["shoppingcart_price"]="Prezzo"; $lll["myCart"]="My shopping cart"; $lll["advertisement_price"]="Prezzo"; $lll["total"]="Prezzo totale"; $lll["purchase"]="Purchase"; $lll["amountModified"]="The amount has been successfully modified."; $lll["loginToPurchase"]="You must log in first to add an item to your shopping cart."; $lll["classifiedsuser_viewOrdersLink"]=""; $lll["viewOrders"]="View orders"; $lll["usersShoppingCart"]="Orders of %s"; $lll["shoppingcart_orderNumber"]="Order #"; $lll["shoppingcart_orderDate"]="Purchase-shippment date"; $lll["shoppingcart_status"]="Status"; $lll["shoppingcart_status_".Shoppingcart_new]="New"; $lll["shoppingcart_status_".Shoppingcart_payed]="Payed"; $lll["shoppingcart_status_".Shoppingcart_processed]="Shipped"; $lll["ordered"]="p: %s"; $lll["shipped"]="s: %s"; $lll["recentPurchases"]="Recent purchases"; $lll["trackPurchases"]="My purchases"; $lll["classifiedsuser_fullName"]="Full name"; $lll["classifiedsuser_address"]="Address"; $lll["classifiedsuser_city"]="City"; $lll["classifiedsuser_state"]="State"; $lll["classifiedsuser_zipCode"]="Zip code"; $lll["purchaseSuccessful"]="Your purchase has been successfully completed"; $lll["purchaseFailed"]="Your purchase has been failed"; $lll["purchaseFailedNetworkError"]="Your purchase has been failed, since VeriSign couldn&apos;t access the MIJ site. Please, contact the site administrator!"; //confcheck $lll["mailok"]="Il test di invio e.mail e&apos; stato superato brillantemente."; $lll["mailerr"]="Ho riscontrato i seguenti errori durante il test di invio e.mail:&lt;br&gt;%s"; $lll["mailerr_expl"]="There are some features in Noah&apos;s Classifieds that necessitates sending out mails. Our program applies standard mail headers which are readable by the majority of mail servers. However, there are some mail servers (mostly Windows based) that would require a non-standard mail header. With these mail servers (yours seems to be amongst (or you might not have a mail server at all!), unfortunately), Noah&apos;s Classifieds may not be able to send out mails."; $lll["here1"]="click qui"; $lll["confpreerr"]="There are some characters before the &lt;? in the config file! Please delete these characters (newlines and spaces too)!"; $lll["confposterr"]="There are some characters after the ?&gt; in the config file! Please delete these characters (newlines and spaces too)!"; $lll["conffileok"]="The config file seems to be ok."; $lll["congrat"]="Congratulazioni! Hai installato con successo bachecaweb!"; $lll["confcheck"]="System configuration checking..."; $lll["confdisapp"]="If you want to begin to work with the software and you want this page to disappear"; $lll["confclicheck"]="You can access this configuration checking page whenever you want if you click on the &apos;Check&apos; link in the menubar."; $lll["chadmemail"]="Your current email adress is admin@admin.admin. Please set it correctly clicking on the &apos;My profile&apos; link on the menubar!"; $lll["chsyspass"]="Your current system email adress is system@system.system. Please set it correctly clicking on the &apos;Settings&apos; link on the menubar!"; $lll["chadmpass"]="The default admin password is not changed yet! Please change it clicking on the &apos;Change password&apos; link on the menu bar!"; $lll["settings_adminEmail"]="System email"; $lll["nogd"]="Warning: your server doesn&apos;t have an installed GD library."; $lll["nogd_expl"]="(This library is responsible in php programs for the image manipulation, so it might be anyway useful if you put it on your server. In our program it is called for creating thumbnail images to the full sized uploaded pictures. Without this support the program can&apos;t generate thumbnails, this way the browser have to shrink &apos;on-the-fly&apos; each big image in each pages where thumbnails can appear. This method works, but it is far from effective (the page have to download every time every big image). )"; $lll["nopermission"]="The server process has no write permission under the &apos;pictures/listings&apos; and/or &apos;pictures/cats&apos; directories.&lt;br&gt;You should go in &apos;pictures&apos; and execute the following Unix command (in Unix systems, of course):&lt;br&gt;&lt;i&gt;chmod 777 listings cats&lt;/i&gt;"; $lll["nopermission_expl"]="(Noah&apos;s Classifieds tries to save the advertisement pictures under &apos;pictures/listings&apos; and the category pics under &apos;pictures/cats&apos;. You have to make sure the program has enough permission to do this.)"; //- $lll["ss_blue"]="Blue"; //general $lll["name"]="Nome"; $lll["home"]="Home"; //user overwritten: $lll["classifiedsuser"]=$lll["user"]; $lll["classifiedsuser_newitem"]=$lll["user_newitem"]; $lll["classifiedsuser_name"]="Username"; $lll["classifiedsuser_email"]=$lll["user_email"]; $lll["classifiedsuser_lastClickTime"]=$lll["user_lastClickTime"]; $lll["classifiedsuser_password"]=$lll["user_password"]; $lll["classifiedsuser_passwordCopy"]=$lll["user_passwordCopy"]; $lll["classifiedsuser_rememberPassword"]=$lll["user_rememberPassword"]; $lll["classifiedsuser_notes"]=$lll["user_notes"]; $lll["classifiedsuser_create_form"]=$lll["user_create_form"]; $lll["classifiedsuser_remind_password_form"]=$lll["user_remind_password_form"]; $lll["classifiedsuser_login_form"]=$lll["user_login_form"]; $lll["classifiedsuser_modify_form"]=$lll["user_modify_form"]; $lll["classifiedsuser_change_password_form"]=$lll["user_change_password_form"]; $lll["classifiedsuser_ttitle"]="Utenti"; $lll["paymentSection"]="Informazioni Pagamento"; $lll["loggedinas"]="Sei entrato come %s."; $lll["regorlog"]="Registrati o fai il login!"; $lll["my_profile"]="Il Mio Profilo"; //category: $lll["classifiedscategory"]=$lll["category"]; $lll["classifiedscategory_newitem"]=$lll["category_newitem"]; $lll["classifiedscategory_create_form"]=$lll["category_create_form"]; $lll["classifiedscategory_modify_form"]=$lll["category_modify_form"]; $lll["classifiedscategory_allowAd"]="Consenti annunci"; $lll["classifiedscategory_description"]="Descrizione"; $lll["classifiedscategory_picture"]="Immagine"; $lll["classifiedscategory_ttitle"]="Categorie Annunci"; $lll["cat_main_tit"]="Categorie Annunci"; $lll["modcat"]="Modifica questa Categoria"; $lll["delcat"]="Cancella questa Categoria"; $lll["subcats"]="Sottocategorie"; $lll["itemnum"]="Annunci"; $lll["directsubcats"]="Sottocategorie dirette"; $lll["directitemnum"]="Annunci diretti"; // Dawid Joubert Image Editing $lll["imagesAllowed"]="Numero di immagini permesse"; $lll["thumbSizeX"]="anteprima size X"; $lll["thumbSizeY"]="Anteprimasize Y"; $lll["imageMaxSizeX"]="Massima dimensione dell&apos;immagine asse X"; $lll["imageMaxSizeY"]="Massima dimensione dell&apos;immagine asse Y"; $lll["imageSpacer"]="Testo HTML da inserire dopo ogni immagine (usato come spazio)"; $lll["pictureTemp"]=&apos;Immagini&apos;; $lll["imageFileNotLoaded"]=&apos;Immagine non salvata/creata!&apos;; $lll["removeImage"] = "Rimuovi questa immagine"; $lll["missingImage"] = "L&apos;immagine non esiste, impossibile rimuoverla!"; $lll["detail_removeImage"] = "Rimuovi immagine"; $lll["imageRemove"] = "Abilitare il bottone di rimozione immagine?"; //advertisements: $lll["advertisements"]="Annunci"; $lll["advertisement"]="Annunci"; $lll["advertisement_newitem"]="Invia Annuncio"; $lll["advertisement_create_form"]="Invia Annuncio"; $lll["advertisement_modify_form"]="Modifica Annuncio"; $lll["advertisement_title"]="Titolo"; $lll["advertisement_ttitle"]="Annunci in questa Categoria"; $lll["advertisement_my_ttitle"]="I Miei Annunci"; $lll["advertisement_description"]="Descrizione"; $lll["advertisement_cid"]="Categoria"; $lll["advertisement_cName"]="Categoria"; $lll["advertisement_clicked"]="Visto"; $lll["advertisement_responded"]="Risposte"; $lll["advertisement_ISSN"]="ISSN"; $lll["advertisement_example"]="Esempio"; $lll["advertisement_expirationTime"]="Giorni rimanenti prima della scadenza"; $lll["keepPrivate"]="Nascondi i campi Privati"; $lll["expirationProlonged"]="La data di scadenza e&apos; stata prolungata con successo."; $lll["prolongExp"]="Prolunga"; $lll["lastRenewal"]="&lt;br&gt;Questo era l&apos;ultimo prolungamento possibile."; $lll["rating"]="Rating"; $lll["advertisement_keywords"]="Parole"; $lll["advertisement_frequency"]="Frequenza"; $lll["advertisement_url"]="URL"; $lll["advertisement_my_title"]="I Miei Annuci"; $lll["advertisement_inactive_title"]="Immissioni inattive"; $lll["advertisement_active"]=$lll["item_active"]; $lll["ad_limit_exc"]="Il limite massimo e&apos; di %s caratteri. Tu hai scritto %s caratteri! Abbrevia il tuo annuncio, grazie!"; $lll["inactives"]="Annunci inattivi"; $lll["new_resp"]="Rispondi a questo annuncio"; $lll["response_create_form"]="Rispondi a questo annuncio"; $lll["yourname"]="Il tuo nome"; $lll["youremail"]="La tua Email"; $lll["friendsname"]="Il nome del tuo amico"; $lll["friendsemail"]="La Email del tuo amico"; $lll["response_mess"]="Il tuo messaggio"; $lll["friendmail_mess"]="Il tuo messaggio"; $lll["mail_sent"]="L&apos;annuncio e&apos; stato inviato correttamente."; $lll["mail_fr_sent"]="Abbiamo inviato l&apos;Email al tuo amico."; $lll["clickclose"]="Chiudi questa finestra."; $lll["new_frie"]="Invia annuncio ad un amico"; $lll["friendmail_create_form"]="Invia annuncio ad un amico"; $lll["advertisementActive"]="Annuncio Approvato"; $lll["advertisementInactive"]="Annunci in Attesa"; $lll["advertisement_active"]="Approvato"; $lll["advertisement_picture"]="Immagine"; $lll["advertisement_active_ttitle"]="Annunci Approvati"; $lll["advertisement_inactive_ttitle"]="Annunci in Attesa"; $lll["approve"]="approva"; $lll["adApproved"]="L&apos;annuncio e&apos; stato approvato"; $lll["adScheduled"]="e&apos; in attesa di approvazione. Riceverai una e.mail di notifica."; $lll["N/A"]="N/A"; $lll["popular"]="Piu&apos; popolari"; $lll["advertisement_popular_ttitle"]="Lista Annunci Popolari"; $lll["adnum"]="annunci"; // picture upload $lll["picFileSizeToLarge1"]="Errore! Non posso aprire l&apos;immagine allegata, o l&apos;immagine e&apos; troppo grande."; $lll["picFileSizeNull"]="L&apos;immagine allegata presenta degli errori."; $lll["picFileSizeToLarge2"]="L&apos;immagine scelta come allegato supera il massimo consentito di %s byte"; $lll["picFileDimensionToLarge"]="Le dimensioni dell&apos;immagine scelta come allegato superano il massimo consentito di %s x %s"; $lll["notValidImageFile"]="Il file scelto non e&apos; una immagine valida (deve essere gif, jpg, o png)."; $lll["cantOpenFile"]="Errore nell&apos;apertura del file!"; $lll["cantdelfile"]="Alcune immagini caricate potrebbero non essere state cancellate."; //globalsettings $lll["settings_expiration"]="Giorni alla scadenza dell&apos;annuncio"; $lll["settings_expNoticeBefore"]="Numero di giorni antecedenti in cui l&apos;utente viene avvisato della scadenza del suo annuncio"; $lll["settings_charLimit"]="Numero dei caratteri massimi consentiti per un annuncio"; $lll["settings_immediateAppear"]="Un nuovo annuncio appare immediatamente"; $lll["settings_blockSize"]="Annunci mostrati per pagina"; $lll["settings_maxPicSize"]="Pesantezza massima dell&apos;immagine in bytes"; $lll["settings_maxPicWidth"]="Larghezza massima dell&apos;immagine in pixels"; $lll["settings_maxPicHeight"]="Altezza massima dell&apos;immagine in pixels"; $lll["settings_thumbnailWidth"]="Larghezza Thumbnail"; $lll["settings_thumbnailHeight"]="Altezza Thumbnail"; //search $lll["classifiedssearch"]="Cerca"; $lll["classifiedssearch_type_".search_all]=$lll["search_type_".search_all]; $lll["classifiedssearch_type_".search_any]=$lll["search_type_".search_any]; $lll["classifiedssearch_relationBetweenFields_".search_allFields]="tutte le condizioni"; $lll["classifiedssearch_relationBetweenFields_".search_anyFields]="qualsiasi condizione"; $lll["classifiedssearch_create_form"]="Cerca Annunci"; $lll["classifiedssearch_modify_form"]=$lll["search_modify_form"]; $lll["classifiedssearch_autoNotify"]=$lll["search_autoNotify"]; $lll["classifiedssearch_relationBetweenFields"]="Cerca risultati che includono"; $lll["classifiedssearch_str"]=$lll["search_str"]; $lll["classifiedssearch_type"]=$lll["search_type"]; $lll["classifiedssearch_cid"]="Categoria"; $lll["classifiedssearch_title"]="Contenuto del titolo"; $lll["allCategories"]="Tutte le categorie"; $lll["advertisement_search_ttitle"]="Risultati della Ricerca"; $lll["advancedSearch"]="Ricerca avanzata nella catagoria - cerca annuncio che:"; $lll["contains"]=" contiene"; $lll["is"]=" e&apos;"; $lll["any"]="qualsiasi"; $lll["forAddvancedSearch"]="Per una ricerca avanzata in una specifica Categoria, entra nella Categoria prescelta e clicca su &apos;Cerca&apos;!"; // Variable Fields // fatto sino a qui guido $lll["variableFields"]="Definisci variabili"; $lll["varfields_modify_form"]="Definisci le variabili per gli annunci di questa categoria"; $lll["varfields_modifydetails_form"]="Dettagli dei campi variabili"; $lll["varfields"]="Variabili"; $lll["defineTheValues"]="Definisci i valori possibili del campo di selezione."; $lll["defineTheName"]="Definisci il nome dei campi attivi."; $lll["mustBeCommaSeparated"]="I valori possibili devono essere separati da virgola"; $lll["invalidDefaultValue"]="Il valore di Default deve essere uno dei valori separati da virgola del campo di selezione."; $lll["descriptionDefaultLabel"]="Descrizione"; $lll["showCreationTime"]="Mostra data di Creazione nella Lista"; $lll["showExpirationTime"]="Mostra data di Scadenza nella Lista"; $lll["privateField"]="Privato"; global $variableFieldsNum; for( $i=0; $i&lt;$variableFieldsNum; $i++ ) {    $lll["type_$i"."_".varfields_text]="Text"; $lll["type_$i"."_".varfields_textarea]="Textarea"; $lll["type_$i"."_".varfields_bool]="Boolean"; $lll["type_$i"."_".varfields_selection]="Seleziona"; $lll["type_$i"."_".varfields_multipleselection]="Seleziona Multipla"; $lll["type_$i"."_".varfields_separator]="Separatore"; $lll["name_$i"]="Nome"; $lll["type_$i"]="Tipo"; $lll["type_$i"."_expl"]="Note: To avoid type conflicts, if you have ever set this column to active and there are already advertisements in this category, you can&apos;t change the type any more. If you insist on changing the type anyway, you have to remove all advertisements from the category first."; $lll["default_$i"]="Valore di Default"; $lll["active_$i"]="Attivo"; $lll["separator_$i"]="Colonna ".($i+1)."."; $lll["mandatory_$i"]="Obbligatorio"; $lll["list_$i"]="Appare nella lista"; $lll["values_$i"]="Valori Possibili"; $lll["innewline_$i"]="Inserisci in una nuova linea"; $lll["searchable_$i"]="Ricercabile"; $lll["badwords_$i"]="Applica Bad Words"; $lll["allowHtml_$i"]="Consenti HTML"; $lll["private_$i"]="Consenti Annuncio Privato"; $lll["hidden_$i"]="Visibile solo da Admin"; $lll["format_$i"]="Display format"; $lll["format_$i"."_expl"]="You can use it a C-style sprintf format string"; } // Ha ez be van allitva akkor a formokban a privatta teheto mezok neve // utan irodik: $lll["private_field"]="(private)"; // Menu points: $lll["classifiedscategory_new"]=$lll["category_new"]; $lll["classifiedscategory_del"]=$lll["category_del"]; $lll["classifiedscategory_mod"]=$lll["category_mod"]; $lll["advertisement_my"]="I Miei Annunci"; $lll["advertisement_Active"]="Annunci Approvati"; $lll["advertisement_Inctive"]="Annunci in Attesa"; $lll["advertisement_recent"]="Annunci Recenti"; $lll["advertisement_popular"]="Annunci Popolari"; //misc $lll["myads"]="I Miei Annunci"; $lll["modcss"]="Stylesheet"; $lll["creationtime"]="Creato"; $lll["allemails"]="Email"; $lll["allemails_tit"]="Tutte le Email nel sistema"; $lll["recentadded"]="Annunci Recenti"; $lll["advertisement_all_ttitle"]="Annunci aggiunti di recente"; $lll["registerOrLoginToSubmit"]="Registrati e fai il login per inviare i tuoi annunci!"; $lll["selectSubcat"]="Seleziona una sottocategoria per inserirvi il tuo annuncio!"; $lll["loggedas"]="Sei entrato come %s."; $lll["logorreg"]="Registrati o fai il login."; $lll["showpic"]="Immagine"; ?&gt;