1 Reply Latest reply on Jul 26, 2012 4:36 AM by Liam Dilley

    module_isloggedin code replacement

    SmilingGoat

      Hi Guys,

       

      I used to have script in a page, based on this code sample:

       

      var loggedin = "{module_isloggedin}";

      if  (loggedin == 1)

      document.getElementById('hiddenform').style.display = "block";

       

      but the script changed to this::

       

      <script type="text/javascript">

                              var loggedin = "<MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true"><MM:BeginLock translatorClass="BUSINESS_CATALYST_DYNAMIC" depFiles="" BC.Token.Module="true" orig="{module_isloggedin}"><MM:DECORATION outline="Module Is User Authenticated? (0/1)" outlineId="unique" outlineForSelection="outlineForSelection" hiliteChildrenOnSelect="true">{module_isloggedin}</MM:DECORATION><MM:EndLock></MM:DECORAT ION><MM:EndLock></MM:DECORATION><MM:EndLock></MM:DECORATION><MM:EndLock></MM:DECORATION><M M:EndLock></MM:DECORATION><MM:EndLock></MM:DECORATION><MM:EndLock></MM:DECORATION><MM:EndL ock></MM:DECORATION><MM:EndLock></MM:DECORATION><MM:EndLock></MM:DECORATION><MM:EndLock></ MM:DECORATION><MM:EndLock>";

                                    if  (loggedin == 1)

                                    document.getElementById('registerbutton').style.display = "none";

                          </script>

       

      The script still functions as it should, but (was wrong) Script is not working anymore do you have any idea what happed here and if I should be concerned?

       

      Thanks

        • 1. Re: module_isloggedin code replacement
          Liam Dilley Adobe Community Professional & MVP

          Did you open where that code is in the editor of the BC admin? Do you have a translation addon in your browser of some sort?

          If yes then that is what happened. The addon injected that into the edito as you saved. Best not to code in the editor, while you can view html it is not really design for coding

           

          By the way, you do not need to do javascript at all for that. Your using javascript to perform CSS, why not just do it with css?