Joomla.it Forum

Componenti per Joomla! => Gestione sito multilingua => : cows 11 Jun 2006, 21:15:38

: Joom!fish e Zoom gallery
: cows 11 Jun 2006, 21:15:38
Qualcuno ha già utilizzato Joom!fish per tradurre la descrizione delle categoriein zoom gallery? ???
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 19 Sep 2006, 10:54:10
anche io sono interessata.... nessuno?
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 19 Sep 2006, 11:56:51
Mi sono creata lo script io, se a qualcuno interessa... faccia un fischio  ;)
: Re: Joom!fish e Zoom gallery
: surfbit 19 Sep 2006, 13:10:24
Mi sono creata lo script io, se a qualcuno interessa... faccia un fischio  ;)

Certo, certo  ;) benvenuta nel forum  :)
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 20 Sep 2006, 09:20:11
Bisogna creare due file xml: uno l'ho chiamato zoom, e si riferiscr alle gallerie, l'altro  l'ho chiamato zoom_files e si riferisce alle foto. Il nome comunque è indifferente.
I due file sono questi:

zoom.xml
<?xml version="1.0" ?>
<joomfish type="contentelement">
  <name>Photo Galleries</name>
  <author>D. Takamori</author>
  <version>1.7</version>
  <description>Definition for the ZoomGallery component galleries</description>
  <reference>
     <table name="zoom">
        <field type="referenceid" name="catid" translate="0">ID</field>
        <field type="titletext" name="catname" translate="1">Gallery Name</field>
        <field type="htmltext" name="catdescr" translate="1">Description</field>
        <field type="text" name="catdir" translate="0">Directory</field>
        <field type="text" name="catpassword" translate="0">Gallery Password</field>
        <field type="text" name="catkeywords" translate="1">Keywords</field>
        <field type="text" name="uid" translate="0">Author</field>
     </table>
  </reference>
  <translationfilters>
       <category>catid</category>
       <author>uid</author>
       <keyword>catname</keyword>
  </translationfilters>
</joomfish>

In poche parole gli dico quali campi della tabella zoom deve estrarre e farmi tradurre.

questo è il file zoom_files:

<?xml version="1.0" ?>
<joomfish type="contentelement">
  <name>Photos</name>
  <author>D. Takamori</author>
  <version>1.7</version>
  <description>Definition for the ZoomGallery component images</description>
  <reference type="content">
     <table name="zoomfiles">
        <field type="referenceid" name="imgid" translate="0">ID</field>
        <field type="referenceid" name="catid" translate="0">Gallery</field>
        <field type="titletext" name="imgname" translate="1">Title</field>
        <field type="text" name="imgdescr" translate="1">Description</field>
        <field type="created_date" name="imgdate" translate="0">Created</field>
        <field type="text" name="imgkeywords" translate="1">Keywords</field>
        <field type="text" name="uid" translate="0">Author</field>
     </table>
  </reference>
  <translationfilters>
       <category>catid</category>
       <author>uid</author>
       <keyword>catname</keyword>
  </translationfilters>
</joomfish>

Questi due file xml vanno salvati dentro administrator -> components -> com_joomfish -> contentelements

Poi bisogna aprire il file joomfish.xml che si trova in administrator -> components -> com_joomfish e inserire (circa alla riga 100) la seguente dicitura:
   <filename>contentelements/zoom.xml</filename>
   <filename>contentelements/zoomfiles.xml</filename>

A questo punto dal lato amministrativo è possibile tradurre.
Ma io non riuscivo a visualizzare le traduzioni a lato pubblico.

Quindi aprire il file gallery.class.php che si trova in components -> zom_zoom -> lib
e (facendo un backup..... da me funziona ma non si sa mai) sostituire la funzione _getInfo con questa qui:
function _getInfo($galleryview = false){
global $database;
      $database->setQuery("SELECT catid, catname, catdescr, catdir, catimg, subcat_id, catpassword, pos, custom_order, hideMsg, shared, published, uid, catmembers FROM #__zoom WHERE catid=".$this->_id." LIMIT 1");
      $this->_result = $database->query();
      $rows = $database->loadObjectList();
      if(count($rows) > 0){
//      if(mysql_num_rows($this->_result) > 0){
//         while($row = mysql_fetch_object($this->_result)){
         foreach($rows as $row){
            $this->_name = $this->stripslashesSafe($row->catname);
            $this->_descr = $this->stripslashesSafe($row->catdescr);            
            $this->_dir = $row->catdir;
            $this->_cat_img = $row->catimg;
            $this->_subcat_id = $row->subcat_id;
            $this->_password = $row->catpassword;
            $this->_pos = $row->pos;
            $this->_custom_order = $row->custom_order;
            $this->_hideMsg = $row->hideMsg;
            $this->_shared = $row->shared;
            $this->_published = $row->published;
            $this->_uid = $row->uid;
            $members = explode(",", $row->catmembers);
            // gallery-members of type 1 are of access-level 'public'
            // and members of type 2 are 'registered'.
            if (in_array("1", $members)) {
               $this->_members[0] = 1;
            } elseif(in_array("2", $members)) {
               $this->_members[0] = 2;
            } else {
               $this->_members = $members;
            }
         }
      } else {
         die("This is not a valid gallery-id. Please return to the homepage and try again.");
      }
   }

Aprire infine il file image.class.php che si trova in components -> com_zoom -> lib
e sostituire (backup!) la funzione getInfo con questa:
   function getInfo($galleryview = true) {
global $database, $mosConfig_absolute_path, $zoom;
      $database->setQuery("SELECT imgid, imgname, imgkeywords, imgfilename, imgdescr, date_format(imgdate, '%d-%m-%y, %h:%i') AS date, imghits, votenum, votesum, published, catid, uid, imgmembers FROM #__zoomfiles WHERE imgid=".$zoom->escapeString($this->_id));
      $this->_result = $database->query();
      //while($row = mysql_fetch_object($this->_result)){
      $rows=$database->loadObjectList();
      foreach ($rows as $row){
         $this->_name = stripslashes($row->imgname);
         $this->_keywords = stripslashes($row->imgkeywords);         
         $this->_filename = $row->imgfilename;
         $this->_descr = stripslashes($row->imgdescr);
         $this->_date = $row->date;
         $this->_hits = $row->imghits;
         $this->_votenum = $row->votenum;
         $this->_votesum = $row->votesum;
         $this->_published = $row->published;
         $this->_catid = $row->catid;
         $this->_uid = $row->uid;
         $members = explode(",", $row->imgmembers);
         // gallery-members of type 1 are of access-level 'public'
         // and members of type 2 are 'registered'.
         if(in_array("1", $members)) {
             $this->_members[0] = 1;
         } elseif(in_array("2", $members)) {
             $this->_members[0] = 2;
         } else {
             $this->_members = $members;
         }
      }
      $this->_type = ereg_replace(".*\.([^\.]*)$", "\\1", $this->_filename);
      $this->_type = strtolower($this->_type);
      $this->setThumbnail();
      // get comments of image...
      $this->getComments();
      $this->_viewsize = $this->getViewsize();
      if (!$galleryview) {
         $this->getMetaData();
      }
   }

è tutto, spero sia utile...
Spero di essere stata chiara... se non capite qualcosa...sono qui ;D
: Re: Joom!fish e Zoom gallery
: surfbit 20 Sep 2006, 10:52:08

è tutto, spero sia utile...
Spero di essere stata chiara... se non capite qualcosa...sono qui ;D

Più che chiara  ;) Benissimo  ;)  ;D
: Re: Joom!fish e Zoom gallery
: Paparino 08 Oct 2006, 10:27:49
Ciao, PiccolaStellainCielo...

scusa se "mi intrometto" in questo tread ma forse potrasti aiutarmi, visto come hai brillantemente risolto il problema di ZomGallery. Può darsi che la mancata visualizzarione della traduzione di parte dei contenuti di ProductBook dipende anche in questo caso da modifiche da fare nello script.

Questo è il mio problema: http://www.joomla.it/index.php?option=com_smf&Itemid=128&topic=9808.0

Puoi aiutarmi? Grazie.
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 12 Oct 2006, 08:53:24
Mi piacerebbe aiutarti, ma non avendo mai installato ProductBook, mi risulta molto difficile... mi dispiace
: Re: Joom!fish e Zoom gallery
: RikShield 19 May 2007, 13:18:10
Scusa stella, una info: quando, nella tua speigazione, hai scritto "Quindi aprire il file gallery.class.php che si trova in components -> com_zoom -> lib e (facendo un backup..... da me funziona ma non si sa mai) sostituire la funzione _getInfo con questa qui:"
non trovo la funzione _getinfo che hai inserito. In che file si trova dentro la cartella lib??
Una altra cosa: quando hai scritto di inserire circa alla riga 100 la stringa, la dicitura da mettere è <filename>contentelements/zoomfiles.xml</filename> o <filename>contentelements/zoom_files.xml</filename> (con l'underscore)?

Grazie mille
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 22 May 2007, 09:14:09
Scusa stella, una info: quando, nella tua speigazione, hai scritto "Quindi aprire il file gallery.class.php che si trova in components -> zom_zoom -> lib e (facendo un backup..... da me funziona ma non si sa mai) sostituire la funzione _getInfo con questa qui:"
non trovo la funzione _getinfo che hai inserito. In che file si trova dentro la cartella lib??

Dentro al file gallery.class.php (circa linea 155)

Una altra cosa: quando hai scritto di inserire circa alla riga 100 la stringa, la dicitura da mettere è <filename>contentelements/zoomfiles.xml</filename> o <filename>contentelements/zoom_files.xml</filename> (con l'underscore)?

Grazie mille

Dipende da come tu hai chiamato il primo file XML di cui sopra ho spiegato...
: Re: Joom!fish e Zoom gallery
: RikShield 22 May 2007, 12:54:14
Risolto....Grazie mille!!! :)
: Re: Joom!fish e Zoom gallery
: PiccolaStellainCielo 22 May 2007, 14:17:57
Di niente  :)
: Re: Joom!fish e Zoom gallery
: RikShield 27 May 2007, 15:47:33
Ascolta, una domanda: dopo che ho effettuato le operazioni che hai scritto prima quando entro sull'amministrazione di joomfish e entro nella scheda "photo" mi vengono visualizzate le intestazioni delle foto. Fin qui tutto ok ma quando entro in una per tradurla, joomfish mi da l'errore "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 \'and reference_table=\'zoomfiles\'\' at line 4 SQL=select * \n from jos_jf_content\n where reference_id=\n and reference_table=\'zoomfiles\'" - C'entra qualcosa col discorso del file zoomfiles o zoom_files??
 
: Re: Joom!fish e Zoom gallery
: RikShield 10 Jun 2007, 22:42:09
Niente, non mi va neanche cambiando il nome file da zoom_files a zoomfiles e relativa corrispondenza negli xml....
Sembra un problema di database....
: Re: Joom!fish e Zoom gallery
: RikShield 18 Aug 2007, 22:56:41
Di niente  :)

Torno sull'argomento perchè non ho ancora risolto il problema: sulla home di joomla ho visto che è stato rilasciato un plugin per la traduzione di zoom media gallery al link http://www.joomla.it/index.php?option=com_content&task=view&id=539&Itemid=1. Vista la cosa ho subito riportato tutto come era prima delle modifiche da te suggerite (avevo fatto backup dei file!) e ho uplodato i due file di patch che si trovano sulla sezione download ma.....niente!!! Non riesco a tradurre le immagini - le gallerie vengono tradotte bene ma il problema sono le immagini. Quando entro, in joomfish, nella sezione delle photos e clicco su una per tradurla mi dà un debug che dice "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 \'and reference_table=\'zoomfiles\'\' at line 4 SQL=select * \n from jos_jf_content\n where reference_id=\n and reference_table=\'zoomfiles\' " - Qualcuno può aiutarmi??? :(