Re: Session variables

  •  04-24-2009, 9:28 AM

    Re: Session variables

    Hi,
     
    This has not entirely cured everything.
     
    If I have a page with a "ImageGalleryByBrowsing" such as :-

       <div onclick="callGetImage()">CLICK TO GET IMAGE</div>
       <form name="changeImage" action="" method="post">
       <input id="imageName" name="imageName" type="text" size="50"/>

        <?php

         $editor=new CuteEditor();
         $editor->ID="newImage";
         $editor->Text="";
         $editor->FilesPath="CuteEditor_Files";
         $editor->BaseHref="
    http://www.mydomain.com";
         $editor->URLType="Absolute";
         $editor->SecurityPolicyFile="mySecurity.config";
         $editor->AutoConfigure="None";
         $editor->ContextMenuMode="None";
         $editor->ShowBottomBar=false;
         $editor->Width=10;
         $editor->Height=10;
         $editor->ImageGalleryPath="/user/me/uploads";
         $editor->Draw();
         $ClientID=$editor->ClientID();
         $editor=null;

        ?>

       </form>

       <script Language="javascript">
       function callGetImage()
       {
           var editor = document.getElementById('<?php echo $ClientID; ?>');
           editor.FocusDocument();
           var editdoc = editor.GetDocument();
           editor.ExecCommand('new');
           editor.ExecCommand('ImageGalleryByBrowsing');
           InputURL();
           document.getElementById('imageName').focus();
       }
       function InputURL()
       {
           var editor = document.getElementById('<?php echo $ClientID; ?>');
           var editdoc = editor.GetDocument();
           var imgs = editdoc.getElementsByTagName("img");
           if(imgs.length>0)
               document.getElementById("imageName").value = imgs[imgs.length-1].src;
           else
              setTimeout(InputURL,500);
       }
       </script>
    Then this works fine with no forbidden access problems.
     
    If I now add a normal edit area as a subsequent control, such as:-

       <?php

        $userPath="/user/me/";

        $editor2=new CuteEditor();
        $editor2->ID="description";
        $editor2->subsequent=true;
        $editor2->FilesPath="CuteEditor_Files";
        $editor2->BaseHref="
    http://www.mydomain.com";
        $editor2->URLType="Absolute";
        $editor2->AutoConfigure="Full";
        $editor2->ToggleBorder=false;
        $editor2->ContextMenuMode="None";
        $editor2->SecurityPolicyFile="mySecurity.config";
        $editor2->Text="Test text";
        $editor2->Width=720;
        $editor2->Height=400;
        $editor2->ActiveTab="Edit";
        $editor2->ImageGalleryPath=$userPath."Uploads";
        $editor2->FlashGalleryPath=$userPath."Uploads";
        $editor2->FilesGalleryPath=$userPath."Uploads";
        $editor2->MediaGalleryPath=$userPath."Uploads";
        $editor2->ShowTagSelector=false;
        $editor2->EnableStripScriptTags=true;
        $editor2->EditCompleteDocument=true;
        $editor2->BreakElement="Br";
        $editor2->Draw();
        $editor2=null;

       ?>
    Now the first "ImageGalleryByBrowsing" control fails with "The area you are attempting to access is forbidden" whilst the second control works fine.
     
    If both use the same security file then what is the conflict?
     
    Thanks
View Complete Thread