[Photo Album] Upload imagini si afisare thumbnailuri

Discuţii legate de instalarea şi funcţionarea unor MODificări vechi sau noi ale forumului phpBB 2.0.x.
Închis
Avatar utilizator
VafCat
Utilizator înregistrat
Mesaje: 103
Membru din: 20-Oct-2004, 16:53:52
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Contact:

Upload pe alt servar

Mesaj de VafCat »

La MOD-ul Album cum pot si eu sa fac - daca e posibil - ca uploadurile de poze sa se faca pe alt servar,ca toate pozele uplodate sa fie pe un alt host , ca mi frica ca mi se umple servarul numai cu poze. Dar totusi am o presimtire ca nu se poate si sper ca mesajul asta va fi de folos in viitor :P
flowers
AdministratorAdministrator
Mesaje: 4641
Membru din: 03-Iun-2004, 17:50:34
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Bucureşti, România
Contact:

Mesaj de flowers »

VafCat scrie:La MOD-ul Album cum pot si eu sa fac - daca e posibil - ca uploadurile de poze sa se faca pe alt servar,ca toate pozele uplodate sa fie pe un alt host , ca mi frica ca mi se umple servarul numai cu poze.
Mai jos ai niste MOD-uri pentru Photo Album Addon v2 for phpBB2 care ti-ar salva ceva spatiu pe serverul tau.
flowers
AdministratorAdministrator
Mesaje: 4641
Membru din: 03-Iun-2004, 17:50:34
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Bucureşti, România
Contact:

Mesaj de flowers »

Remote Download and Hotlinks

Cod: Selectaţi tot

############################################################## 
## MOD Title: ROMOTE URL DOWNLOAD/LINK  MOD 
##                       for Photo Album Addon v2 for phpBB2 
## MOD Author: I'm not admitting to writing this one either. 
## MOD Description: 
## 
## Download or HotLink to an image from another website. 
## Saves times and saves space on the server using Linking. 
## 
## Tested with:  phpBB 2.0.8 - PHP4.3.3 
## MySQL 3.23.x and Smartor's Photo Album Addon v2 for phpBB2 
## 
## MOD Version: 
## 
## Installation Level: easy 
## Installation Time: 15 minutes 
## 
## Files To Edit: 5 
##  album_upload.php 
##  album_thumbnail.php 
##  album_pic.php 
##  templates/subSilver/album_upload_body.tpl 
##  language/lang_english/lang_main_album.php 
## 
############################################################## 
## Author Notes: 
## 
## Now compatible with Rotate Image Mod. 
##  
############################################################## 
## Before Adding This MOD To Your Photo Album, 
## You Should Back Up All Files Related To This MOD 
############################################################## 
Download: http://crh.pwp.blueyonder.co.uk/remote_dl_mod.zip
flowers
AdministratorAdministrator
Mesaje: 4641
Membru din: 03-Iun-2004, 17:50:34
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Bucureşti, România
Contact:

Mesaj de flowers »

pics of the photo album v2 on a 2nd host

Cod: Selectaţi tot

####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 
# 
#####PICS OF THE PHOTO ALBUM V2 ON A SECOND HOST####
Avatar utilizator
VafCat
Utilizator înregistrat
Mesaje: 103
Membru din: 20-Oct-2004, 16:53:52
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Contact:

Mesaj de VafCat »

Thx flowers. sa cresti mare! :D
mac
Utilizator înregistrat
Mesaje: 40
Membru din: 03-Iul-2004, 12:07:22

Imbunatatire calitate thumbnailuri

Mesaj de mac »

Salutare,

stie cineva cum pot sa imbunatatesc calitatea imaginilor thumbnail din modul album?
Am unele thumbnailuri nu prea frumos generate ( www.astronomy.ro )...

Mercy
Avatar utilizator
bogdan
AdministratorAdministrator
Mesaje: 10888
Membru din: 18-Oct-2002, 13:14:27
Versiune: 3.0.11
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Experimentat
Nivel php: Mediu
Localitate: Bucuresti
Contact:

Mesaj de bogdan »

imaginile thumbnail au fost create manual sau automat ?

ce versiune de GD este pe server ?
Avatar utilizator
MJR
Fost coleg
Mesaje: 1021
Membru din: 10-Mar-2003, 03:30:07
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: constanta
Contact:

Mesaj de MJR »

dupa calitatea imaginilor, pare ca folosesti GD1. o solutie ar fi:

Panoul Administratorului - Photo Album - Configurare generala - Optimizeaza pentru versiunea GD - GD2
Panoul Administratorului - Photo Album - Configurare generala - Calitate imagine mica (1-100) - 80 [sau poti sa pui si 100]
mac
Utilizator înregistrat
Mesaje: 40
Membru din: 03-Iul-2004, 12:07:22

Mesaj de mac »

intr'adevar foloseam GD1 (cred ca e default), iar acuma am optimizat pt GD2 + calitate imagine mica 80.

se vede super ( www.astronomy.ro/forum )!

mercy mult!
Avatar utilizator
Brindusa
Utilizator înregistrat
Mesaje: 29
Membru din: 26-Noi-2004, 13:14:58
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Gura Humorului
Contact:

Eroare Album MOD

Mesaj de Brindusa »

Salut,

Am instalat modul, dar cand incerc sa fac upload la o imagine imi apare:

Warning: Unable to create 'album_mod/upload/68a5a7a98d528e815a789f8250e0cc4e.jpg': Permission denied in /var/www/html-revista-amicii/forum/album_upload.php on line 488

Warning: getimagesize: Unable to open 'album_mod/upload/68a5a7a98d528e815a789f8250e0cc4e.jpg' for reading. in /var/www/html-revista-amicii/forum/album_upload.php on line 504

Warning: Cannot add header information - headers already sent by (output started at /var/www/html-revista-amicii/forum/album_upload.php:488) in /var/www/html-revista-amicii/forum/includes/page_header.php on line 515

Warning: Cannot add header information - headers already sent by (output started at /var/www/html-revista-amicii/forum/album_upload.php:488) in /var/www/html-revista-amicii/forum/includes/page_header.php on line 521

Warning: Cannot add header information - headers already sent by (output started at /var/www/html-revista-amicii/forum/album_upload.php:488) in /var/www/html-revista-amicii/forum/includes/page_header.php on line 522

Ma puteti ajuta?
Închis

Înapoi la “2.0.x Suport pentru MODificări”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator