Back to top

Visualizza post

Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.


Topics - zebedeo

Pagine: [1]
1
Salve - Per eliminare errore "Cannot redeclare quoted printable encode /..../vcard.class.php on line 37  ho
eseguito la procdura di Luca Favaretto http://www.lucafavaretto.it/joomla/joomla-errore-vcard-class-php/ 
L'errore iniziale è sparito ma un nuovo messaggio "parse error:sintax error, unexpected $end" mi ha indotto a verificare le aperture/chiusure del file in argomento (con notepad) che a me sembrano corrette.
Qualcuno ha una "vista" migliore della mia e mi può aiutare?
 
questo è il file in questione
<?php
/**
* @version $Id: vcard.class.php 732 2005-10-31 02:53:15Z stingrey $
* Modified PHP vCard class v2.0
*/

/***************************************************************************
PHP vCard class v2.0
(cKai Blankenhorn
www.bitfolge.de/en
kaib@bitfolge.de
***************************************************************************/

function encode($string) {
    return escape(quoted_printable_encode($string));
}

function escape($string) {
    return str_replace(';',"\;",$string);
}

// taken from PHP documentation comments
if(!function_exixts('quoted_printable_encode')) {
  function quoted_printable_encode($input, $line_max = 76) {
    $hex         = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
    $lines         = preg_split("/(?:\r\n|\r|\n)/", $input);
    $eol         = "\r\n";
    $linebreak     = '=0D=0A';
    $escape     = '=';
    $output     = '';

    for ($j=0;$j<count($lines);$j++) {
        $line         = $lines[$j];
        $linlen     = strlen($line);
        $newline     = '';
       
        for($i = 0; $i < $linlen; $i++) {
            $c         = substr($line, $i, 1);
            $dec     = ord($c);
           
            if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only
                $c = '=20';
            } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
                $h2 = floor($dec/16);
                $h1 = floor($dec%16);
                $c     = $escape.$hex["$h2"] . $hex["$h1"];
            }
            if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
                $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
                $newline = "    ";
            }
            $newline .= $c;
        } // end of for
        $output .= $newline;
        if ($j<count($lines)-1) {
            $output .= $linebreak;
        }
    }
   
    return trim($output);
}
}
class vCard {
    var $properties;
    var $filename;

    function setPhoneNumber($number, $type='') {
    // type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE"
        $key = 'TEL';
        if ($type!='') {
            $key .= ';'. $type;
        }
        $key.= ';ENCODING=QUOTED-PRINTABLE';
       
        $this->properties[$key] = quoted_printable_encode($number);
    }

    // UNTESTED !!!
    function setPhoto($type, $photo) { // $type = "GIF" | "JPEG"
        $this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo);
    }

    function setFormattedName($name) {
        $this->properties['FN'] = quoted_printable_encode($name);
    }

    function setName($family='', $first='', $additional='', $prefix='', $suffix='') {
        $this->properties['N'] = "$family;$first;$additional;$prefix;$suffix";
        $this->filename = "$first%20$family.vcf";
        if ($this->properties['FN']=='') {
            $this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
        }
    }

    function setBirthday($date) { // $date format is YYYY-MM-DD
        $this->properties['BDAY'] = $date;
    }

    function setAddress($postoffice='', $extended='', $street='', $city='', $region='', $zip='', $country='', $type='HOME;POSTAL') {
    // $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL"
        $key = 'ADR';
        if ($type!='') {
            $key.= ";$type";
        }
       
        $key.= ';ENCODING=QUOTED-PRINTABLE';
        $this->properties[$key] = encode($name).';'.encode($extended).';'.encode($street).';'.encode($city).';'.encode($region).';'.encode($zip).';'.encode($country);

        if ($this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] == '') {
            //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type);
        }
    }

    function setLabel($postoffice='', $extended='', $street='', $city='', $region='', $zip='', $country='', $type='HOME;POSTAL') {
        $label = '';
        if ($postoffice!='') {
            $label.= $postoffice;
            $label.= "\r\n";
        }
       
        if ($extended!='') {
            $label.= $extended;
            $label.= "\r\n";
        }
       
        if ($street!='') {
            $label.= $street;
            $label.= "\r\n";
        }
       
        if ($zip!='') {
            $label.= $zip .' ';
        }
       
        if ($city!='') {
            $label.= $city;
            $label.= "\r\n";
        }
       
        if ($region!='') {
            $label.= $region;
            $label.= "\r\n";
        }
       
        if ($country!='') {
            $country.= $country;
            $label.= "\r\n";
        }

        $this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] = quoted_printable_encode($label);
    }

    function setEmail($address) {
        $this->properties['EMAIL;INTERNET'] = $address;
    }

    function setNote($note) {
        $this->properties['NOTE;ENCODING=QUOTED-PRINTABLE'] = quoted_printable_encode($note);
    }

    function setURL($url, $type='') {
    // $type may be WORK | HOME
        $key = 'URL';
        if ($type!='') {
            $key.= ";$type";
        }
       
        $this->properties[$key] = $url;
    }

    function getVCard() {
        $text = 'BEGIN:VCARD';
        $text.= "\r\n";
        $text.= 'VERSION:2.1';
        $text.= "\r\n";

        foreach($this->properties as $key => $value) {
            $text.= "$key:$value\r\n";
        }
       
        $text.= 'REV:'. date('Y-m-d') .'T'. date('H:i:s') .'Z';
        $text.= "\r\n";
        $text.= 'MAILER:PHP vCard class by Kai Blankenhorn';
        $text.= "\r\n";
        $text.= 'END:VCARD';
        $text.= "\r\n";

        return $text;
    }

    function getFileName() {
        return $this->filename;
    }
}
?>

Grazie anticipate


2
Un saluto "circolare" urbi et orbi
Causa del problema oggetto del post: incontenibile voglia di caricare e/o modificare immagini sul sito!
Telegraficamente
- Pannello di Controllo; "gestione media" - cartella di Easygallery contenente sottocartelle thumbs (miniature per anteprima) e resize (foto non miniaturizzate) - ed un dannatissimo bottone "carica".
< Libidine, provo subito ad eliminare qualche vecchia foto sostituendola!!>
- risultato: - foto eliminate = non più esistenti
                 - foto caricate   = non lette (non indicizzate?? nome/dimensione diversi da quelle caricate in 
                                             origine?? errore procedurale??), forse un po di tutto.
- istallato Filezilla: scaricata la cartella in questione al fine di recuperare dal sito le proprietà delle foto 
                             eliminate (se possibile) per sostituirle con altre aventi uguali "proprietà".
- risultato: situazione immutata.

D: come rimediare al misfatto? perchè dal pannello è possibile eliminare e ricaricare foto apparentemente in maniera semplice salvo rendersi conto (troppo tardi) che dovevi continuare a nominare "zucchina" la nuova foto del "cane" affiancando un codice che non si capisce intuitivamente ne cosa lo genera ne dove andarlo a trovare?
ciao e grazie come sempre!         

(P.S. so bene che il problema è quello in firma ma non ho trovato in giro nessuna guida "semplice , chiara, ed esaustiva" di quanto in parola, nonostante sia convinto che tutti, nessuno escluso, prima o poi cozzano con il problema di caricare immagini su un sito!)
 
A riciao!

 
     



   
     

3
Salve a tutti - sono una new entry, haimè di quelle "de coccio" - sopportatemi se potete
 - Il fatto - sito joomla ver. 1.0.12, da anni in Web, realizzatomi assicurandone perfetta autogestibilità.
  La necessità crescente di apportarvi modifiche ed aggiornamenti mi ha spinto a verificarne la possibilità 
  di apportarle da autodidatta stante la latitanza di chi aveva promesso assistenza.
  Con la prova di strani codici, trovati tra vecchie cartacce, ho scoperto di poter accedere al cPanel e,
  soprattutto, al Pannello di controllo di joomla relativo al sito.
- Quesito 
  1. Sono sufficienti per apportare modifiche, inserire foto, moduli etc. nonchè a trasferire tutto sull'host?
  2. Come faccio a sapere su quale server hosting è posizionato il sito?
  3. Se dovessero necessitarmi ulteriori credenziali (magari di pertinenza del webmaster) e non fossi in
      condizione di averLe per assenza di quest’ultimo (non più reperibile) posso rivolgermi al gestore host   
      (come?) per avere tutte le credenziali necessarie?  essendo l'Amministratore (proprietario del sito)?

Un grazie anticipate a chi volesse darmi una mano

     

Pagine: [1]


Web Design Bolzano Kreatif