Simple Machines Community Forum

SMF Support => Language Specific Support => Italiano (Italian) => Topic started by: ivanom. on April 09, 2014, 04:43:07 AM

Title: tradurre alcuni termini in un box
Post by: ivanom. on April 09, 2014, 04:43:07 AM
ciao a tutti uso il tema duvvar theme e nel mio forum ho inserito las flash chat di tufat. nella documentazione ho visto che è possibile inserire un box che segnala gli utenti in chat http://www.tufat.com/docs/flashchat/whos_chatting_smf.html

e sono riuscito a inserirlo (attualmente non c'è) solo che vorrei tradurre users e rooms, quindi sono andato nel file
/chat/info_embedded.php e ho trovato

<body>
<p class=normal><?php echo $usernumb ?> user<?php if ($usernumb != 1) echo "s" ?> in <?php echo $roomnumb ?> room<?php if ($roomnumb != 1) echo "s"?>.</p>
<ul id="roomList">
<?php if($roomnumb) { ?>
<?php foreach($rooms as $room) { ?>
<li><strong><a href="#" onclick="javascript:toggleUserList('room_<?php echo $room['id']?>')"><?php echo $room['name']?> (<?php echo numusers($room['id']) ?>)</a></strong>
<?php

solo che c'è il problema che in inglese basta aghgiungere "s" per il plurale mentre in italiano cambia il termine, qualcuno mi può aiutare a "correggere" la stringa per avere >utente, utenti  e >stanza, stanze
glie ne sarei molto grato
grazie
Title: Re: tradurre alcuni termini in un box
Post by: emanuele on April 09, 2014, 07:45:51 AM
<p class=normal><?php echo $usernumb if ($usernumb != 1) echo "utenti" else echo "utente" ?> in <?php echo $roomnumb ?> <?php if ($roomnumb != 1) echo "stanze" else echo "stanza"?>.</p>
Dovrebbe funzionare.
Title: Re: tradurre alcuni termini in un box
Post by: ivanom. on April 09, 2014, 08:52:39 AM
mi da questo errore Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in /var/www/virtual/psicologaonlinesalerno.it/htdocs/forum/chat/info_embedded.php on line 129
Title: Re: tradurre alcuni termini in un box
Post by: emanuele on April 09, 2014, 03:15:59 PM
<p class=normal><?php echo $usernumb; if ($usernumb != 1) echo "utenti"; else echo "utente"?> in <?php echo $roomnumb?> <?php if ($roomnumb != 1) echo "stanze"; else echo "stanza"?>.</p>
Prova questo... ho sempre odiato il php sperso entro l'html... :-\
Title: Re: tradurre alcuni termini in un box
Post by: ivanom. on April 10, 2014, 01:45:48 AM
perfetto, ora va! Grazie mille come sempre  O:)
Title: Re: tradurre alcuni termini in un box
Post by: ivanom. on April 28, 2014, 06:29:37 AM
scusa emanuele come possofare per rendere questaarea espèandibile, cioè che cambi dimensione (l'0altezza) in relazione al testo presnte all'interno. Io ho imposdtato l'height in un tot pixel, però mi capita che quando ci sono pèiù utenti in chat viene mozzata la parte inferiore, c'è una GUIda specifica su come posso fare?
Title: Re: tradurre alcuni termini in un box
Post by: emanuele on April 28, 2014, 09:11:44 AM
Al momento ho problemi di linea (i.e. è intasata), cerca su google "espandere iframe altezza" o qualcosa di simile, dovrebbe trovarti la soluzione.
Se non ricordo male devi usare del javascript per espandere l'iframe alla massima altezza del suo contenuto.
Title: Re: tradurre alcuni termini in un box e iframe espandibile
Post by: ivanom. on May 03, 2014, 10:10:12 AM
ok ho trovato questo interessanmte <iframe id="DynamicFrame" src="http://www.tuosito.it/pagina.html" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
considerando che ho questo da modificare <td class="windowbg2" width="100%"><iframe frameborder="0" height="120" src="', $GLOBALS['boardurl'], '/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe></td>
  mi potresti dare qualche dritta su come dovrebbe diventare?  O:) non vorrei commettere ripetizioni di parametri o cose del genere... ;)
questo potrebbe andare? <td class="windowbg2" width="100%"><iframe id="DynamicFrame" frameborder="0" src="', $GLOBALS['boardurl'], '/chat/info_embedded.php"  style="overflow:visible; width:100%; scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none" allowtransparency="true"></iframe></td>

...ho provato ma NON FUNziona...
Title: Re: tradurre alcuni termini in un box
Post by: emanuele on May 04, 2014, 09:57:37 AM
http://www.scottdizzle.com/viewtopic.php?f=11&t=846