We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26799
    • 177 Posts
    is there any way to give a webuser the ability to modify content on a page through something like "quickedit"?

    As far as I can tell the sole purpose of the webuser access is to deny them access to documents in the site, and have nothing to do with "strait up" content management.

    I need to give web users the ability to modify a [*TV*] within sections of the site, I know it’s possible but I’m not a good enough PHP man to totally get it. I’m figuring that I could check to see if there is a login and who it is, then I could give access to them through a "quickedit" link to modify the [*TV*] value..

    I’ve looked all over the forums and I can’t find it, it’s a rather difficult then to search for, if I could simply be pointed toward a solution... I can figure it out.

    Thanks...God Bless
    • That is correct, web users are to control access to web content. Manager users are to control access to manager functions, such as editing documents. For now, anyway wink
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 26799
        • 177 Posts
        yeah, I understand the user user group and doc goup functionality, I was just wondering if someone had put togehter a module or workaround, or had any ideas regarding one.
          • 4041
          • 788 Posts
          Well, I have modified a version of MODx to allow web users to create pages but since I added a few fields to the database structure the mod is not portable to stock installations. That said, here is how I go about allowing web users to add documents:

          the basics of the snippet check if the user is logged in, then checks if a folder with the users name is available (this is where the document gets added after creation). If the parent folder id is not found they are not allowed to see the form...

          if (isset($_SESSION['webShortname']) && isset($_SESSION['webValidated'])){
          $tbl = $modx->dbConfig['dbase'].".".$modx->dbConfig['table_prefix'];
          
          $output ="";
          // get the users folder so we can set where the document needs to go
          // once published
          
          $sql = "SELECT * from ".$tbl."site_content WHERE pagetitle='".$_SESSION['webShortname']."'";
          $rs = $modx->dbQuery($sql);
          $row = mysql_fetch_assoc($rs);
          
          if($row !=""){
           $listing_parent_id = $row['id'];
           $output . ="listing parent id is <b>".$listing_parent_id."</b><br>";
          
          }else{
          $output .="Could not find the parent folder so you cannot access the form";
          }


          note that this could stand a bit more error checking, and does not at all check for doc groups and such... I’m sure this is not the best way to accomplish this but it works ok for me so far.
          As far as editing a tv, since I am unfamiliar with tv’s in general I have no ideas on that functionality at this point...
            xforum
            http://frsbuilders.net (under construction) forum for evolution
            • 26799
            • 177 Posts
            thanks breezer, your workaround sounds pretty stable, however our users don’t need to make the pages, just manage them.

            [page1] --- web user one

            [page 2] --- web user two

            I’m working through a solution now using the static link method provided through the quickedit module, and the [[MemberCheck]] snippet by rtrash..

            I’ll update when I get frustrated or when Victory is mine!