We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4966
    • 143 Posts
    Yes I’m using id.  I’m using eform.

    I just did add the the following line to the form:
      <input type="hidden" name="itemlongtitle" value="[~[*id*]~]" eform="itemlongtitle::0"/>

    and to the form report I added:
    <tr valign="top"><td>Item:</td><td>[+itemlongtitle+]</td></tr>

    Now I’m getting:  [undefined] » Tampering attempt detected!

    What I’m missing is how to retrieve the parameter to pass to the form.

    thanks for the help,
    charlie-imac


      • 25695
      • 12 Posts
      Hello,

      First of all thanks for the great snippet! ...but! shocked I’ve got some some problems with it.

      The calalogue also indexes folders, and I dont want that. So i used the ditto tag hidefolders
      [!RunDitto? &hideFolders=`1` ;tpl=`ProduitAllDittoTpl` ;SelectPerPage=`2`  ;language=`english`!]

      But strange enough that isnt working... I also tryed to edit the runditto snippet and placed the parameter from the ditto snippet in it.

      $hideFolders = isset($hideFolders)? $hideFolders : 1;
      	// don't show folders in the returned results
      


      but again whitout results.. can someone help me with this please?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Is that snippet call you posted a typo? All those semicolons need to be ampersands... &option=`value` &option2=`value2` etc.
          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
          • 27889
          • 415 Posts
          Ditto’ parameter is filled in an array at the end of the RunDitto snippet.
          <?php
          $snParams = array();
          $snParams['startID'] = $modx->documentObject['id'];
          $snParams['paginate']=1;
          if (isset($language)) $snParams['language'] = $language;//'francais';
          if (isset($tpl)) $snParams['tpl']=$tpl;//"ProduitAllDittoTpl";
          $snParams['summarize'] = $nbres;
          ?>
          


          to call it with the hidefolder param you must add :
          <?php
          $hideFolders = isset($hideFolders)? $hideFolders : 1;
          $snParams['hideFolders']=$hideFolders;
          ?>

            MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
            MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
            • 25695
            • 12 Posts
            Hi,

            Thank you it’s working now! also changed the snippet call because it was messed up because of tinymce, tnx for the tip soda!

            Then yet another question when i press ajoute product, the pages redirects me to a page called 86.html, and that page is blank. Also the ’ajoute’ product is not published on the front end, strange because in the backend i can see that the new ’ajoute’ product, and i can see it’s published. And when i just press edit the document, and edit nothing and save. It’s suddenly published on the frontend.. hmm smiley

            I think/hope it’s because i didn’t do the last step of the manual...

            In the Redirect plugin with the "Manager Access Events" "OnBeforeManagerPageInit" and "OnManagerLogin" checked.

            if ($_SESSION[’mgrPermissions’][’id’]!=’1’){$modx->sendRedirect($modx->makeurl($modx->config[’site_start’]));}

            do not understand where the to place the code... manager access events.. uhmm sorry but where? embarrassed
              • 27889
              • 415 Posts
              just create a new plugin and paste the code in, don’t forget to check the event.
                MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                • 7455
                • 2,204 Posts
                Quote from: charlie-imac at Mar 02, 2007, 02:14 PM

                Yes I’m using id. I’m using eform.

                I just did add the the following line to the form:
                <input type="hidden" name="itemlongtitle" value="[~[*id*]~]" eform="itemlongtitle::0"/>

                and to the form report I added:
                <tr valign="top"><td>Item:</td><td>[+itemlongtitle+]</td></tr>

                Now I’m getting: [undefined] » Tampering attempt detected!

                What I’m missing is how to retrieve the parameter to pass to the form.

                thanks for the help,
                charlie-imac


                Try to use this
                <input type="text"style="display:none;" name="itemlongtitle" value="[~[*id*]~]" eform="itemlongtitle::0"/>


                instead of this:
                <input type="hidden" name="itemlongtitle" value="[~[*id*]~]" eform="itemlongtitle::0"/>


                eForm does not like it when hidden fields are dynamicly populated. and do you realy want the valeu to be a link or just the id? it would be better to create the link path in your report thean in your form I think.

                Dimmy
                  follow me on twitter: @dimmy01
                  • 25695
                  • 12 Posts
                  Hey Soda tnx for helping me out here! made the plugin and checked OnBeforeManagerPageInit" and "OnManagerLogin".

                  I’m still being directed to ../../86.html , and the new product is only visible on the frontend after changing something in the /manager

                  Hope you can help me out again smiley
                    • 27889
                    • 415 Posts
                    rudjur, it seems that this is a cache problem, check your snippet call and the value of "cache" for each page. Have you the last version of the catalogue ?
                    Is your 86.html page the error page of your site ?

                      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                      • 25695
                      • 12 Posts
                      Hey Soda,

                      I’m running the catalogue you upped in august, seems te latest version........

                      but when i’m login in true the manager with a non-admin i’m getting te following.....



                      What did i done?
                      - Added the system event in the database
                      - Placed the hack in manager/index.php on line 184... was not accactly line 184, and the line // first we check to see if this is a frameset request to invoke the new event. doesnt exist in the file.. looks a bit different.
                      - Made a plugin, and checked "OnBeforeManagerPageInit" and "OnManagerLogin" , and placed the code..

                      rolleyes thanks for the help Soda!