Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Sunny C.

Pages: [1] 2 3 4 5 ... 19
1
Chit Chat / Test
« on: March 29, 2024, 06:28:13 PM »
Test

Open: categories.php
Search
"cat_description" => htmlspecialchars(format_text($cat_cache[$cat_id]['cat_description'], 1, 0, 1)),
add after
"cat_second_description" => htmlspecialchars(format_text($cat_cache[$cat_id]['cat_second_description'], 1, 0, 1)),

php bbcode broken

2
Feedback & Suggestions / 4images 2
« on: March 22, 2024, 06:43:35 AM »
Huhu,

es wurde oft angekündigt, aber die Jahre verstreichen.
Wird das noch was? Wäre schön wenn man jetzt mal ein klares Ja oder Nein aussprechen könnte.

Ich pers. würde es begrüßen.

mfg

3
Bug Fixes & Patches / PHP 8 Fix für Liebhaber
« on: August 05, 2021, 09:36:12 PM »
Grüßt euch,

wäre es eventuell möglich in Form einer Kulanz und auch liebe zum System, 4images wenigsten noch einmal vom Code ausgesehen, PHP 8 Ready zu machen?

Unter PHP 7.4 läuft es ohne Probleme, schaltet man auf PHP 8.0.* um, erhält man grundsätzlich nur eine weiße Seite. Keine Fehlermeldung, nichts steht in der php_error oder error Log.
Ich bin sehr gerne bereit einen Obolus dafür zu bezahlen, sodass auch andere den Fix nutzen können.
Ich wäre unfassbar dankbar.

Sowohl in der php.ini habe ich das versucht:
display_errors = on
display_startup_errors = on
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

In der index.php des Scripts beispielsweise:
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors',1);
ini_set('display_errors',1);

Ich habe mir ein Script heruntergeladen, um zu schauen, ob es bloß an irgendwelchen Funktionen liegt:
https://github.com/wapmorgan/PhpDeprecationDetector

phpdd ./ --target 8.0 oder phpdd -t 8.0 -a 7.4 ./ habe ich verwendet

Das Script sagt mir aber: Analyzer has not detected any issues in your code.

LG

4
[IN BEARBEITUNG] 4images (Refresh)

Ich habe mir gedacht, dass 4images undbedingt einen neuen Anstrich braucht.

Dazu gehört das responsive Design. Ich werde das Admin Control Panel (Backend), aber auch die Hauptseite (Frontend) mit einem neuen Aussehen ausstatten.

Auf einem kleinen Display wirken Webseiten zum Beispiel anders, als auf großen Bildschirmen und meistens ist die Benutzerfreundlichkeit (Usability) stark vermindert, wenn Websites nicht für mobile Geräte optimiert wurden. Responsive Webdesign passt sich flexibel an das jeweilige Endgerät an.

Fortan kann 4images auch bequem von unterwegs aus verwaltet werden.

Weitere Neuigkeiten folgen.

Beispiel: home.php

---

[IN PROCESSING] 4images (refresh)

I thought that 4images and absolutely needs a new coat of paint.

This includes the responsive design. I will give the admin control panel (backend), but also the main page (frontend) a new look.

On a small display, for example, websites look different than on large screens and usually the usability is greatly reduced if websites are not optimized for mobile devices. Responsive web design adapts flexibly to the respective end device.

From now on, 4images can also be managed comfortably on the road.

More news will follow.

Example: home.php


View Screen Capture

Mobile:

View Screen Capture

Categories/Kategorien

View Screen Capture


View Screen Capture

Edit Categories

View Screen Capture


View Screen Capture

5
Chit Chat / DSGVO
« on: May 28, 2018, 01:06:32 AM »
Wie steht es denn um die DSGVO? Ein sehr wichtiges Thema derzeit.

6
Feedback & Suggestions / Archive Fehlerhaft
« on: November 28, 2016, 03:53:51 PM »
Alles *.ZIP-Files sind beschädigt.
Man kann nichts mehr herunterladen...
Wird das behoben?

LG

7
Mods & Plugins (Requests & Discussions) / PSD in 4images anzeigen
« on: December 04, 2013, 03:09:44 AM »
Hallo zusammen,

ich würde gerne auch PSD-Dateien als Bild ausgeben und anzeigen lassen.
Ich habe dazu eine php-class gefunden, welche die PSD als JPG ausgibt
<?php
class PhpPsdReader {
	
var 
$infoArray;
	
var 
$fp;
	
var 
$fileName;
	
var 
$tempFileName;
	
var 
$colorBytesLength;

	
function 
PhpPsdReader($fileName) {
	
	
set_time_limit(0);
	
	
$this->infoArray = array();
	
	
$this->fileName $fileName;
	
	
$this->fp fopen($this->fileName,'r');

	
	
if (
fread($this->fp,4)=='8BPS') {
	
	
	
$this->infoArray['version id'] = $this->_getInteger(2);
	
	
	
fseek($this->fp,6,SEEK_CUR); // 6 bytes of 0's
	
	
	
$this->infoArray['channels'] = $this->_getInteger(2);
	
	
	
$this->infoArray['rows'] = $this->_getInteger(4);
	
	
	
$this->infoArray['columns'] = $this->_getInteger(4);
	
	
	
$this->infoArray['colorDepth'] = $this->_getInteger(2);
	
	
	
$this->infoArray['colorMode'] = $this->_getInteger(2);


	
	
	
/* COLOR MODE DATA SECTION */ //4bytes Length The length of the following color data.
	
	
	
$this->infoArray['colorModeDataSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['colorModeDataSectionLength'],SEEK_CUR); // ignore this snizzle

	
	
	
/*  IMAGE RESOURCES */
	
	
	
$this->infoArray['imageResourcesSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['imageResourcesSectionLength'],SEEK_CUR); // ignore this snizzle

	
	
	
/*  LAYER AND MASK */
	
	
	
$this->infoArray['layerMaskDataSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['layerMaskDataSectionLength'],SEEK_CUR); // ignore this snizzle


	
	
	
/*  IMAGE DATA */
	
	
	
$this->infoArray['compressionType'] = $this->_getInteger(2);
	
	
	
$this->infoArray['oneColorChannelPixelBytes'] = $this->infoArray['colorDepth']/8;
	
	
	
$this->colorBytesLength $this->infoArray['rows']*$this->infoArray['columns']*$this->infoArray['oneColorChannelPixelBytes'];

	
	
	
if (
$this->infoArray['colorMode']==2) {
	
	
	
	
$this->infoArray['error'] = 'images with indexed colours are not supported yet';
	
	
	
	
return 
false;
	
	
	
}
	
	
} else {
	
	
	
$this->infoArray['error'] = 'invalid or unsupported psd';
	
	
	
return 
false;
	
	
}
	
}


	
function 
getImage() {
	
	
// decompress image data if required
	
	
switch(
$this->infoArray['compressionType']) {
	
	
	
// case 2:, case 3: zip not supported yet..
	
	
	
case 
1:
	
	
	
	
// packed bits
	
	
	
	
$this->infoArray['scanLinesByteCounts'] = array();
	
	
	
	
for (
$i=0$i<($this->infoArray['rows']*$this->infoArray['channels']); $i++) $this->infoArray['scanLinesByteCounts'][] = $this->_getInteger(2);
	
	
	
	
$this->tempFileName tempnam(realpath('/tmp'),'decompressedImageData');
	
	
	
	
$tfp fopen($this->tempFileName,'wb');
	
	
	
	
foreach (
$this->infoArray['scanLinesByteCounts'] as $scanLinesByteCount) {
	
	
	
	
	
fwrite($tfp,$this->_getPackedBitsDecoded(fread($this->fp,$scanLinesByteCount)));
	
	
	
	
}
	
	
	
	
fclose($tfp);
	
	
	
	
fclose($this->fp);
	
	
	
	
$this->fp fopen($this->tempFileName,'r');
	
	
	
default:
	
	
	
	
// continue with current file handle;
	
	
	
	
break;
	
	
}

	
	
// let's write pixel by pixel....
	
	
$image imagecreatetruecolor($this->infoArray['columns'],$this->infoArray['rows']);

	
	
for (
$rowPointer 0; ($rowPointer $this->infoArray['rows']); $rowPointer++) {
	
	
	
for (
$columnPointer 0; ($columnPointer $this->infoArray['columns']); $columnPointer++) {
	
	
	
	
/* 
	
The color mode of the file. Supported values are: Bitmap=0;
	
	
	
	
	
Grayscale=1; Indexed=2; RGB=3; CMYK=4; Multichannel=7;
	
	
	
	
	
Duotone=8; Lab=9.
	
	
	
	
*/
	
	
	
	
switch (
$this->infoArray['colorMode']) {
	
	
	
	
	
case 
2// indexed... info should be able to extract from color mode data section. not implemented yet, so is grayscale
	
	
	
	
	
	
exit;
	
	
	
	
	
	
break;
	
	
	
	
	
case 
0:
	
	
	
	
	
	
// bit by bit
	
	
	
	
	
	
if (
$columnPointer == 0$bitPointer 0;
	
	
	
	
	
	
if (
$bitPointer==0$currentByteBits str_pad(base_convert(bin2hex(fread($this->fp,1)), 162),8,'0',STR_PAD_LEFT);
	
	
	
	
	
	
$r $g $b = (($currentByteBits[$bitPointer]=='1')?0:255);
	
	
	
	
	
	
$bitPointer++;
	
	
	
	
	
	
if (
$bitPointer==8$bitPointer 0;
	
	
	
	
	
	
break;

	
	
	
	
	
case 
1:
	
	
	
	
	
case 
8// 8 is indexed with 1 color..., so grayscale
	
	
	
	
	
	
$r $g $b $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
break;

	
	
	
	
	
case 
4// CMYK
	
	
	
	
	
	
$c $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$m $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$y $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$k $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);
	
	
	
	
	
	
$r round(($c $k) / (pow(2,$this->infoArray['colorDepth'])-1));
	
	
	
	
	
	
$g round(($m $k) / (pow(2,$this->infoArray['colorDepth'])-1));
	
	
	
	
	
	
$b round(($y $k) / (pow(2,$this->infoArray['colorDepth'])-1));

  
	
	
	
	
	
	
break;

  
	
	
	
	
	
	
case 
9// hunter Lab
  
	
	
	
	
	
	
	
// i still need an understandable lab2rgb convert algorithm... if you have one, please let me know!
	
	
	
	
	
	
	
$l $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
	
$a $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
	
$b =  $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);

	
	
	
	
	
	
	
$r $l;
	
	
	
	
	
	
	
$g $a;
	
	
	
	
	
	
	
$b $b;

	
	
	
	
	
	
break;
	
	
	
	
	
default:
	
	
	
	
	
	
$r $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$g $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$b =  $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);
	
	
	
	
	
	
break;

	
	
	
	
}

	
	
	
	
if ((
$this->infoArray['oneColorChannelPixelBytes']==2)) {
	
	
	
	
	
$r $r >> 8;
	
	
	
	
	
$g $g >> 8;
	
	
	
	
	
$b $b >> 8;
	
	
	
	
} elseif ((
$this->infoArray['oneColorChannelPixelBytes']==4)) {
	
	
	
	
	
$r $r >> 24;
	
	
	
	
	
$g $g >> 24;
	
	
	
	
	
$b $b >> 24;
	
	
	
	
}

	
	
	
	
$pixelColor imagecolorallocate($image,$r,$g,$b);
	
	
	
	
imagesetpixel($image,$columnPointer,$rowPointer,$pixelColor);
	
	
	
}
	
	
}
	
	
fclose($this->fp);
	
	
if (isset(
$this->tempFileName)) unlink($this->tempFileName);
	
	
return 
$image;
	
}

	
/**
	
 *
	
 * PRIVATE FUNCTIONS
	
 *
	
 */

	
function 
_getPackedBitsDecoded($string) {
	
	
/*
	
	
The PackBits algorithm will precede a block of data with a one byte header n, where n is interpreted as follows:
	
	
n Meaning
	
	
0 to 127 Copy the next n + 1 symbols verbatim
	
	
-127 to -1 Repeat the next symbol 1 - n times
	
	
-128 Do nothing

	
	
Decoding:
	
	
Step 1. Read the block header (n).
	
	
Step 2. If the header is an EOF exit.
	
	
Step 3. If n is non-negative, copy the next n + 1 symbols to the output stream and go to step 1.
	
	
Step 4. If n is negative, write 1 - n copies of the next symbol to the output stream and go to step 1.

	
	
*/

	
	
$stringPointer 0;
	
	
$returnString '';

	
	
while (
1) {
	
	
	
if (isset(
$string[$stringPointer])) $headerByteValue $this->_unsignedToSigned(hexdec(bin2hex($string[$stringPointer])),1);
	
	
	
else return 
$returnString;
	
	
	
$stringPointer++;

	
	
	
if (
$headerByteValue >= 0) {
	
	
	
	
for (
$i=0$i <= $headerByteValue$i++) {
	
	
	
	
	
$returnString .= $string[$stringPointer];
	
	
	
	
	
$stringPointer++;
	
	
	
	
}
	
	
	
} else {
	
	
	
	
if (
$headerByteValue != -128) {
	
	
	
	
	
$copyByte $string[$stringPointer];
	
	
	
	
	
$stringPointer++;

	
	
	
	
	
for (
$i=0$i < (1-$headerByteValue); $i++) {
	
	
	
	
	
	
$returnString .= $copyByte;
	
	
	
	
	
}
	
	
	
	
}
	
	
	
}
	
	
}
	
}

	
function 
_unsignedToSigned($int,$byteSize=1) {
	
	
switch(
$byteSize) {
	
	
	
case 
1:
	
	
	
	
if (
$int<128) return $int;
	
	
	
	
else return -
256+$int;
	
	
	
	
break;

	
	
	
case 
2:
	
	
	
	
if (
$int<32768) return $int;
	
	
	
	
else return -
65536+$int;

	
	
	
case 
4:
	
	
	
	
if (
$int<2147483648) return $int;
	
	
	
	
else return -
4294967296+$int;

	
	
	
default:
	
	
	
	
return 
$int;
	
	
}
	
}

	
function 
_hexReverse($hex) {
	
	
$output '';
	
	
if (
strlen($hex)%2) return false;
	
	
for (
$pointer strlen($hex);$pointer>=0;$pointer-=2$output .= substr($hex,$pointer,2);
	
	
return 
$output;
	
}

	
function 
_getInteger($byteCount=1) {
	
	
switch (
$byteCount) {
	
	
	
case 
4:
	
	
	
	
// for some strange reason this is still broken...
	
	
	
	
return @
reset(unpack('N',fread($this->fp,4)));
	
	
	
	
break;

	
	
	
case 
2:
	
	
	
	
return @
reset(unpack('n',fread($this->fp,2)));
	
	
	
	
break;

	
	
	
default:
	
	
	
	
return 
hexdec($this->_hexReverse(bin2hex(fread($this->fp,$byteCount))));
	
	
}
	
}
}

/**
 * Returns an image identifier representing the image obtained from the given filename, using only GD, returns an empty string on failure
 *
 * @param string $fileName
 * @return image identifier
 */

function imagecreatefrompsd($fileName) {
	
$psdReader = new PhpPsdReader($fileName);
	
if (isset(
$psdReader->infoArray['error'])) return '';
	
else return 
$psdReader->getImage();
}
header("Content-type: image/jpeg");
print 
imagejpeg(imagecreatefrompsd('PATH-TO-FILE.PSD'));
?>


Wie kann man das umsetzen?

Ich habe nun versucht die Klasse und die functionen zu separieren:
psdtojpg.php (includes ordner)
<?php
class PhpPsdReader {
	
var 
$infoArray;
	
var 
$fp;
	
var 
$fileName;
	
var 
$tempFileName;
	
var 
$colorBytesLength;

	
function 
PhpPsdReader($fileName) {
	
	
set_time_limit(0);
	
	
$this->infoArray = array();
	
	
$this->fileName $fileName;
	
	
$this->fp fopen($this->fileName,'r');

	
	
if (
fread($this->fp,4)=='8BPS') {
	
	
	
$this->infoArray['version id'] = $this->_getInteger(2);
	
	
	
fseek($this->fp,6,SEEK_CUR); // 6 bytes of 0's
	
	
	
$this->infoArray['channels'] = $this->_getInteger(2);
	
	
	
$this->infoArray['rows'] = $this->_getInteger(4);
	
	
	
$this->infoArray['columns'] = $this->_getInteger(4);
	
	
	
$this->infoArray['colorDepth'] = $this->_getInteger(2);
	
	
	
$this->infoArray['colorMode'] = $this->_getInteger(2);


	
	
	
/* COLOR MODE DATA SECTION */ //4bytes Length The length of the following color data.
	
	
	
$this->infoArray['colorModeDataSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['colorModeDataSectionLength'],SEEK_CUR); // ignore this snizzle

	
	
	
/*  IMAGE RESOURCES */
	
	
	
$this->infoArray['imageResourcesSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['imageResourcesSectionLength'],SEEK_CUR); // ignore this snizzle

	
	
	
/*  LAYER AND MASK */
	
	
	
$this->infoArray['layerMaskDataSectionLength'] = $this->_getInteger(4);
	
	
	
fseek($this->fp,$this->infoArray['layerMaskDataSectionLength'],SEEK_CUR); // ignore this snizzle


	
	
	
/*  IMAGE DATA */
	
	
	
$this->infoArray['compressionType'] = $this->_getInteger(2);
	
	
	
$this->infoArray['oneColorChannelPixelBytes'] = $this->infoArray['colorDepth']/8;
	
	
	
$this->colorBytesLength $this->infoArray['rows']*$this->infoArray['columns']*$this->infoArray['oneColorChannelPixelBytes'];

	
	
	
if (
$this->infoArray['colorMode']==2) {
	
	
	
	
$this->infoArray['error'] = 'images with indexed colours are not supported yet';
	
	
	
	
return 
false;
	
	
	
}
	
	
} else {
	
	
	
$this->infoArray['error'] = 'invalid or unsupported psd';
	
	
	
return 
false;
	
	
}
	
}


	
function 
getImage() {
	
	
// decompress image data if required
	
	
switch(
$this->infoArray['compressionType']) {
	
	
	
// case 2:, case 3: zip not supported yet..
	
	
	
case 
1:
	
	
	
	
// packed bits
	
	
	
	
$this->infoArray['scanLinesByteCounts'] = array();
	
	
	
	
for (
$i=0$i<($this->infoArray['rows']*$this->infoArray['channels']); $i++) $this->infoArray['scanLinesByteCounts'][] = $this->_getInteger(2);
	
	
	
	
$this->tempFileName tempnam(realpath('/tmp'),'decompressedImageData');
	
	
	
	
$tfp fopen($this->tempFileName,'wb');
	
	
	
	
foreach (
$this->infoArray['scanLinesByteCounts'] as $scanLinesByteCount) {
	
	
	
	
	
fwrite($tfp,$this->_getPackedBitsDecoded(fread($this->fp,$scanLinesByteCount)));
	
	
	
	
}
	
	
	
	
fclose($tfp);
	
	
	
	
fclose($this->fp);
	
	
	
	
$this->fp fopen($this->tempFileName,'r');
	
	
	
default:
	
	
	
	
// continue with current file handle;
	
	
	
	
break;
	
	
}

	
	
// let's write pixel by pixel....
	
	
$image imagecreatetruecolor($this->infoArray['columns'],$this->infoArray['rows']);

	
	
for (
$rowPointer 0; ($rowPointer $this->infoArray['rows']); $rowPointer++) {
	
	
	
for (
$columnPointer 0; ($columnPointer $this->infoArray['columns']); $columnPointer++) {
	
	
	
	
/* 
	
The color mode of the file. Supported values are: Bitmap=0;
	
	
	
	
	
Grayscale=1; Indexed=2; RGB=3; CMYK=4; Multichannel=7;
	
	
	
	
	
Duotone=8; Lab=9.
	
	
	
	
*/
	
	
	
	
switch (
$this->infoArray['colorMode']) {
	
	
	
	
	
case 
2// indexed... info should be able to extract from color mode data section. not implemented yet, so is grayscale
	
	
	
	
	
	
exit;
	
	
	
	
	
	
break;
	
	
	
	
	
case 
0:
	
	
	
	
	
	
// bit by bit
	
	
	
	
	
	
if (
$columnPointer == 0$bitPointer 0;
	
	
	
	
	
	
if (
$bitPointer==0$currentByteBits str_pad(base_convert(bin2hex(fread($this->fp,1)), 162),8,'0',STR_PAD_LEFT);
	
	
	
	
	
	
$r $g $b = (($currentByteBits[$bitPointer]=='1')?0:255);
	
	
	
	
	
	
$bitPointer++;
	
	
	
	
	
	
if (
$bitPointer==8$bitPointer 0;
	
	
	
	
	
	
break;

	
	
	
	
	
case 
1:
	
	
	
	
	
case 
8// 8 is indexed with 1 color..., so grayscale
	
	
	
	
	
	
$r $g $b $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
break;

	
	
	
	
	
case 
4// CMYK
	
	
	
	
	
	
$c $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$m $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$y $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$k $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);
	
	
	
	
	
	
$r round(($c $k) / (pow(2,$this->infoArray['colorDepth'])-1));
	
	
	
	
	
	
$g round(($m $k) / (pow(2,$this->infoArray['colorDepth'])-1));
	
	
	
	
	
	
$b round(($y $k) / (pow(2,$this->infoArray['colorDepth'])-1));

  
	
	
	
	
	
	
break;

  
	
	
	
	
	
	
case 
9// hunter Lab
  
	
	
	
	
	
	
	
// i still need an understandable lab2rgb convert algorithm... if you have one, please let me know!
	
	
	
	
	
	
	
$l $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
	
$a $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
	
$b =  $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);

	
	
	
	
	
	
	
$r $l;
	
	
	
	
	
	
	
$g $a;
	
	
	
	
	
	
	
$b $b;

	
	
	
	
	
	
break;
	
	
	
	
	
default:
	
	
	
	
	
	
$r $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
$currentPointerPos ftell($this->fp);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$g $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$this->colorBytesLength-1,SEEK_CUR);
	
	
	
	
	
	
$b =  $this->_getInteger($this->infoArray['oneColorChannelPixelBytes']);
	
	
	
	
	
	
fseek($this->fp,$currentPointerPos);
	
	
	
	
	
	
break;

	
	
	
	
}

	
	
	
	
if ((
$this->infoArray['oneColorChannelPixelBytes']==2)) {
	
	
	
	
	
$r $r >> 8;
	
	
	
	
	
$g $g >> 8;
	
	
	
	
	
$b $b >> 8;
	
	
	
	
} elseif ((
$this->infoArray['oneColorChannelPixelBytes']==4)) {
	
	
	
	
	
$r $r >> 24;
	
	
	
	
	
$g $g >> 24;
	
	
	
	
	
$b $b >> 24;
	
	
	
	
}

	
	
	
	
$pixelColor imagecolorallocate($image,$r,$g,$b);
	
	
	
	
imagesetpixel($image,$columnPointer,$rowPointer,$pixelColor);
	
	
	
}
	
	
}
	
	
fclose($this->fp);
	
	
if (isset(
$this->tempFileName)) unlink($this->tempFileName);
	
	
return 
$image;
	
}

	
/**
	
 *
	
 * PRIVATE FUNCTIONS
	
 *
	
 */

	
function 
_getPackedBitsDecoded($string) {
	
	
/*
	
	
The PackBits algorithm will precede a block of data with a one byte header n, where n is interpreted as follows:
	
	
n Meaning
	
	
0 to 127 Copy the next n + 1 symbols verbatim
	
	
-127 to -1 Repeat the next symbol 1 - n times
	
	
-128 Do nothing

	
	
Decoding:
	
	
Step 1. Read the block header (n).
	
	
Step 2. If the header is an EOF exit.
	
	
Step 3. If n is non-negative, copy the next n + 1 symbols to the output stream and go to step 1.
	
	
Step 4. If n is negative, write 1 - n copies of the next symbol to the output stream and go to step 1.

	
	
*/

	
	
$stringPointer 0;
	
	
$returnString '';

	
	
while (
1) {
	
	
	
if (isset(
$string[$stringPointer])) $headerByteValue $this->_unsignedToSigned(hexdec(bin2hex($string[$stringPointer])),1);
	
	
	
else return 
$returnString;
	
	
	
$stringPointer++;

	
	
	
if (
$headerByteValue >= 0) {
	
	
	
	
for (
$i=0$i <= $headerByteValue$i++) {
	
	
	
	
	
$returnString .= $string[$stringPointer];
	
	
	
	
	
$stringPointer++;
	
	
	
	
}
	
	
	
} else {
	
	
	
	
if (
$headerByteValue != -128) {
	
	
	
	
	
$copyByte $string[$stringPointer];
	
	
	
	
	
$stringPointer++;

	
	
	
	
	
for (
$i=0$i < (1-$headerByteValue); $i++) {
	
	
	
	
	
	
$returnString .= $copyByte;
	
	
	
	
	
}
	
	
	
	
}
	
	
	
}
	
	
}
	
}

	
function 
_unsignedToSigned($int,$byteSize=1) {
	
	
switch(
$byteSize) {
	
	
	
case 
1:
	
	
	
	
if (
$int<128) return $int;
	
	
	
	
else return -
256+$int;
	
	
	
	
break;

	
	
	
case 
2:
	
	
	
	
if (
$int<32768) return $int;
	
	
	
	
else return -
65536+$int;

	
	
	
case 
4:
	
	
	
	
if (
$int<2147483648) return $int;
	
	
	
	
else return -
4294967296+$int;

	
	
	
default:
	
	
	
	
return 
$int;
	
	
}
	
}

	
function 
_hexReverse($hex) {
	
	
$output '';
	
	
if (
strlen($hex)%2) return false;
	
	
for (
$pointer strlen($hex);$pointer>=0;$pointer-=2$output .= substr($hex,$pointer,2);
	
	
return 
$output;
	
}

	
function 
_getInteger($byteCount=1) {
	
	
switch (
$byteCount) {
	
	
	
case 
4:
	
	
	
	
// for some strange reason this is still broken...
	
	
	
	
return @
reset(unpack('N',fread($this->fp,4)));
	
	
	
	
break;

	
	
	
case 
2:
	
	
	
	
return @
reset(unpack('n',fread($this->fp,2)));
	
	
	
	
break;

	
	
	
default:
	
	
	
	
return 
hexdec($this->_hexReverse(bin2hex(fread($this->fp,$byteCount))));
	
	
}
	
}
}

/**
 * Returns an image identifier representing the image obtained from the given filename, using only GD, returns an empty string on failure
 *
 * @param string $fileName
 * @return image identifier
 */

function imagecreatefrompsd($fileName) {
	
$psdReader = new PhpPsdReader($fileName);
	
if (isset(
$psdReader->infoArray['error'])) return '';
	
else return 
$psdReader->getImage();
?>

template/.../media/psd.html
<?php
include_once('includes/psdtojpg.php')
header("Content-type: image/jpeg");
print 
imagejpeg(imagecreatefrompsd('{media_src}'));
?>

Funktioniert nicht.... hat da jemand eine Idee

8
Hallo zusammen,

ich arbeite derzeit an einem neuen Aussehen für das Control Panel.

UPDATE:
Complete Design refresh.


9
Discussion & Troubleshooting / Double $$ / Doppelte $$ - Bug 4images ?
« on: September 14, 2013, 05:56:55 AM »
Hallo zusammen,

mir ist gerade aufgefallen in der Version 1.7.11
admin_functions.php
function show_num_select_row($title$option$desc "") {
  global 
$site_sess$PHP_SELF$action, $$option;
  echo 
"<tr class=\"".get_row_bg()."\">\n<td><p>".$title."</p></td>\n";
  echo 
"<td align=\"right\"><p>".$desc;
  
$url $PHP_SELF;
  
$url .= preg_match("/\?/"$url) ? "&amp;" "?";
  
$url .= "action=".$action;
  
$url $site_sess->url($url);
  echo 
"<select name=\"num\" onchange=\"window.location=('".$url."&";
  echo 
$option."='+this.options[this.selectedIndex].value)\">\n";
  for (
$i 1$i 11$i++) {
    echo 
"<option value=\"$i\"";
    if (
$i == ${$option}) {
      echo 
" selected";
    }
    echo 
">".$i."</option>\n";
  }
  echo 
"</select></p></td>\n</tr>\n";
}

Folgendes ist angegeben:
  global $site_sess$PHP_SELF$action, $$option;
$$option;
$$option;
Ist da nicht ein $ zu viel?

Das ist aus einer aktuellen "frischen" 4images Installation.
Es wurden noch keine Modifizierungen vorgenommen.
Sollte das so sein, sollte man die User offiziell darauf Aufmerksam machen.

10
4images Licence
Hallo zusammen, hiermit verkaufe ich meine Lizenz für 70 EUR.
EUR 70

4images Licence
Hello together, hereby, I sell my license for $92,97.
$ 92,79

PayPal, Überweisung/Bank transfer

11
Discussion & Troubleshooting / Missing argument 2 for replace_url()
« on: May 29, 2013, 06:57:03 PM »
Wenn ich die Einstellungen im ACP aufrufe, erhalte ich folgende Fehlermeldung:

Quote
Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Warning: Missing argument 2 for replace_url(), called in /var/www/web1177/html/4images/admin/settings.php on line 176 and defined in /var/www/web1177/html/4images/includes/functions.php on line 1028

Ich kann zwar Einstelungen vornehmen, aber nichts mit der Meldung anfangen. Was kann das sein?

12
Hallo zusammen,

ich habe für einem Freunde die Gallery von 1.7.7 auf 1.7.11 upgedatet.

Wenn ich das Plugin Migrate Keywords nutze, kommt folgender Error:

Quote
DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Kevin,Nowlan,Grimwood's,Daughter' WHERE image_id = 148 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Daughter'
WHERE image_id = 148 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dan,Brereton,World's,Finest' WHERE image_id = 232 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Finest' WHERE
image_id = 232 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Frazetta,Thun'da' WHERE image_id = 662 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'da' WHERE
image_id = 662 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Bill,Wray,Dexter's,Lab' WHERE image_id = 801 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Lab' WHERE
image_id = 801 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'O'Neil,League' WHERE image_id = 1608 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Neil,League'
WHERE image_id = 1608 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Talia,Rha's,Batman,Hughes' WHERE image_id = 2757 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Batman,Hughes'
WHERE image_id = 2757 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'catwoman,ra's,al,ghul,talia' WHERE image_id = 3425 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,al,ghul,talia'
WHERE image_id = 3425 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'O'Neill,LOEG' WHERE image_id = 3631 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Neill,LOEG'
WHERE image_id = 3631 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Kevin,Nowlan,Lon,designs(Grimwood's,Daughter)' WHERE image_id = 4640 LIMIT
1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Daughter)'
WHERE image_id = 4640 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'D'Anda,Hamner,Thundercats' WHERE image_id = 4940 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'Anda,Hamner,Thundercats' WHERE image_id = 4940 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Nightwing,Robin,Batman,Catwoman,Joker,Clayface,Penguin,Mr.,Zero,Ra's,Al,Ghu
l,Talia' WHERE image_id = 6421 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Al,Ghul,Talia'
WHERE image_id = 6421 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'SECRET,WAR,Dell'Otto' WHERE image_id = 7384 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto' WHERE
image_id = 7384 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Bermejo,World's,Finest,Batman' WHERE image_id = 7878 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 's,Finest,Batman'
WHERE image_id = 7878 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Bermejo,World's,Finest,Superman' WHERE image_id = 7879 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
's,Finest,Superman' WHERE image_id = 7879 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Lee,Coup,D'Etat' WHERE image_id = 7998 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Etat' WHERE
image_id = 7998 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Captain,America' WHERE image_id = 8884 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'Otto,Captain,America' WHERE image_id = 8884 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'D'ANDA,LION-O' WHERE image_id = 14604 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'ANDA,LION-O'
WHERE image_id = 14604 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Benes,Cheshire,Birds\' WHERE image_id = 15171 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
''Benes,Cheshire,Birds\' WHERE image_id = 15171 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'dell'otto,captain,america,ultimate,origins,ultimatum' WHERE image_id =
29011 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'otto,captain,america,ultimate,origins,ultimatum' WHERE image_id = 29011
LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Wolverine' WHERE image_id = 16490 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto,Wolverine'
WHERE image_id = 16490 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Captain,America' WHERE image_id = 16491 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'Otto,Captain,America' WHERE image_id = 16491 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Wolverine,X-Men' WHERE image_id = 16493 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'Otto,Wolverine,X-Men' WHERE image_id = 16493 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Wolverine' WHERE image_id = 16561 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto,Wolverine'
WHERE image_id = 16561 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Highlander' WHERE image_id = 16562 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto,Highlander'
WHERE image_id = 16562 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,X-Factor' WHERE image_id = 16563 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto,X-Factor'
WHERE image_id = 16563 LIMIT 1' at line 1

DB Error: Bad SQL Query: UPDATE 4images_images SET image_keywords =
'Dell'Otto,Punisher' WHERE image_id = 16564 LIMIT 1;
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Otto,Punisher'
WHERE image_id = 16564 LIMIT 1' at line 1

Woran liegt das?

13
Mods & Plugins (Requests & Discussions) / Change TEMPLATE_PATH
« on: November 28, 2012, 03:44:03 PM »
Hallo zusammen,

ich möchte im Root-Verzeichnis ein seperates Template-Verzeichnis anlegen: root/text/templates/default/test.html
Um auf diese Datei zuzugreifen gibt es ja diese Codestelle:
$site_template->print_template($site_template->parse_template($main_template));
Das wiederum greift auf diesen Code zurück:
define('TEMPLATE_PATH'ROOT_PATH.TEMPLATE_DIR."/".$config['template_dir']);
$site_template = new Template(TEMPLATE_PATH);
Die Klasse "Template" ist in der template.php zu finden
Ich möchte nun wahlweise zu den Standard-Template-Verzeichnis auch das Seperate nutzen können wie in dem Beispiel:
Standard:
$site_template->print_template($site_template->parse_template($main_template));
Seperates:
$site2_template->print_template($site2_template->parse_template('test'));

Wie funktioniert das?
Er sagt mir immer das er das Template nicht finden kann!

Ich habe es bereits so umgeschrieben:

$site2_template = new Template2(TEMPLATE_PATH_2);
Und auch dementsprechend die Klassen kopiert und wahlweise eine 2 in dem Namen geschrieben.

14
Mods & Plugins (Requests & Discussions) / WBB3 login and logout integration
« on: November 24, 2012, 06:27:13 PM »
Hallo zusammen,

ich habe da zwei tolle Anleitungen gefunden, mit der es möglich ist Benutzer Extern aus dem Woltlab Burningboard 3 anzumelden und abzumelden.

In Verbindung mit "[Mod] WBB/4images Einzelregistrierug (Single Registration 4images and WBB)" würde das genau das richtige sein um das abzurunden.

Allerdings weis ich nicht wie ich das vernünftig einbauen soll. Wenn jemand Interesse hat um das ganze zu testen, kann ich gerne Zugangsdaten zukommen lassen. Die Single Registration "[Mod] WBB/4images Einzelregistrierug (Single Registration 4images and WBB)" ist bereits verbaut und funktioniert.

---

Hello together,

I have since found that it is possible two great guides externally to log user out of the Woltlab Burningboard 3 and log off.

In conjunction with"[Mod] WBB/4images Einzelregistrierug (Single Registration 4images and WBB)", that would be the right to complete that.

However, I don't know how I should reasonably fit that. If anyone has interest to test the whole thing, I can be pleased to access data. The single registration "[Mod] WBB/4images Einzelregistrierug (Single Registration 4images and WBB)" is already installed and working.

WBB3 Login: (https://technex.org/index.php?page=TutorialsEntry&tutorialID=17)
<?php
// define relative dir to wbb installation
if (!defined('RELATIVE_WBB_DIR')) define('RELATIVE_WBB_DIR''board/');

// wbb imports
require_once(RELATIVE_WBB_DIR.'global.php');

// wcf imports
require_once(WCF_DIR.'lib/system/session/UserSession.class.php');
require_once(
WCF_DIR.'lib/system/auth/UserAuth.class.php');

class 
Login {
  
// Hier definieren wir Variablen mit Standard-Inhalten
  // user object
  
public $user null;
  
  
// given username
  
public $username '';
  
  
// given password
  
public $password '';
  
  
// error field
  
public $errorField '';
  
  
// error text
  
public $errorText '';
  
    
/**
     * Neue Instanz der Klasse, die den Ablauf steuert.
     */
    
public function __construct() {
    
// Benutzer ist bereits angemeldet, "userID" also ungleich "0" -> Wir geben den Benutzernamen aus und stoppen den Ablauf hier
    
if (WCF::getUser()->userID != 0) {
      echo 
'<p>Du bist angemeldet als <strong>'.WCF::getUser()->username.'</strong>.</p>';
      exit;
    }
    
    
// Benutzer ist noch nicht angemeldet, "userID" also gleich "0" -> Wir prüfen, ob Daten übergeben wurden und handeln entsprechend
    // Keine Daten übergeben -> Wir geben unser Loginformular aus
    
if (!count($_POST)) {
      
$this->showForm();
    }
    
// Daten übergeben -> Wir lesen diese mit readParameters() ein
    
else {
      
$this->readParameters();
    }
    }
  
    
/**
     * Lesen der eingegebenen Daten.
     */
    
public function readParameters() {
    
// Wir lesen den Benutzernamen aus den übergebenen Daten aus und entfernen unnötige Leerzeichen
        
if (isset($_POST['username'])) $this->username StringUtil::trim($_POST['username']);
        
    
// Wir lesen das Kennwort aus, welches der Benutzer eingegeben hat
        
if (isset($_POST['password'])) $this->password $_POST['password'];
        
        
// Nun prüfen wir die Daten, geben einen Fehler aus oder melden den Benutzer an
        
$this->checkLoginData();
    }
  
    
/**
     * Daten des Benutzers prüfen.
     */
    
public function checkLoginData() {
    
// Wir prüfen die Daten in einem try/catch-Block, um den Ablauf durch Exceptions unterbrechen zu können
    
try {
      
// Prüfen, ob kein Benutzername eingegeben wurde
          
if (empty($this->username)) {
        throw new 
UserInputException('username');
      }
      
      
// Prüfen, ob kein Kennwort eingegeben wurde
      
if (empty($this->password)) {
        throw new 
UserInputException('password');
      }
      
      
// Prüfen des Kennwortes und ggf. Rückgabe eines neuen Objektes
      
$this->user UserAuth::getInstance()->loginManually($this->username$this->password);
      
      
// Es ist kein Fehler aufgetreten; Wir melden den Benutzer "richtig" an und leiten ihn weiter
      
$this->doLogin();
    }
    catch (
UserInputException $e) {
      
// Setze das betroffene Eingabefeld, welches den Fehler verursacht hat
      
$this->errorField $e->getField();
      
      
// Setze einen Fehlertext (alternativ könnte man noch abfragen, welcher Fehler aufgetreten ist und den Text entsprechend anpassen)
      
$this->errorText 'Es ist ein Fehler aufgetreten. Bitte überprüfe das markierte Eingabefeld.';
      
      
// Abschließend geben wir das Formular erneut aus
      
$this->showForm();
    }
    }
  
    
/**
     * Den Benutzer "richtig" anmelden und zur Loginseite weiterleiten.
     */
    
public function doLogin() {
    
// Setze Daten des Benutzern
    
UserAuth::getInstance()->storeAccessData($this->user$this->username$this->password);
    
    
// Session ändern
    
WCF::getSession()->changeUser($this->user);
    
    
// Benutzer weiterleiten
    
HeaderUtil::redirect('login.php');
    exit;
    }
  
    
/**
     * Gibt ein einfaches Formular aus, mit dem sich ein Benutzer anmelden kann.
     */
    
public function showForm() {
    
// Wir prüfen zunächst, ob ein Fehler bekannt ist und geben den Fehlertext hier aus
    
if (!empty($this->errorText)) {
      echo 
'<p style="color:red;font-weight:bold">' $this->errorText '</p>';
    }
    
    
// Nun geben wir das eigentliche Formular aus
    // Wir senden die Daten an die Datei "login.php" mit der Methode "post"
    // Die Felder werden befüllt, sobald man Daten eingegeben hat, diese aber nicht anerkannt wurden
    // Mit einer Abfrage markieren wir das Eingabefeld, welches den Fehler verursacht hat
?>
<form action="login.php" method="post">
  <p>Benutzername:<br /><input name="username" type="text" value="<?php echo $this->username ?>" size="30"<?php if ($this->errorField == 'username') { echo ' style="border:2px solid red"'; } ?> /></p>
  <p>Kennwort:<br /><input name="password" type="password" value="<?php echo $this->password ?>" size="30"<?php if ($this->errorField == 'password') { echo ' style="border:2px solid red"'; } ?> /></p>
  <p><br /><br /></p>
  <p><input type="submit" value="Absenden"> <input type="reset" value="Abbrechen"></p>
</form>
<?php
    
}
}

// Wir "starten" unsere Klasse, die dann automatisch die weiteren Schritte abarbeitet
new Login;
?>


WBB3 Logout: (https://technex.org/index.php?page=TutorialsEntry&tutorialID=23)
<?php
// define relative dir to wbb installation
if (!defined('RELATIVE_WBB_DIR')) define('RELATIVE_WBB_DIR''board/');

// wbb imports
require_once(RELATIVE_WBB_DIR.'global.php');

class 
Logout {
    
/**
     * Neue Instanz der Klasse, die den Ablauf steuert.
     */
    
public function __construct() {
        
// Wir prüfen, ob der Benutzer überhaupt angemeldet ist -> Wenn nicht, geben wir eine meldung aus und stoppen den Ablauf hier
        
if (WCF::getUser()->userID == 0) {
            echo 
'<p>Du bist nicht angemeldet.</p>';
            exit;
        }
        
        
// Benutzer abmelden
        
$this->doLogout();
    }
    
    
/**
     * Hier findet der eigentliche Logout statt. Nachdem der Benutzer abgemeledet wurde, wird er an die "index.php" weitergeleitet.
     */
    
public function doLogout() {
        
// Wir löschen die aktuelle Sitzung des Benutzers
        
WCF::getSession()->delete();
        
        
// Wir löschen die gesetzten Cookies
        
if (isset($_COOKIE[COOKIE_PREFIX.'userID'])) HeaderUtil::setCookie('userID'0);
        if (isset(
$_COOKIE[COOKIE_PREFIX.'password'])) HeaderUtil::setCookie('password''');
        
        
// Benutzer weiterleiten
        
HeaderUtil::redirect('index.php');
        exit;
    }
}

// Wir "starten" unsere Klasse, die dann automatisch die weiteren Schritte abarbeitet
new Logout;
?>

15
Mods & Plugins (Requests & Discussions) / Bilder Kleinanzeigen
« on: August 02, 2012, 11:21:12 PM »
Hallo zusammen,

ist folgendes möglich?

Ich möchte den User eine Art Kleinanzeigen für Ihre Bilder bieten.
Die User sollen wie gewohnt ihre Bilder hochladen.
Die Bilder sollen aber automatisch nach XX Tagen gelöscht werden.
Vor der Löschung (7 Tage vorher) soll der User benachrichtig werden, ob er das Bild noch eingestellt lassen will oder nicht.
Reagiert der User nicht, soll das Bild gelöscht werden.
Meldet sich der User (Aktivierungslink oder beim Bild edit auf "Eingestellt lassen" klicken), soll das Bild weitere XX Tage eingestellt sein.

Würde da jemand etwas derartiges basteln?

Ungefähr müsste das ja so berechnet werden oder?
$EineWoche=60*60*24*7;
$Jetzt=time();
$ZuAlt=$Jetzt-$EineWoche;
$sql="delete from DATENBANKNAME where timestamp<=$ZuAlt";
$rs=mysql_query($sql);  


oder?
mysql_query("DELETE FROM tabelle WHERE datum < '".strtotime('-30 days')."'"); 

Pages: [1] 2 3 4 5 ... 19