We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    What is the $modx->config[’base_dir’] huh $modx->config[’base_path’] or $modx->config[’base_url’]
      • 27889
      • 415 Posts
      Quote from: OpenGeek at May 19, 2007, 09:25 AM

      What is the $modx->config[’base_dir’] huh $modx->config[’base_path’] or $modx->config[’base_url’]
      Sorry, this is base_path for the include statement, file updated.
        MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
        MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
        • 11975
        • 2,542 Posts
        Hi Soda,

        I had to remove the & prior some variables($escapeFields) in the save() function in fdm.dbclass
        otherwise I had an error message => call by reference deprecated.
        <?php
        	function Save(){ //escape added
        
        		global $modx;
        
        		$tablename=$modx->getFullTableName('site_content');  
          $escapedFields = array_map(create_function('$n', 'global $modx;return $modx->db->escape($n);'), $this->fields);
        		if($this->isNew){
        //here
        			$this->fields['id']=$modx->db->insert($escapedFields, $tablename);
        
        			$this->isNew = false;
        
        		} else {
        
        			$id=$this->fields['id'];
        //here
        			$modx->db->update($escapedFields, $tablename, "id=$id");
        
        		}
        		unset($escapedFields);// free the array
        
        		if(is_array($this->tvs)) $this->saveTVs();
        	}
        
        
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 27889
          • 415 Posts
          Quote from: heliotrope at May 19, 2007, 10:19 AM

          I had to remove the & prior some variables($escapeFields) in the save() function in fdm.dbclass
          otherwise I had an error message => call by reference deprecated.

          Thanks, I’ve updated the file + the eform tpl, TV needs ’tv’ before name , id and placeholder
            MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
            MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
            • 11975
            • 2,542 Posts
            I would also recommend you to update the sample form chunk to change the id type field to an hidden field.

            :-)
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 27889
              • 415 Posts
              I would also recommend you to update the sample form chunk to change the id type field to an hidden field.
              There is no need to use this field, I remove it,(just for test purpose), I use session variable for the id.
              But you point to me that I must disable editing of the id.

              Edit :
              id field removed from eform template
              fdm.db.class.inc.php function Set() : case $field==’id’:return false;
              file updated
                MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                • 27889
                • 415 Posts
                added:furl for alias, with (accentued) pagetitle if enabled.
                  MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                  MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                  • 6726
                  • 7,075 Posts
                  Very nice !

                  A lot of improvements already that’s nice smiley

                  Definitely a missing item from the repository, this will come in handy grin ! It’ll test it as soon as I have the time (next week probably) and report.
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id
                    • 22549
                    • 19 Posts
                    Hi there, I was wondering how to use TinyMCE in frontend with this snippet

                    Also, I install using your documentation, and there’s a few bugs in documentation and Select

                    1- You never say anything about select snippet, and it’s name is SelectUser, matbe you can update docs
                    2- SelectUser is not working correctly, it returns user Id, not Users name...
                    3- How do I use TinyMCE in select areas at front end
                      • 27889
                      • 415 Posts
                      1&2 SelectUser is not the purpose of this dev, you can delete it, it is just a small tips, now its code is commented.
                      3 See the first post

                      Version updated to 0.0.4 : +multiple call -some bugs
                        MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                        MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]