We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32982
    • 674 Posts
    here are the snipet to edit pages in frontend whithout logging in manager(by the web grup permissions access) inside are the (bad as usual by me)documentation
    hi
      Jabiertxof (formerly XYZVISUAL)
      My bussines: http://marker.es
      https://www.youtube.com/user/jabiertxof/videos
      • 32982
      • 674 Posts
      for the htmlarea editor need a new tv richtext for work the 250000 is a id for a document to not show for reuse the tv in another action in page 25000
      @EVAL $id = (isset($_POST[’idsend’]))? $_POST[’idsend’] :$_POST[’idsend’];$offset = (isset($_POST[’FSF_offset’]))? $_POST[’FSF_offset’] : 0;
      if($id=="")
      {if ($modx->documentObject[’id’]==250000){}else{

      $id=$modx->documentObject[’id’];
      $tbl = $modx->dbConfig[’dbase’] . "." . $modx->dbConfig[’table_prefix’] . "site_content";
      $sql3 = "SELECT id,longtitle,description,introtext,content FROM $tbl WHERE ($tbl.id=$id)";
      $drop3 = $modx->dbQuery($sql3);
      $droplimit3 = $modx->recordCount($drop3);
      $resultados="";
      $row3=mysql_fetch_array($drop3);
      $description=$row3["description"];
      $introtext=$row3["introtext"];
      $content=$row3["content"];
      return $content;} else{
      $tbl = $modx->dbConfig[’dbase’] . "." . $modx->dbConfig[’table_prefix’] . "site_content";
      $sql3 = "SELECT id,longtitle,description,introtext,content FROM $tbl WHERE ($tbl.id=$id)";
      $drop3 = $modx->dbQuery($sql3);
      $droplimit3 = $modx->recordCount($drop3);
      $resultados="";
      $row3=mysql_fetch_array($drop3);
      $description=$row3["description"];
      $summary=$row3["introtext"];
      $content=$row3["content"];
      return $content;}
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 33337
        • 3,975 Posts
        Thanks for nice snippet man!

        best regards,

        zi
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 14455
          • 14 Posts
          I have made a snippet called [[pageediter]] and ad the code above. I have also put [[pageediter]] in my Template but I get this error
          Parse error: syntax error, unexpected T_VARIABLE, expecting ’(’ in /home/site/public_html/manager/includes/document.parser.class.inc.php(705) : eval()’d code on line 1

          Can’t understand what this mean:
          for the htmlarea editor need a new tv richtext for work
          For FCKeditor you don’t need a tv or?

          the 250000 is a id for a document to not show for reuse the tv in another action in page 25000
          Can’t at all figure out what this mean.

          Suppose I need to ad the # for QuickEdit somewhere as well or?

          Regards Johan
            • 32982
            • 674 Posts
            i dont know whats the problem whith the parser(think you put the help of the snippet (remove header help), please read the snippet help
            and the htmlarea is anything richttext are using Like fckeditor
            the 25000 is for nothing is because im a code begener but it works.
              Jabiertxof (formerly XYZVISUAL)
              My bussines: http://marker.es
              https://www.youtube.com/user/jabiertxof/videos
              • 32982
              • 674 Posts
              and this snippet dont work like quickedit you dont need this
                Jabiertxof (formerly XYZVISUAL)
                My bussines: http://marker.es
                https://www.youtube.com/user/jabiertxof/videos