JScript

Programação & Desenvolvimento


Você não está conectado. Conecte-se ou registre-se

Erros de sintaxe no overall_header

2 participantes

Ir para baixo  Mensagem [Página 1 de 1]

1Erros de sintaxe no overall_header Empty Erros de sintaxe no overall_header Dom 02 Mar 2014, 9:53 am

waghcwb

waghcwb
Desenvolvedores
Desenvolvedores

Pessoal, não sei se já abriram o overall_header no Dreamweaver, mas ele relata alguns erros nesse código aqui:
Código:
   //<![CDATA[
      var tickerDirParam = "{switch_ticker.DIRECTION}";
      var slid_vert = false;
      var auto_dir = 'next';
      var h_perso = parseInt({switch_ticker.HEIGHT});

      switch( tickerDirParam )
      {
         case 'top' :
            slid_vert = true;
            break;

         case 'left':
            break;

         case 'bottom':
            slid_vert = true;
            auto_dir = 'prev';
            break;

         case 'right':
            auto_dir = 'prev';
            break;

         default:
            slid_vert = true;
      }

      $(document).ready(function() {

         var width_max = $('ul#fa_ticker_content').width();
         var width_item = Math.floor(width_max / {switch_ticker.SIZE});

         if (width_max > 0)
         {
            $('#fa_ticker_content').css('display','block');

            $('ul#fa_ticker_content li').css('float','left').css('list-style','none').width(width_item).find('img').each(function () {
               if ($(this).width() > width_item)
               {
               var ratio      = $(this).width() / width_item;
               var new_height = Math.round($(this).height() / ratio);
               $(this).height(new_height).width(width_item);
               }
            });

            if (slid_vert)
            {
               var height_max = h_perso;

               $('ul#fa_ticker_content li').each( function () {
                  if ($(this).height() > height_max)
                  {
                     height_max = $(this).height();
                  }
               } );

               $('ul#fa_ticker_content').width(width_item).height(height_max).css('marginLeft','auto').css('marginRight','auto');
               $('ul#fa_ticker_content li').height(height_max);
            }

            $('#fa_ticker_content').jcarousel({
                  vertical: slid_vert,
               wrap: 'circular',
               auto: {switch_ticker.STOP_TIME},
               auto_direction: auto_dir,
            scroll: 1,
            size: {switch_ticker.SIZE},
            height_max: height_max,
            animation: {switch_ticker.SPEED}
            });
         }
         else
         {
            $('ul#fa_ticker_content li:not(:first)').css('display','none');
            $('ul#fa_ticker_content li:first').css('list-style','none').css('text-align','center');
         }
      });
   //]]>

E aqui também
Código:
   //<![CDATA[
   $(document).ready(function(){
      <!-- BEGIN switch_enable_pm_popup -->
         pm = window.open('{U_PRIVATEMSGS_POPUP}', '_faprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
         if(pm != null) { pm.focus(); }
      <!-- END switch_enable_pm_popup -->
      <!-- BEGIN switch_report_popup -->
         report = window.open('{switch_report_popup.U_REPORT_POPUP}', '_phpbbreport', 'HEIGHT={switch_report_popup.S_HEIGHT},resizable=yes,scrollbars=no,WIDTH={switch_report_popup.S_WIDTH}');
         if(report != null) { report.focus(); }
      <!-- END switch_report_popup -->
      <!-- BEGIN switch_ticker -->
         $(document).ready(function() {
            ticker_start({switch_ticker.HEIGHT}, {switch_ticker.SPACING}, {switch_ticker.SPEED}, '{switch_ticker.DIRECTION}', {switch_ticker.STOP_TIME});
         });
      <!-- END switch_ticker -->
   });

   <!-- BEGIN switch_login_popup -->
      var logInPopUpLeft, logInPopUpTop, logInPopUpWidth = {LOGIN_POPUP_WIDTH}, logInPopUpHeight = {LOGIN_POPUP_HEIGHT}, logInBackgroundResize = false, logInBackgroundClass = false;
   <!-- END switch_login_popup -->

   <!-- BEGIN switch_login_popup -->
   $(document).ready( function() {
      $(window).resize(function() {
         var windowWidth = document.documentElement.clientWidth;
         var popupWidth = $("#login_popup").width();
         var mypopup = $("#login_popup");

         $("#login_popup").css({
         "left": windowWidth/2 - popupWidth/2
            });
      });
   });
   <!-- END switch_login_popup -->
   //]]>

Alguém sabe porque esses erros ocorrem? E são realmente erros ou é bobeira do Dreamweaver?


No primeiro código a seguintes linhas são relatadas com erro:
Código:
var h_perso = parseInt({switch_ticker.HEIGHT});
Código:
var width_item = Math.floor(width_max / {switch_ticker.SIZE});
Código:
auto: {switch_ticker.STOP_TIME},
Código:
size: {switch_ticker.SIZE},
Código:
animation: {switch_ticker.SPEED}
No segundo é esta:
Código:
ticker_start({switch_ticker.HEIGHT}, {switch_ticker.SPACING}, {switch_ticker.SPEED}, '{switch_ticker.DIRECTION}', {switch_ticker.STOP_TIME});

Sabem o que pode ser?

http://wagneraugusto.com.br/

2Erros de sintaxe no overall_header Empty Re: Erros de sintaxe no overall_header Dom 02 Mar 2014, 10:02 am

JScript

JScript
Administradores
Administradores

Não são erros amigo, é que na Forumeiros são utilizadas variáveis que são modificadas em tempo de execução, o que para o Dreamweaver é um erro, mas na verdade não é!

Veja que todo nome que contém as chaves {} são variáveis, exemplo: Convidado
Por isso os erros relatados estão nas linhas que utilizam as variáveis como essa: var h_perso = parseInt({switch_ticker.HEIGHT});

JS

http://autoitbrasil.com

3Erros de sintaxe no overall_header Empty Re: Erros de sintaxe no overall_header Dom 02 Mar 2014, 10:20 am

waghcwb

waghcwb
Desenvolvedores
Desenvolvedores

Imaginei que fosse algo assim, mas não tinha certeza! Obrigado amigo..

http://wagneraugusto.com.br/

Conteúdo patrocinado



Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos