跳转到内容

理解诺亚分类广告/多图片扩展

来自维基教科书,开放世界开放书籍

在诺亚分类广告中,广告只能提交一张图片,我们想要提交 n 张图片。

首先你需要这个新文件,将其保存为 image.php 在你的诺亚根文件夹中。 Image.php 源代码

目标功能

[编辑 | 编辑源代码]

现在让我们首先谈谈我们的目标。我们想要以下功能

  • 显然所有创建的数据都必须在广告删除时删除
  • 使用 HTML 文本作为图片之间的分隔符
  • 动态创建上传字段,使提交不混乱
  • 删除单个图片而不删除广告
  • 允许动态设置 maxImageCount、maxImageSize、maxImageThumb 以及是否可以使用单个删除功能

以下是最终结果的快照



修改 gorum/dbproperty.php

[编辑 | 编辑源代码]

因为任何和所有 object_vars 都自动保存到数据库中,所以使用 $this->data 将数据从一个函数传递到另一个函数存在问题。为了解决这个问题,需要对 dbproperty.php 进行以下修改

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

修改 gorum/object.php

[编辑 | 编辑源代码]

更改 getVisibility 函数,如所示

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

添加新的数据库字段

[编辑 | 编辑源代码]

首先,我们需要在我们的分类数据库(表:classifieds_classifiedscategory)中添加 7 行新数据

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'

这些是我添加的新行。从信息中可以看出,imagesAllowed 的范围为 0-16,thumbSize 为 0-1024,imageSize 为 0-2048。如果这些数字太小或太大,请根据需要调整,以避免占用大量数据库空间。

以下是添加这些内容的 SQL 脚本

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 '
<img src="i/spacer.gif" alt="." width="$thumbWidth" height="20" />', ADD `imageRemove` INT( 2 ) DEFAULT '1' NOT NULL ;

修改 Category.php

[编辑 | 编辑源代码]

将这些添加到文件顶部,紧接在下面显示的这个之后。这些告诉诺亚我们已经向数据库添加了新字段

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

修改 lang_en.php 以保持与语言方案一致

[编辑 | 编辑源代码]

现在我们还需要将以下内容添加到 lang_en.php(以及你计划使用的所有其他语言)。为了保持一致性,请在“Category”注释之后添加它

// Dawid Joubert Image Editing
$lll["imagesAllowed"]="Number of Images Allowed";
$lll["thumbSizeX"]="Generated Thumbnails' size X";
$lll["thumbSizeY"]="Generated Thumbnails' 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"]='Pictures';
$lll["imageFileNotLoaded"]='Image file not saved/created!';
$lll["imageRemoveEnabled"] = 'Enable Image Remove Button ';
$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?";

一致性和假设

[编辑 | 编辑源代码]

图片保存在 "$adAttDir/$this->id".".".$ext" 下,它们的缩略图保存在 "$adAttDir/th_$this->id".".".$ext" 下。这种格式对于存储单个图片来说没有问题,但对于存储多个图片来说就存在问题了。所以我们将对其进行修改。

首先,为了保持向后兼容性,我们将保留当前格式的第一个图片,但第二个、第三个和第 n 个图片将采用这种模式。

完整图片:"$adAttDir/$this->id"."-$i.".$this->picture"

缩略图:"$adAttDir/th_$this->id"."-$i.".$this->picture"

其中 $i 是图片编号,从 0 开始,所以如果用户有 6 个 jpeg 图片,它们将以以下方式命名

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	//	""

函数扩展名将以逗号分隔的格式保存到广告的 picture 行中,例如 "jpg,gif,jpg",然后我们将这种格式拆分为一个数组,例如 array("jpg","gif","jpg")。

所以我们需要修改这些函数以及其他一些函数

  • delete()
    当您删除广告时,会调用此函数
  • showListVal()
    此函数用于显示广告列表和广告本身中的所有信息。我们需要此函数,以便它现在在查看广告详细信息时列出所有图片
  • activateVariableFields()
    需要修改此函数,以便它显示上传 n 张图片的选项
  • storeAttatchment()
    修改,以便它实际存储所有传入的图片
  • showDetials()
    显示广告的详细信息视图

在 Advertisement.php 中删除

[编辑 | 编辑源代码]

替换内部的所有内容

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

使用这个,使整个块看起来像(现在任何人都敢说这看起来不干净!!!)

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

advertisement.php 中的 showListVal()

[编辑 | 编辑源代码]

替换其中的所有内容

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

使用。

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

隐藏原始 PICTURE 元素,advertisement.php

[编辑 | 编辑源代码]

在 advertisement.php 的顶部是 $item_typ["attributes"]["picture"] = {..}; 将此添加到数组 "form invisible" 中,这将确保在修改/创建添加时不将其添加到表单中。上述声明现在将如下所示。

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

// 2007-01-16 修复

在 advertisement.php 中激活 ActivateVariableFields()

[编辑 | 编辑源代码]

修改函数,如所示

	// 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->Debug();	
	if (($gorumroll->method == "modify_form") || ($gorumroll->method == "create_form"))
	{
		$this->getImageExtensions();
		$this->getImageLimits();			
		$i = 0;
		$lll["picture0"]=$lll["pictureTemp"];	// Creates language thingies
		$showCount=0;
 		$temp = "";
		for ($i = 0;$i	<	$this->imagesAllowed;$i++)
		{
			// Generate remove text
			if (($gorumroll->method == "modify_form") && ($this->imageRemove))
			{
				$tempRoll = $gorumroll;
				$tempRoll->list = $itemClassName;
				$tempRoll->method = "remove_image";
				$tempRoll->rollid = $this->id;			
				$tempRoll->imageID = $i;
				saveInFrom($tempRoll);
				$remText = $tempRoll->generAnchor($lll["removeImage"]);
			} else $remText = "";
			// Just make the output equal to a single image
			$temp2 = (file_exists($this->getImageName($i)) ? $this->getImageHTML($i) : "");
			if ($temp2 != "") 
			{
				$showCount++;
				$temp2 .='<br/>'.$remText;
			}
			$temp[$i] = '<br />'.$temp2;		
		}
		if ($showCount == 0) $showCount = 1;
		$item_typ["attributes"]["picture0"] =  
				array(
					"type"=>"VARCHAR",
					"multiple file",
					"max" =>"250",
					"count" => $this->imagesAllowed,
					"extraLabel" => $temp,
					"showCount_dj" => $showCount
				 );			
	};
	// NEW CODE DAWID

valid(),advertisement.php

[编辑 | 编辑源代码]

此函数验证上传的单个图像,然后再存储图像。其余验证由它继承的类完成。删除所有内容。

storeAttachment(),advertisement.php

[编辑 | 编辑源代码]

此函数几乎完全被修改,只需复制新的函数。

 function storeAttachment()
{
    global $HTTP_POST_FILES;
    global $whatHappened, $lll, $infoText;
    global $adAttDir, $applName, $itemClassName;
    global $maxPicSize;
	
	// New code
    // Load this class
	$this->getImageLimits();		// Get the dimensions and stuff allowed
	$this->getImageExtensions();
	$parsedAtleastOne = false;
	$count = 0;
	// Loop for every image allowed
	for ($i = 0;$i	<	$this->imagesAllowed;$i++)
	{		
		if ((isset($this->imageExtensions[$count]) == false))
			$this->imageExtensions[$count] = ".";
			
		if (strlen($this->imageExtensions[$count]) > 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't exists?? WTF");			
			continue;
		}

		if (strstr($HTTP_POST_FILES[$ind]["name"]," "))
		{
        	$infoText .= $lll["spacenoatt"].'<br />';
			continue;
	    }
	
	    if ($HTTP_POST_FILES[$ind]["tmp_name"]=="none")
			continue;
			
	    if ($HTTP_POST_FILES[$ind]["size"] > $maxPicSize) 
		{
	        $infoText .= sprintf($lll["picFileSizeToLarge2"], $maxPicSize).'<br />';
			continue;			
	    }
		
		$fname=$HTTP_POST_FILES[$ind]["tmp_name"];
		$size = getimagesize($fname);
		if (!$size) 
		{
			$infoText.=$lll["notValidImageFile"].'<br />';
			continue;				
		}
		
		$type = $size[2];
		global $g_Extensions;	// Found in image.php
		if (!isset($g_Extensions[$type])) 
		{
			$infoText .=$lll["notValidImageFile"].'<br />';
			continue;				
		}	
	
	// We are checking dimensions anymore as we might as well resize the image
/*		if( $size[0]>$this->imageMaxSizeX || $size[1]>$this->imageMaxSizeY )
		{
			$infoText .=sprintf($lll["picFileDimensionToLarge"], $this->imageMaxSizeX, $this->imageMaxSizeY).'<br />';
			$whatHappened = "invalid_form";
			continue;
		}	*/	
		if ($hasImage) $count--;
		
		// Instanciate a new image
		$image = new myImage;
		// Read the image
		$image->ReadImage($HTTP_POST_FILES[$ind]["tmp_name"]);

		// Remove old pictures and thumbnails
		cleanDelete($this->getImageName($count));
		cleanDelete($this->getThumbName($count));
		
		// Save the image extension
		$this->imageExtensions[$count] = $g_Extensions[$type];					

		// Now create our image
		if ($image->CreateLocal($this->getImageName($count),$this->imageMaxSizeX$,this->imageMaxSizeY))
		{
			// Create the thumb
			$image->CreateLocal($this->getThumbName($count),$this->thumbSizeX$,this->thumbSizeY,true);		 		
			
			$parsedAtleastOne = true;			
			$count++;
		}
		else 
		{
			// Why wasn't it created, could it be because the file format doesn't support resizing
			if ($image->supported == false)
				$infoText .=sprintf($lll["picFileDimensionToLarge"], $this->imageMaxSizeX, $this->imageMaxSizeY).'<br />';
				else $infoText.=$lll["imageFileNotLoaded"].'<br />';
			$this->imageExtensions[$count] = ".";			
		}
	}
    $HTTP_POST_FILES["picture"]["name"]="";
	if ($parsedAtleastOne)
	{
		$this->updatePictureField();
	}
    return ok;
}

showDetails(),advertisement.php

[编辑 | 编辑源代码]

更改内部的所有内容

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

变为

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

advertisement.php 包含 image.php

[编辑 | 编辑源代码]

在文件顶部调用 include("./image.php");

最后更多函数,advertisement.php

[编辑 | 编辑源代码]

将这些新函数添加到文件顶部(advertisement.php)。这第一组可以在类声明之前的任何位置

/**********************************/
// 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('[,]', $string);
};

function createImageExtensionsStringFromArray($arr)
{
	$out = "";
	foreach ($arr as $value)
	{
		$out .= $value.',';
	}
	return $out;
}

/**********************************/

这些第二组函数必须放在类中。将它们放在以下之后

class Advertisement extends Item
{

好的

/**********************************/
// Advertisement specific image functions

	function getImageExtensions()
	{
		if (isset($this->picture))
			$this->imageExtensions = getImageExtensionsFromString($this->picture);
	}

	function getImageName($i)
	{
		if (!isset($this->imageExtensions[$i])) return "";
		global $adAttDir;
		if ($i != 0)
		{
			return	$fileName = "$adAttDir/$this->id"."-$i.".$this->imageExtensions[$i];
		}
		else return	$fileName = "$adAttDir/$this->id".".".$this->imageExtensions[$i];
	}

	function getThumbName($i)
	{
		if (!isset($this->imageExtensions[$i])) return "";
		global $adAttDir;
		if ($i != 0)
		{
			return	$thumbName = "$adAttDir/th_$this->id"."-$i.".$this->imageExtensions[$i];
		}
		else return	$thumbName = "$adAttDir/th_$this->id".".".$this->imageExtensions[$i];
	}

	function getImageHTML($i$,link = false$,target='_blank')
	{
		if (!isset($this->imageExtensions[$i])) return "";
		if (strlen($this->imageExtensions[$i]) < 2) return "";
		$picName = $this->getImageName($i);	// Get the first image
		$thName = $this->getThumbName($i);	// Get the first thumb

		// If the thumbnail doesn't exists use the original picture'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't have to scale using html. If it isn'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->thumbSizeX,$this->thumbSizeY,true);
		if ($link == false)
			return "<a href='$picName' target='$target'><img src='$thName' width='$size[0]' height='$size[1]' border='0'></a>$this->imageSpacer";
		else return "<a href='$link' target='$target'><img src='$thName' width='$size[0]' height='$size[1]' border='0'></a>$this->imageSpacer";
	}

	// Get the image settings from this advert's category	
	function getImageLimits()
	{
		//if (!isset($this->imageLimitsLoaded)) return;
		
	    global $categoryClassName;
        $c = new $categoryClassName;
        $c->id = $this->cid;
        load($c);
        $this->imagesAllowed = $c->imagesAllowed;
		$this->imageRemove = $c->imageRemove;
        $this->thumbSizeX = $c->thumbSizeX;
        $this->thumbSizeY = $c->thumbSizeY;
        $this->imageMaxSizeX= $c->imageMaxSizeX;		
        $this->imageMaxSizeY= $c->imageMaxSizeY;		
		$this->imageLimitsLoaded = true;
		// Construct the image spacer
		$this->imageSpacer = 
		str_replace(array('$thumbWidth','$thumbHeight'),
					array($c->thumbSizeX$,c->thumbSizeY),$c->imageSpacer);
		
		// Quick validation test
		if ($c->imagesAllowed)
		{
			if ($c->thumbSizeX * $c->thumbSizeY * $c->imageMaxSizeX * $c->imageMaxSizeY <= 0)
				die('Image dimensions impossible');
		}
	}
	function Debug($text=false)
	{
		if (false)
		{
			echo $text;
			if (isset($this->imageExtensions))
				echo array_to_str($this->imageExtensions);
			if (isset($this->picture))
				echo array_to_str($this->picture);
		}
	}

	 	function renameImage($from$,to)
	{
		if (!isset($this->imageExtensions[$from]) || (strlen($this->imageExtensions[$from]) < 2)) 
		{
			$this->imageExtensions[$to] = "";
			return;
		}
		$this->Debug('Before Rename<br/>');
	
		$s = "";
		// Collect the names
		$thumbNameFrom = $this->getThumbName($from);
		$imageNameFrom = $this->getImageName($from);

		// Rename the image		
		if (file_exists($imageNameFrom))
		{
			$tempExt = $this->imageExtensions[$to];
			$this->imageExtensions[$to] = $this->imageExtensions[$from];		
			$thumbNameTo = $this->getThumbName($to);
			$imageNameTo = $this->getImageName($to);		
			if (rename($imageNameFrom,$imageNameTo))
			{
				if (file_exists($thumbNameFrom))
					if (rename($thumbNameFrom,$thumbNameTo) == false)
						$s .= " Thumbnail $thumbNameFrom couldn't be renamed to $thumbNameTo<br/>";
			}
			else 
			{
				$s .= " Image $imageNameFrom couldn't be renamed to $imageNameTo<br/>";
				$this->imageExtensions[$to]	= $tempExt;
			}
		}
		
		$this->Debug("After Rename:$s<br/>");		
		return $s;
	}

	function updatePictureField()
	{
		global $applName, $itemClassName;
		$newPic = addslashes(createImageExtensionsStringFromArray($this->imageExtensions));
		if ($newPic == $this->picture) return;
		$this->picture = $newPic;
		$this->Debug();
		// Create the extensions string
		$query = "UPDATE $applName"."_$itemClassName SET picture='$this->picture'".
				 " WHERE id=$this->id";
		executeQuery( $query );
	}           
	
 // DAWID JOUBERT
 function removeImage(&$s)
 {
     global $whatHappened, $charLimit, $infoText, $lll$,gorumroll;
     global $immediateAppear, $allowModify, $adminEmail, $itemClassName;
 
     // Load this class
     $this->id = $gorumroll->rollid;
 	load($this);    
 
     global $mainBoxWidth$,mainBoxPadding;
     $this->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.="<center>".$gorumroll->generAnchor($lll["back"])."</center>";
 
     hasAdminRights($isAdm);
     if( !$isAdm && !$allowModify )
     {
         return;
     }
 	
 	 $infoText = "fdsaafsd";
 		
 	
 	if (!isset($_GET['imageID'])) $_GET['imageID'] = 0;
 	// Remove image and let user know
 	if (is_numeric($_GET['imageID']))
 	{
 		$i = abs($_GET['imageID']);	
 		 $infoText = "$i";		
 		// Delete this image
 		if( $this->picture )
 		{			
 			$this->getImageExtensions();
 
 			if (!isset($this->imageExtensions[$i])) 
 			{
 				$infoText = $lll["missingImage"];
 				return;
 			}
 			
 			$imgName = $this->getImageName($i);
 			if (file_exists($imgName))
 			{
 				cleanDelete($imgName);
 				cleanDelete($this->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->imageExtensions);
 				for ($i=$i+1;$i < $limit;$i++)
 				{
 					$infoText .= $this->renameImage($i$,i-1);	
 				}	
 				
 				// Now we must update this $->Picture	
 				$this->updatePictureField();
 			}
 			else $infoText = $lll["missingImage"];
 		}
 		else $infoText = $lll["missingImage"];
 	}
 	else $infoText =$lll["missingImage"];
 }
 // Map Functionality	
	
/**********************************/

gorum/form.php

[编辑 | 编辑源代码]

打开 gorum/form.php 并修改 generForm(..) ,通过将此添加到大型 if 分支。

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->{$attr},$inputLength$,fieldLength,
                               "cell", "", TRUE, $afterField);
        }

gorum/generformlib_filebutton.php

[编辑 | 编辑源代码]

打开 gorum/generformlib_filebutton.php 并转到 generFileField(..) ,复制更改(或替换整个函数)

// DAWID JOUBERT
function generMultipleFileJavascript($count,$postText,$idUsed,$theHiddenValue,$shownCount="1",$preText="my",$style='')
{

	// The big problem is getting init events to load with the page...
	return "\n<script type=\"text/javascript\">
<!--
var maxElements$idUsed = $count;
var currentID$idUsed = -1;
var addTextLine;

function addEvent$idUsed()
{
	if ((currentID$idUsed < 0) || (currentID$idUsed >= maxElements$idUsed)) 
	{
		addTextLine.className = \"hiddenRow\";	
		return;
	}
	var ni = document.getElementById(\"$preText\"+currentID$idUsed+\"$postText\");
	ni.className = \"$style\";
	currentID$idUsed++;
	if ((currentID$idUsed < 0) || (currentID$idUsed >= maxElements$idUsed)) 
	{
		addTextLine.className = \"hiddenRow\";	
		return;
	}	
	
}
function initEvents$idUsed()
{
	var start =$shownCount;
	for (i = start;i	<	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;
}
//-->
</script>
<style type=\"text/css\">
<!--
.hiddenRow
{
	display:none;
}
.shownRow
{
}
-->
</style>";
}


// 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'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 > 1)
	{
		$addMore = true;
		$preText = 'my';
		$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 < $count;$i++)
	{
		// First Cache the new field
			$t="";		
			$t.="<tr";
			if ($tdCl!="") $t.=" class='$tdCl'";
			if ($addMore) $t.=" id='$preText$i$postText'";
			$t.="><td";
			if ($tdCl!="") $t.=" class='$labelCl'";
			$t.=">";
			if ($spanCl!="") $t.="<span class='$spanCl'>";
			if ($i == 0) $t.=$label;
			if (isset($extraLabel[$i])) $t.=$extraLabel[$i];		
			if ($spanCl!="") $t.="</span>";
			
			if($explText && $i = 0) $t.=generExplanation($label,$explText);        
			$t.="</td><td>\n";
			if ($addMore) $name = $newName$.i;
			$t.="<input type='FILE' name='$name'";
			if ($size!="") $t.=" size='$size'";
			if ($maxlength!="") $t.=" maxlength='$maxlength'";
			$t.=">\n";
			$jsElementCount++;
			$t.=$afterField;
			$t.="</td></tr>\n";
		
		// Done caching
		$s.=$t;
	}
	// Dawid
	if ($addMore)
	{
		if ($showCount != $count) 
		{
			// Show the add more button
			$t="";		
			$t.="<tr";
			if ($tdCl!="") $t.=" class='hiddenRow'";
			$t.=" id='$preText"."addText"."$postText'";
			$t.="><td></td><td";
			if ($tdCl!="") $t.=" class='$labelCl'";
			$t.=">";
			if ($spanCl!="") $t.="<span class='$spanCl'>";
			$t.="<a href=\"javascript:;\" onclick=\"addEvent$idUsed();\">Add another File</a>";	
			if ($spanCl!="") $t.="</span>";
			$t.="</td></tr>\n";			
			$s.= $t;
		}
	
		// Insert the javascript just before </head>
		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

[编辑 | 编辑源代码]

修改为

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

[编辑 | 编辑源代码]

将此添加到 constants.php 中的任何位置

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

gorum/init.php

[编辑 | 编辑源代码]

将此添加到函数 showHtmlHead() 的底部

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

源代码

[编辑 | 编辑源代码]

从这里下载:http://www.noah.inv.pl/forum/index.php?topic=228.msg656#msg656

故障排除

[编辑 | 编辑源代码]

从维基百科复制源代码遇到问题?

维基百科对某些字符有错误。许多“已更改为',应恢复

意大利语

[编辑 | 编辑源代码]

意大利语文件已被翻译。以下是它

<?php
// If you don't find a language file in your language in this directory,
// you should translate this file and save as 'lang_xx.php' (where xx
// is the country abbreviation). For how to translate, you can take the 
// already translated files as an example.
//
// Some instructions: don't insert any new line breaks in the file however long
// a line is! Don't rewrite anything else, only what you translate! Don't
// change the order of the lines! Don'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: 'gorum/lang/lang_en.php'!
// If you are ready with the files, you must write the following line 
// in 'constants.php' to activate the new language:

// $language="xx";

// (of course without the leading '//' comment tag)
//
// If you are ready with the translation, please, send us the translated
// language files ([email protected]), 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.<br><br>Warning: Once you disable ad expiration, don't re-enable it again later any more!";
$lll["u_maintitle"]="Noah's Classifieds update process";
$lll["secure_copy"]="It is recommended to save a rescue copy from the old version of Noah's Classifieds before the update.<br>Copy the program files in a separate directory and make a data base dump for sure!<br>Click OK to continue, or Cancel to abort the update process!";
$lll["ready_to_update"]="Ready to update data base %s to version %s?<br>";
$lll["invalid_version"]="The given version is invalid: %s";
$lll["updateSuccessful"]="The update successfully completed.<br>Hint: As admin, click on the 'Check' 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 'Cambia password'";
$lll["settings_showLogout"]="Mostra 'Logout'";
$lll["settings_showLogin"]="Mostra 'Login'";
$lll["settings_showRegister"]="Mostra 'Registra'";
$lll["settings_showMyProfile"]="Mostra 'Il Mio Profilo'";
$lll["settings_showMyAds"]="Mostra 'I Miei Annunci'";
$lll["settings_showSubmitAd"]="Mostra 'Invia Annuncio'";
$lll["settings_showRecentAds"]="Mostra 'Annunci Recenti'";
$lll["settings_showMostPopularAds"]="Mostra 'Annunci Popolari'";
$lll["settings_showSearch"]="Mostra 'Cerca'";
$lll["settings_showHome"]="Mostra 'Home'";
$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' prolungare la scadenza del suo annuncio";
$lll["settings_allowModify"]="L'utente puo' 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't access the MIJ site. Please, contact the site administrator!";
//confcheck
$lll["mailok"]="Il test di invio e.mail e' stato superato brillantemente.";
$lll["mailerr"]="Ho riscontrato i seguenti errori durante il test di invio e.mail:<br>%s";
$lll["mailerr_expl"]="There are some features in Noah'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's Classifieds may not be able to send out mails.";
$lll["here1"]="click qui";
$lll["confpreerr"]="There are some characters before the <? in the config file! Please delete these characters (newlines and spaces too)!";
$lll["confposterr"]="There are some characters after the ?> 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 'Check' link in the menubar.";
$lll["chadmemail"]="Your current email adress is [email protected]. Please set it correctly clicking on the 'My profile' link on the menubar!";
$lll["chsyspass"]="Your current system email adress is [email protected]. Please set it correctly clicking on the 'Settings' link on the menubar!";
$lll["chadmpass"]="The default admin password is not changed yet! Please change it clicking on the 'Change password' link on the menu bar!";
$lll["settings_adminEmail"]="System email";
$lll["nogd"]="Warning: your server doesn'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't generate thumbnails, this way the browser have to shrink 'on-the-fly' 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 'pictures/listings' and/or 'pictures/cats' directories.<br>You should go in 'pictures' and execute the following Unix command (in Unix systems, of course):<br><i>chmod 777 listings cats</i>";
$lll["nopermission_expl"]="(Noah's Classifieds tries to save the advertisement pictures under 'pictures/listings' and the category pics under 'pictures/cats'. 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'immagine asse X";
$lll["imageMaxSizeY"]="Massima dimensione dell'immagine asse Y";
$lll["imageSpacer"]="Testo HTML da inserire dopo ogni immagine (usato come spazio)";
$lll["pictureTemp"]='Immagini';
$lll["imageFileNotLoaded"]='Immagine non salvata/creata!';
$lll["removeImage"] = "Rimuovi questa immagine";
$lll["missingImage"] = "L'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' stata prolungata con successo.";
$lll["prolongExp"]="Prolunga";
$lll["lastRenewal"]="<br>Questo era l'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' 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'annuncio e' stato inviato correttamente.";
$lll["mail_fr_sent"]="Abbiamo inviato l'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'annuncio e' stato approvato";
$lll["adScheduled"]="e' in attesa di approvazione. Riceverai una e.mail di notifica.";
$lll["N/A"]="N/A";
$lll["popular"]="Piu' popolari";
$lll["advertisement_popular_ttitle"]="Lista Annunci Popolari";
$lll["adnum"]="annunci";
// picture upload
$lll["picFileSizeToLarge1"]="Errore! Non posso aprire l'immagine allegata, o l'immagine e' troppo grande.";
$lll["picFileSizeNull"]="L'immagine allegata presenta degli errori.";
$lll["picFileSizeToLarge2"]="L'immagine scelta come allegato supera il massimo consentito di %s byte";
$lll["picFileDimensionToLarge"]="Le dimensioni dell'immagine scelta come allegato superano il massimo consentito di %s x %s";
$lll["notValidImageFile"]="Il file scelto non e' una immagine valida (deve essere gif, jpg, o png).";
$lll["cantOpenFile"]="Errore nell'apertura del file!";
$lll["cantdelfile"]="Alcune immagini caricate potrebbero non essere state cancellate.";
//globalsettings
$lll["settings_expiration"]="Giorni alla scadenza dell'annuncio";
$lll["settings_expNoticeBefore"]="Numero di giorni antecedenti in cui l'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'immagine in bytes";
$lll["settings_maxPicWidth"]="Larghezza massima dell'immagine in pixels";
$lll["settings_maxPicHeight"]="Altezza massima dell'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'";
$lll["any"]="qualsiasi";
$lll["forAddvancedSearch"]="Per una ricerca avanzata in una specifica Categoria, entra nella Categoria prescelta e clicca su 'Cerca'!";
// 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<$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'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";
?>
华夏公益教科书