Remover código script entre a tag *body* ??? */body*

Remover código script entre a tag *body* ??? */body*

por Michel Miranda -
Número de respostas: 3

Olá pessoal tudo bem?

Estou usando o Mooddle 3.2 e gostaria de tirar uma dúvida. Eu inseri o código abaixo através do admin Settings > Site administration > Appearance > Additional HTML:

=================================================================

<div id="resetcountdown" style="padding:3px 1em;text-aling:center;position:fixed;bottom:0;right:0;overflow: hidden;" /> 

<script>

Y.use('node', function (Y) { 

    // The number of seconds after the whole hour we want to count down to.

    var countdown = 3600;

     var updateTimer = function () {

        var now = Math.floor(new Date().getTime() / 1000),

            last = now - (now % countdown),

            next = last + countdown;

         displayRemainingTime(next - now);

         setTimeout(updateTimer, 1000);

    };

     var displayRemainingTime = function (seconds) {

        var timer = Y.one('#resetcountdown'),

            display, hours, mins, secs,

            text = 'This site will be reset in ';

         display = new Date(1970, 0, 1);

        display.setSeconds(seconds);

         secs = display.getSeconds();

        mins = display.getMinutes();

        hours = Math.floor((seconds - mins * 3600 - secs * 60) / 60 / 60);

         if (hours > 0) {

            text += ('0' + hours).slice(-2) + ' hours ';

        }

         text += ('0' + mins).slice(-2) + ' mins ' + ('0' + secs).slice(-2) + ' secs';

         timer.set('text', text);

         if (seconds < 300) {

            timer.setStyle('backgroundColor', 'red')

                 .setStyle('fontWeight', 'bold');

        } else {

            timer.setStyle('backgroundColor', '#ffd3d9')

                 .setStyle('fontWeight', 'normal');       }    };

     updateTimer();});

</script>

=====================================================================

No caso o código acima foi inserido no campo "Quando a tag BODY é abertaadditionalhtmltopofbody

e após ter salvado acabou que a página principal deu um bug ficando em looping eterno não permitindo que nenhum usuário se logue. 

No caso, no FTP, qual a página que armazena o código html entre a tag <body></body> para que eu possa retirar esse código sem ter que reinstalar o moodle? Desde já agradeço. Obrigado.

Michel
Contagem das avaliações:  -
Em resposta à Michel Miranda

Re: Remover código script entre a tag *body* ??? */body*

por Gleidson Medeiros -

Ol@,

O valor fica armazenado na base de dados. Usando MySQL e o prefixo "mdl", seria na tabela mdl_config onde o campo name é igual à "additionalhtmltopofbody" ou: SELECT * FROM mdl_config c WHERE c.name = 'additionalhtmltopofbody'

Tente atualizar o valor do campo para "" diretamente na base de dados [UPDATE mdl_config SET value = '' WHERE name = 'additionalhtmltopofbody'] e a ferramenta de administração de limpar caches pela linha de comando.

Abraços,

Gleidson Medeiros
linkedin.com/in/gleidsonlm

Contagem das avaliações:  -
Em resposta à Gleidson Medeiros

Re: Remover código script entre a tag *body* ??? */body*

por Denilson Alves Oliveira -

ola! Gleidson, aproveitando o embalo de sua resposta, como eu posso remover os script css no html adicional na tag head. desde já agradeço pelo help.

Contagem das avaliações:  -