Dotclear

Ticket #741 (new enhancement)

Opened 10 years ago

Last modified 10 years ago

Changement de langue pour les tags

Reported by: lipki Owned by: lipki
Priority: normal Component: plugin:dctranslations
Severity: normal Keywords:
Cc:

Description

Dans la liste des traductions, j'ai des catégories et des tags. Sur le blog, si je change de langues, les catégories fonctionnent, pas les tags.

Change History

comment:1 Changed 10 years ago by lipki

voilà qu'en n'utilisant pas le widget de translatedWidget directement mais en faisant une loop comme ceci:

<div>
<h2>{{tpl:lang Keywords}}</h2>
<ul class="tags">
  <tpl:Tags type="tag">
    <li><a href="{{tpl:TagURL}}" class="tag{{tpl:TagRoundPercent}}">{{tpl:MetaID}}</a></li>
  </tpl:Tags>
</ul>
</div>

et bien ça fonctionne il semble que meta_id à la ligne 50 de _new_widgets_functions.php (qui est un fichier nouveau du quickfix) ne donne pas le nom du tag traduit (un petit bout ici pour illustrer)

		while ($rs->fetch())
            {
                $res .=
                    '<li><a href="'.$core->blog->url.$core->url->getBase('tag').'/'.rawurlencode($rs->meta_id).'" '.
                    'class="tag'.$rs->roundpercent.'">'.
                    __($rs->meta_id).'</a> </li>';
            }

il y a aussi, un problème avec php 5.3 pour certains widgets

à la ligne 156 de class.widgets.php (dans translatedWidgets) remplacer

call_user_func ($this->public_callback, $this, $i);

par

call_user_func ($this->public_callback, &$this, $i);

Note: See TracTickets for help on using tickets.

Sites map