Page 1 of 11
uCoz Community » uCoz Modules » Forum » What is the class name of td to translate forum mod and...
What is the class name of td to translate forum mod and...
Breno
Posts: 29
Reputation: 0

Message # 1 | 2:23 PM
I want to translate the words in the foruns: 'Forum moderator:' and 'No threads in this forum', and i no find the code in this thread http://forum.ucoz.com/forum/9-2441-1

Pictures here:





Anyone know what is the class name?

My current script is:

Code
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='gTableBody1') {    
e[i].innerHTML=e[i].innerHTML.replace('All-time high attendance','Recorde de visitas');    
e[i].innerHTML=e[i].innerHTML.replace('reached on','alcançado em');    
e[i].innerHTML=e[i].innerHTML.replace('Total of','Total de');    
e[i].innerHTML=e[i].innerHTML.replace('threads created','tópicos criados');    
e[i].innerHTML=e[i].innerHTML.replace('which have','total de');    
e[i].innerHTML=e[i].innerHTML.replace('replies','respostas');    
e[i].innerHTML=e[i].innerHTML.replace('-Search what-','-Procurar o que-');    
e[i].innerHTML=e[i].innerHTML.replace('-Display how-','-Mostrar como-');    
e[i].innerHTML=e[i].innerHTML.replace('All threads and','Todos os tópicos e');    
e[i].innerHTML=e[i].innerHTML.replace('Thread list','Lista de tópico');    
e[i].innerHTML=e[i].innerHTML.replace('Post list','Lista de posts');    
e[i].innerHTML=e[i].innerHTML.replace('members registered','membros registrados');    
e[i].innerHTML=e[i].innerHTML.replace('Greetings to our new member','Saudações ao nosso novo membro');    
e[i].innerHTML=e[i].innerHTML.replace('User','Usuário');    
e[i].innerHTML=e[i].innerHTML.replace('Rank','Posição');    
e[i].innerHTML=e[i].innerHTML.replace('Group','Grupo');    
e[i].innerHTML=e[i].innerHTML.replace('Messages','Total de mensagens');    
e[i].innerHTML=e[i].innerHTML.replace('Registration','Data do registro');    
e[i].innerHTML=e[i].innerHTML.replace('Input keyword or phrase to find.','Escreva uma palavra ou frase para procurar');    
e[i].innerHTML=e[i].innerHTML.replace('Enter username and select search options.','Escreva o nome do usuário que deseja e selecione as opções de busca');    
e[i].innerHTML=e[i].innerHTML.replace('Threads without updates for more than','Tópicos sem atualização há mais de');    
e[i].innerHTML=e[i].innerHTML.replace('closed threads only','apenas tópicos fechadas');    
e[i].innerHTML=e[i].innerHTML.replace('All opened forums.....','Todos os fóruns abertos');    
       
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='threadsType') {    
e[i].innerHTML=e[i].innerHTML.replace('Sticky threads','Tópicos oficiais');    
e[i].innerHTML=e[i].innerHTML.replace('Forum threads','Tópicos do fórum');    
}    
}    
</script>    
       
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='threadsDetails') {    
e[i].innerHTML=e[i].innerHTML.replace('This forum has','Este fórum tem');    
e[i].innerHTML=e[i].innerHTML.replace('threads','tópicos');    
e[i].innerHTML=e[i].innerHTML.replace('threads displayed','tópicos mostrados');    
e[i].innerHTML=e[i].innerHTML.replace('found','encontrados');    
e[i].innerHTML=e[i].innerHTML.replace('on the page','nesta página');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='forumOnlineBar') {    
e[i].innerHTML=e[i].innerHTML.replace('Forum is being viewed by :','Usuários que estão online no fórum :');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='pagesInfo') {    
e[i].innerHTML=e[i].innerHTML.replace('Page','Página');    
e[i].innerHTML=e[i].innerHTML.replace('of','de');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='fFastSearchTd') {    
e[i].innerHTML=e[i].innerHTML.replace('Search:','Procurar por:');    
e[i].innerHTML=e[i].innerHTML.replace('keyword','');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='gTableTop') {    
e[i].innerHTML=e[i].innerHTML.replace('Additional information','Informações adicionais');    
e[i].innerHTML=e[i].innerHTML.replace('Search','Busca');    
e[i].innerHTML=e[i].innerHTML.replace('Members List','Lista de Membros');    
e[i].innerHTML=e[i].innerHTML.replace('Forum rules','Regras');    
e[i].innerHTML=e[i].innerHTML.replace('New Posts','Novas postagens');    
e[i].innerHTML=e[i].innerHTML.replace('New reply','Responder');    
e[i].innerHTML=e[i].innerHTML.replace('Creating new thread','Criar novo tópico');    
e[i].innerHTML=e[i].innerHTML.replace('Editing message','Editar mensagem');    
e[i].innerHTML=e[i].innerHTML.replace('Creating new poll','Cria nova enquete');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='gTableSubTop') {    
e[i].innerHTML=e[i].innerHTML.replace('Visitors','Visitas');    
e[i].innerHTML=e[i].innerHTML.replace('members','membros');    
e[i].innerHTML=e[i].innerHTML.replace('guests','visitantes');    
e[i].innerHTML=e[i].innerHTML.replace('Forum statistics','Estatísticas do fórum');    
e[i].innerHTML=e[i].innerHTML.replace('Forum','Fórum');    
e[i].innerHTML=e[i].innerHTML.replace('Threads','Tópicos');    
e[i].innerHTML=e[i].innerHTML.replace('Replies','Respostas');    
e[i].innerHTML=e[i].innerHTML.replace('Updates','Atualizações');    
e[i].innerHTML=e[i].innerHTML.replace('Views','Visualizações');    
e[i].innerHTML=e[i].innerHTML.replace('Thread starter','Dono do tópico');    
e[i].innerHTML=e[i].innerHTML.replace('Thread','Tópico');    
e[i].innerHTML=e[i].innerHTML.replace('Users found','Usuários encontrados');    
e[i].innerHTML=e[i].innerHTML.replace('Search what','Procurar o quê?');    
e[i].innerHTML=e[i].innerHTML.replace('Search where','Procurar aonde?');    
e[i].innerHTML=e[i].innerHTML.replace('Search posts by member','Procurar posts de um usuário');    
e[i].innerHTML=e[i].innerHTML.replace('Administrator options','Opções do administrador');    
e[i].innerHTML=e[i].innerHTML.replace('Happy Birthday!','Feliz Aniversário!');    
}    
}    
</script>    
    <script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='forumLastPostTd') {    
e[i].innerHTML=e[i].innerHTML.replace('Thread','Tópico');    
e[i].innerHTML=e[i].innerHTML.replace('Message from','Última mensagem de');    
e[i].innerHTML=e[i].innerHTML.replace('No posts','Sem tópicos');    
}    
}    
</script>    
       
    <script>    
e=document.getElementsByTagName("DIV");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='userRights') {    
e[i].innerHTML=e[i].innerHTML.replace('You','Você');
e[i].innerHTML=e[i].innerHTML.replace('cannot','não pode');    
e[i].innerHTML=e[i].innerHTML.replace('can','pode');
e[i].innerHTML=e[i].innerHTML.replace('post new threads','postar novos tópicos');
e[i].innerHTML=e[i].innerHTML.replace('You','Você');
e[i].innerHTML=e[i].innerHTML.replace('can','pode');
e[i].innerHTML=e[i].innerHTML.replace('cannot','não pode');
e[i].innerHTML=e[i].innerHTML.replace('create new polls','criar novas enquetes');
e[i].innerHTML=e[i].innerHTML.replace('You','Você');
e[i].innerHTML=e[i].innerHTML.replace('cannot','não pode');
e[i].innerHTML=e[i].innerHTML.replace('can','pode');    
e[i].innerHTML=e[i].innerHTML.replace('attach files','anexar arquivos');
e[i].innerHTML=e[i].innerHTML.replace('You','Você');
e[i].innerHTML=e[i].innerHTML.replace('cannot','não pode');
e[i].innerHTML=e[i].innerHTML.replace('can','pode');
e[i].innerHTML=e[i].innerHTML.replace('post replies','postar respostas');
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='legendTd') {    
e[i].innerHTML=e[i].innerHTML.replace('Normal thread (There are new message(s))','Tópico normal (Com novas mensagens)');    
e[i].innerHTML=e[i].innerHTML.replace('Normal thread (No new messages)','Tópico normal (Sem novas mensagens)');    
e[i].innerHTML=e[i].innerHTML.replace('Hot thread (There are new message(s))','Tópico quente (Com novas mensagens)');    
e[i].innerHTML=e[i].innerHTML.replace('Hot thread (No new messages)','Tópico quente (Sem novas mensagens)');    
e[i].innerHTML=e[i].innerHTML.replace('Closed thread (No new messages)','Tópico fechado (Sem novas mensagens)');    
e[i].innerHTML=e[i].innerHTML.replace('Normal thread','Tópico normal');    
e[i].innerHTML=e[i].innerHTML.replace('Thread - Poll','Enquete');    
e[i].innerHTML=e[i].innerHTML.replace('Sticky thread','Tópico oficial');    
e[i].innerHTML=e[i].innerHTML.replace('Hot thread','Tópico quente');    
e[i].innerHTML=e[i].innerHTML.replace('Closed thread','Tópico fechado');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("DIV");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='funcBlock') {    
e[i].innerHTML=e[i].innerHTML.replace('Mark all messages as read','Marcar todas as mensagens como lidas');    
}    
}    
</script>    
<script>    
e=document.getElementsByTagName("TD");    
for(i=0;i<e.length;i++) {    
if(e[i].className=='threadLastPostTd') {    
e[i].innerHTML=e[i].innerHTML.replace('Message from','Última mensagem de');    
}    
}    
</script>

Sorry for English, I'm Brazilian and I use the google translator!
Post edited by Breno - Sunday, 2011-09-11, 2:25 PM
Paradox
Posts: 3276
Reputation: 145

Message # 2 | 2:40 PM
Breno, the class for the mod text is forumModer. As for the no threads message that is plain text on the page with no applied class. You will have to replace that through replacing the text not the class.

Hope this helps, happy

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Breno
Posts: 29
Reputation: 0

Message # 3 | 2:59 PM
Hey, thanks! I replaced the forumModer smile

Code
<script>  
e=document.getElementsByTagName("DIV");  
for(i=0;i<e.length;i++) {  
if(e[i].className=='forumModer') {  
e[i].innerHTML=e[i].innerHTML.replace('Forum moderator','Moderador do fórum');  
}  
}  
</script>


You known the class to replace this too?


Sorry for English, I'm Brazilian and I use the google translator!
Paradox
Posts: 3276
Reputation: 145

Message # 4 | 3:06 PM
Breno, forumModerBlock is the class name for the circled area. The username is under a seperate class so that won't be affected when you replace the text. wink
Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Breno
Posts: 29
Reputation: 0

Message # 5 | 3:24 PM
I tried:

Code
<script>  
e=document.getElementsByTagName("TD");  
for(i=0;i<e.length;i++) {  
if(e[i].className=='forumModerBlock') {  
e[i].innerHTML=e[i].innerHTML.replace('Forum moderator','Moderador do fórum');  
}  
}  
</script>


and

Code
<script>  
e=document.getElementsByTagName("DIV");  
for(i=0;i<e.length;i++) {  
if(e[i].className=='forumModerBlock') {  
e[i].innerHTML=e[i].innerHTML.replace('Forum moderator','Moderador do fórum');  
}  
}  
</script>


But but did not work cry

Sorry for English, I'm Brazilian and I use the google translator!
Natashko
Posts: 3366
Reputation: 171

Message # 6 | 9:56 AM
Breno, use this script:
Code
<script>
$(document).ready(function(){
$('.forumModer').parent().html($('.forumModer').parent().html().replace('Forum moderator','Moderador do fórum'));
});
</script>

instead of yours.
Breno
Posts: 29
Reputation: 0

Message # 7 | 11:35 PM
Hey Natashko, the script did not work properly, until translated what I wanted, but caused an error in all forums moderated. See the image:



The first moderated forum (Diversos) was repeated in all the others moderated.

Sorry for English, I'm Brazilian and I use the google translator!
Natashko
Posts: 3366
Reputation: 171

Message # 8 | 8:40 AM
Breno,
Quote (Breno)
The first moderated forum (Diversos) was repeated in all the others moderated.

Use the script that we have provided before inside this conditional operators:
Code
<?if($PAGE_ID$ = 'forum')?>........<?endif?>

It will look like this:
Code
<?if($PAGE_ID$ = 'forum')?><script>
$(document).ready(function(){
$('.forumModer').parent().html($('.forumModer').parent().html().replace('Forum moderator','Moderador do fórum'));
});
</script><?endif?>
Breno
Posts: 29
Reputation: 0

Message # 9 | 0:44 AM
Natashko, it worked!

But I also wanted to put in Appearance of entries, so I put the same code as before, and apparently gave no problem, I can leave him or you have another specific?

Code
<script>  
$(document).ready(function(){  
$('.forumModer').parent().html($('.forumModer').parent().html().replace('Forum moderator','Moderador do fórum'));  
});  
</script>

Sorry for English, I'm Brazilian and I use the google translator!
Natashko
Posts: 3366
Reputation: 171

Message # 10 | 8:58 AM
Breno,
Quote (Breno)
But I also wanted to put in Appearance of entries, so I put the same code as before, and apparently gave no problem, I can leave him or you have another specific?

It is better to use this code in General appearance of forum pages template:
Code
<?if(($PAGE_ID$ = 'forum') or ($PAGE_ID$ = 'threadpage'))?>
<script>   
$(document).ready(function(){   
$('.forumModer').parent().html($('.forumModer').parent().html().replace('Forum moderator','Moderador do fórum'));   
});   
</script>
<?endif?>
It will work for both pages.
Breno
Posts: 29
Reputation: 0

Message # 11 | 0:18 AM
Thanks!!!! I love you!! heart
Sorry for English, I'm Brazilian and I use the google translator!
uCoz Community » uCoz Modules » Forum » What is the class name of td to translate forum mod and...
Page 1 of 11
Search: