
) tak skuste přehrát modul.Btw jakou verzi nukeC používáte?




Jinak stýmto modulom je spoustu problemu to nevim zatim kam sem ho aplikoval jede naprosto v pohode a to jak má
btw má ta beta neco NEW ?



. Problém byl s češtinou v lang-czech.php. Stačilo všechny "š" přepsat na "ą" a všechny "ž" na "ľ". Když jsem použil čestinu pro klasické nuke (Path_CZ_ pro_module-NukeC30beta3) tak mi to házelo error v lang-czech.php. Velice jednoduché, ale potrápilo mě to moc. Myslel jsem, že je problém v databázi.





Chce to pozorně číst readme jde oto že modul chce specifické nastavení registr globals a safe mode na serveru.Tudíš koukněte co je třeba a pokuste se dohodnout z hostingem jestly nepodporuje vypnutí alespon lokálně pomocí .htacces.Pokud ne bohužel ,obrázky nepůjdou




function SubmitAds($submitteruid,$title, $cdesc, $catgforprocess, $AdsCurr, $price, $website, $email, $postfor, $fileupload, $adslanguage, $fileupload, $fileupload_name, $fileupload_type, $fileupload_size) {

global $nukecprefix,$dbi,$folder_name, $module_name, $multilingual, $currentlang;

global $AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $cookie, $user, $UploadImg,$Waiting;

global $anonymous;

global $UploadPath,$cookie,$user,$DescLength,$UploadImg, $MaxImgSize, $MaxImgHeight, $MaxImgWidth,$MaxAllowedAds;



if ($submitteruid != 1) {

$jmladsposted = AdsPostedByUser($submitteruid,0,0,0);

if ($jmladsposted >= $MaxAllowedAds) {

$NotAllowedByJml = 1;

} else {

$NotAllowedByJml = 0;

}

if ($NotAllowedByJml == 1) {

header("Location:modules.php?name=".$module_name."&file=postads&id_catg=$catgforprocess");

die();

}

}



if (is_user($user) || ($MemberRequired == 0)) {



if ((!$title) || ($title == "") || (strlen($title) > $AdsTitleLength)) $errorTitle = 1;

if ((!$cdesc) || ($cdesc == "") || (strlen($cdesc) > $AdsContentLength)) $errorCdesc = 1;

if ($submitteruid == 1) {

if ($email == "") {

$erroremailanony = 1;

}

}

if ($email != ""){

if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$email)) $errorEmail = 1;

}

//xpfighter doplnok

$fileupload = $_FILES["fileupload"]["tmp_name"];

$fileupload_type = $_FILES["fileupload"]["type"];

if ($UploadImg && ($fileupload != "") && ($fileupload != "none")) {

$imageadstype = basename($fileupload_type);



$UploadImageType = getImgType();






if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1;

if (($imageadstype != "jpeg") && ($imageadstype != "jpg") && ($imageadstype != "pjpeg")) {

$ImageUkuran = @getimagesize($fileupload);

//$ImageUkuran = getimagesize($_FILES["fileupload"]["tmp_name"]);

if ($ImageUkuran) {



if ($ImageUkuran[0] > $MaxImgWidth) {

$ErrorUkuranImage = 1;

$ErrorUkuranImageWidth = 1;

}

if ($ImageUkuran[1] > $MaxImgWidth) {

$ErrorUkuranImage = 1;

$ErrorUkuranImageHeight = 1;

}

} else {

$ErrorUkuranImage = 1;

}

}

}




if ($ErrorUkuranImage || $errorTitle || $errorCdesc || $errorPrice || $erroremailanony || $errorEmail || $errorImageSize || $errorImageDimension || $errorImageType) {




include ("header.php");

MenuNukeC(1);

echo "<BR>";

OpenTable();

echo "<CENTER><FONT CLASS=\"title\">"._NUKECSUBMITERROR."</font></center><BR>";

echo "<CENTER>";

if ($errorTitle) {

if ($title == "") {

echo "<BR>"._NUKECERRORTITLE."<BR>";

}

if (($title != "") && (strlen($title) > $TitleLength)) {

echo "<BR>"._NUKECERRORCTITLEMAX." $TitleLength "._NUKECCHARS."<BR>";

}

}

if ($errorCdesc) {

if ($cdesc == "") {

echo "<BR>"._NUKECERRORCDESCEMPTY."<BR>";

}

if (($cdesc != "") && (strlen($cdesc) > $DescLength)) {

echo "<BR>"._NUKECERRORCDESCMAX." $DescLength "._NUKECCHARS."<BR>";

}

}

if ($erroremailanony) {

echo "<BR>"._NUKECANONYEMAILREQ."<BR>";

}

if ($errorEmail) {

echo "<BR>"._NUKECERROREMAIL."<BR>";

}

if ($errorImageSize) {

echo "<BR>"._NUKECERRORMAXSIZEALLOWED." $UploadImageSize "._NUKECKB." <BR>";

}

if ($ErrorUkuranImage) {

echo "<BR>"._NUKECERRORMAXDIMENSION." $MaxImgHeight x $MaxImgWidth "._NUKECPIXEL." <BR>";

}

if ($errorImageType) {

echo "<BR><b>$imageadstype</b>"._NUKECALLOWEDFILETYPE.": ";

for ($i = 0;$i<= sizeof($UploadImageType)-1;$i++) {

echo "<b>'.".$UploadImageType[$i]."'</b>";

if ($j != sizeof($UploadImageType)-1) {

echo ", ";

}

$j++;

}

echo "<BR>";

}

echo "<BR><BR>"._NUKECPLEASEGOBACK."";

echo "<BR><a href=\"javascript:history.go(-1);\"><< <b>"._NUKECGOBACK."</b></a>";

echo "</center>";

CloseTable();

include("footer.php");

} else {

$ads_title = FixQuotes(filter_text($title, "nohtml"));

$ads_content = FixQuotes(nl2br(filter_text($cdesc)));

$nowdate = date("H i s m d Y");

$datearray = explode(" ",$nowdate);

$currhour = $datearray[0];

$currminute = $datearray[1];

$currsecond = $datearray[2];

$currmonth = $datearray[3];

$currday = $datearray[4];

$curryear = $datearray[5];

$posted_on = GetTimeUnix($currhour, $currminute, $currsecond, $currmonth, $currday, $curryear, $chgmonth=0, $chgday=0 , $chgyear=0);

if ($postfor == 0) {

$validuntil = 0;

} else {

$validuntil = GetTimeUnix($currhour, $currminute, $currsecond, $currmonth, $currday, $curryear, $chgmonth=0, $chgday+$postfor , $chgyear=0);

}

$price = FixQuotes(filter_text($price, "nohtml"));

$resultnextidads = sql_query("select max(id_ads) as maxnumber from ".$nukecprefix."_ads_ads",$dbi);

list ($nextidads) = sql_fetch_row($resultnextidads,$dbi);

$nextidads++;

if ($fileupload != "") {

$type = basename($fileupload_type);

if (($type == "jpeg") || ($type == "jpg") || ($type == "pjpeg")) {

$type= "jpeg";

}

if ($type == "x-png") {

$type = "png";

}

$filename = $UploadPath."$nextidads.".$type;

$filename_thumb = $UploadPath.$nextidads."_thumb.".$type;

copy($fileupload, $filename);

copy($fileupload, $filename_thumb);

//echo $fileupload_type."<br>".$type."<br>".$fileupload."<br>".$filename."<br>".$filename_thumb;

//exit();

$imguploadname = $nextidads.".".$type;



//$imgsize = getimagesize($_FILES["fileupload"]["tmp_name"]);

$imgsize = @getimagesize($fileupload);

$imgwidth = $imgsize[0];

$imgheight = $imgsize[1];





include ("modules/".$module_name."/resize.php");

global $ThumbToHeight,$ThumbToWidth,$ThumbHeight,$ThumbWidth,$MaxImgHeight,$MaxImgWidth;









if ($ThumbToHeight) {

if ($imgheight <= $ThumbHeight) {

$HeightToThumb = $imgheight;

$LargeHeight = $imgheight;

copy($imageupload, $filenamecopy_thumb);

} else {

$HeightToThumb = $ThumbHeight;

if ($imgheight <= $MaxImgHeight) {

$LargeHeight = $imgheight;

} else {

$LargeHeight = $MaxImgHeight;

$thumb2 = new thumbnail($filename);

$thumb2 -> size_height($MaxImgHeight);

$thumb2->jpeg_quality(75);

$thumb2->save($filename);

}

$thumb = new thumbnail($filename_thumb);

$thumb->size_height($HeightToThumb);

$thumb->jpeg_quality(75);

$thumb->save($filename_thumb);

}

} else {

if ($imgwidth <= $ThumbWidth) {

$WidthToThumb = $imgwidth;

$LargeWidth = $imqwidth;

copy($imageupload, $filename_thumb);

} else {

$WidthToThumb = $ThumbWidth;

if ($imgwidth <= $MaxImgWidth) {

$LargeWidth = $imgwidth;

} else {

$LargeWidth = $MaxImgWidth;

$thumb2 = new thumbnail($filename);

$thumb2 -> size_width($LargeWidth);

$thumb2->jpeg_quality(75);

$thumb2->save($filename);

}

$thumb = new thumbnail($filename_thumb);

$thumb->size_width($WidthToThumb);

$thumb->jpeg_quality(75);

$thumb->save($filename_thumb);

}

}



} else {

$imguploadname = "";

}

if ($website != "") {

$website = str_replace("http://","",$website);

}

if ($Waiting) {

$active = 0;

} else {

$active = 1;

}

//xpfighter chybalo city state country

$SQL = "insert into ".$nukecprefix."_ads_ads values"

."('','$catgforprocess','$ads_title','$ads_content','$imguploadname','$AdsCurr','$price','$submitteruid','$email','$website','','','','$posted_on','$validuntil','0','$adslanguage','$active')";

//exit();

$res = sql_query($SQL,$dbi);

$sem_xp = "modules.php?name=".$module_name."&file=postads&op=Done&id_catg=$catgforprocess";

//$sem_xp = "modules.php?name=".$module_name."&file=postads";

echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=".$sem_xp."\">";

}

} else {

include("header.php");

MenuNukeC(1);

echo "<BR>";

OpenTable();

echo "<center><font class=\"title\">"._NUKECPOSTNEWADS."</font></center><BR>\n";

printnotallowforanonymouse();

CloseTable();

include("footer.php");

}

}

Obsah fóra BLASSENweb » Moduly
|
|