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
