Smartor Photo Album on a 2nd host

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
chevy
Mitglied
Beiträge: 32
Registriert: 02.10.2003 13:22
Wohnort: Österreich
Kontaktdaten:

Smartor Photo Album on a 2nd host

Beitrag von chevy »

ich hab mir das smartor photo album 2.53 installiert. danach hab ich noch den mod pics of the photo album v2 on a second host installiert.
früher hat alles wunderbar funktiniert, aber jetzt werden die bilde im album nicht mehr angezeigt.
die installation habe ich schon des öfteren überprüft. jetzt weiss ich leider nicht mehr weiter.
hatte hier schon jemand das problem. ich hänge mal den code an.

Code: Alles auswählen

####PICS OF THE PHOTO ALBUM V2 ON A SECOND HOST###
#
# Files to edit:
# album_pic.php
# album_thumbnail.php
# album_mod/album_constants.php
#
# This modification makes it possible to lodge the images of the photo album
v2 on two hosts at the same time or only on one secondary host.
# You must have the MOD Photo Album Addon v2 to be able to make this
modification.
# The new pictures are always uploaded on the first host, which is that of
your forum,
# but if you manually move the images towards the secondary host, then
remove them principal host,
# they will be always posted. This system is very useful for lodging a
greater number of pictures.
# No visible change is apparent, the pictures, it does not matter if they
are on a host or another,
# they are posted as usual:
#
# album_pic.php?pic_id=X
#
#
#
#-----[ OPEN ]------------------------------------------
#

album_thumbnail.php

#
#-----[ FIND ]------------------------------------------
#

if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )
{
die($lang['Pic_not_exist']);
}

#
#-----[ REPLACE WITH]------------------------------------------
#

/*
if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )
{
die($lang['Pic_not_exist']);
}
*/
$filenameu = './album_mod/upload/';
$filenameu.="$pic_filename";

#
#-----[ FIND ]------------------------------------------
#

if( ($album_config['thumbnail_cache'] == 1) and ($pic_thumbnail != '') and
file_exists(ALBUM_CACHE_PATH . $pic_thumbnail) )
{
switch ($pic_filetype)
{
case '.jpg':
header('Content-type: image/jpeg');
break;
case '.png':
header('Content-type: image/png');
break;
}

readfile(ALBUM_CACHE_PATH . $pic_thumbnail);
exit;
}

#
#-----[REPLACE WITH]------------------------------------------
#

$filenameu2 = './album_mod/upload/cache/';
$filenameu2.="$pic_thumbnail";

if (is_file($filenameu2)) {


/* if( ($album_config['thumbnail_cache'] == 1) and ($pic_thumbnail != '')
and file_exists(ALBUM_CACHE_PATH . $pic_thumbnail) )
{
switch ($pic_filetype)
{
case '.jpg':
header('Content-type: image/jpeg');
break;
case '.png':
header('Content-type: image/png');
break;
}


}
*/
readfile(ALBUM_CACHE_PATH . $pic_thumbnail);
exit;

} else {

#
#-----[ FIND ]--------------------------------------------------
#

$pic_size = @getimagesize(ALBUM_UPLOAD_PATH . $pic_filename);

#
#-----[ REPLACE WITH ]------------------------------------------
#

if (is_file($filenameu)) {

$pic_size = @getimagesize(ALBUM_UPLOAD_PATH . $pic_filename);
} else {
$pic_size = @getimagesize(ALBUM_UPLOAD2_PATH . $pic_filename);
}

#
#-----[ FIND ]------------------------------------------
#

$src = @$read_function(ALBUM_UPLOAD_PATH . $pic_filename);

#
#-----[ REPLACE WITH ]-------------------------------------
#

if (is_file($filenameu)) {
$src = @$read_function(ALBUM_UPLOAD_PATH . $pic_filename);
} else {
$src = @$read_function(ALBUM_UPLOAD2_PATH . $pic_filename);

}

#
#-----[ FIND ]-----------------------------------------------
#

?>

#
#------[ BEFORE, ADD ]--------------------------------------------
#

}

#
#-----[ OPEN ]------------------------------------------
#

album_pic.php

#
#-----[ FIND ]------------------------------------------
#

if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )

#
#-----[ REPLACE WITH ]------------------------------------------
#

//if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )
if( empty($thispic) )

#
#-----[ FIND ]------------------------------------------
#

readfile(ALBUM_UPLOAD_PATH . $thispic['pic_filename']);

#
#-----[ REPLACE WITH ]------------------------------------------
#

$filenameu = './album_mod/upload/';
$filenameu.="$pic_filename";

if (is_file($filenameu)) {
readfile(ALBUM_UPLOAD_PATH . $thispic['pic_filename']);
} else {
readfile(ALBUM_UPLOAD2_PATH . $thispic['pic_filename']);
}

#
#-----[ OPEN ]------------------------------------------
#

album_mod/album_constants.php

#
#-----[ FIND ]------------------------------------------
#

define('ALBUM_UPLOAD_PATH', 'album_mod/upload/');

#
#-----[ AFTER, ADD ]------------------------------------------
#

define('ALBUM_UPLOAD2_PATH', 'http://your2ndsite/folder/');

// NOTE : 'http://your2ndsite/folder/' must be replaced by your second
host's folder.
// For example, if your pictures are moved to
http://site.free.fr in folder "picutres",
// You must replace 'http://your2ndsite/folder/' with
'http://website.free.fr/pictures/' .
// Dont forget the / !!!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# Modification found and created by docteur.night
# www.multicreators.com <http://www.multicreators.com>
#
#####PICS OF THE PHOTO ALBUM V2 ON A SECOND HOST####


wäre glücklich über hilfe.
Antworten

Zurück zu „phpBB 2.0: Mod Support“