Home › Forum › Plugin e temi di WP › Problema con Add Local Avatar
-
AutorePost
-
-
25 Febbraio 2011 alle 10:57 #16915House90Partecipante
Salve a tutti, ho un problema con questo plugin che un tempo funzionava ma ora mi sono accorto, cambiando il mio avatar personale, di un grosso problema.
Praticamente il plugin non dialoga con la cartella di destinazione e questo fa si che non solo non cancella le immagini quando richiesto, ma non carica neanche nuovi avatar dando questo errore:
Upload error: Upload directory doesn't exist.
La cartella ha permessi di lettura e scrittura (0755) per cui dovrebbe essere leggibile e scrivibile dal plugin, e non capisco quale possa essere il problema.
Grazie per l'aiuto!
MODIFICA: ok ho capito perchè non mi vedeva la cartella. Praticamente il plugin mi vedeva la il path assoluto della directory del mio spazio web fino alla cartella utente, ma i file del sito sono contenuti in una sottodirectory chiamata home. Per cui io ho scritto nel campo della cartella da destinare agli avatar /home/avatars e l'upload è andato a buon fine. Ora però ho problemi a visualizzarli, nel senso che mi da URL-DEL-SITO/home/avatars/avatar.png quando invece dovrebbe darmi URL-SITO/avatars/avatar.png.
-
25 Febbraio 2011 alle 11:01 #81687wollyAmministratore del forum
lui dice che non esiste la cartella.
-
25 Febbraio 2011 alle 11:13 #81688House90Partecipante
ok ho capito perchè non mi vedeva la cartella. Praticamente il plugin mi vedeva la il path assoluto della directory del mio spazio web fino alla cartella utente, ma i file del sito sono contenuti in una sottodirectory chiamata home. Per cui io ho scritto nel campo della cartella da destinare agli avatar /home/avatars e l’upload è andato a buon fine. Ora però ho problemi a visualizzarli, nel senso che mi da URL-DEL-SITO/home/avatars/avatar.png quando invece dovrebbe darmi URL-SITO/avatars/avatar.png.
-
25 Febbraio 2011 alle 11:27 #81689House90Partecipante
RISOLTO con un po’ di smanettamenti al codice. Ecco la soluzione se può essere d’aiuto ma so già che come al solito verrà ignorata:
Cercate nel file avatars.php la riga
// Helper function to find root directory.
function avatar_root()
Modificate le righe successive DA:
{
if ($this->avatar_options == 'on')
return $_SERVER;
else
return substr(ABSPATH, 0, -strlen(strrchr(substr(ABSPATH, 0, -1), '/')) - 1);
}
A:
{
if ($this->avatar_options == 'on')
return $_SERVER . "/home";
else
return substr(ABSPATH, 0, -strlen(strrchr(substr(ABSPATH, 0, -1), '/')) - 1) . "/home";
}
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.