We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    HI,

    I updated this amazing module to work and look good with Evo and MODxCarbon theme

    Updates:
    - .gif to .png icons + icon name fixes
    - removed dot.gif <- could not find it the new theme
    - fixed buttons to float right
    - h1 tag for page title
    - Add another/Continue editing/Close in a dropdown

    Unfortunately I cannot attach the files so you can download the archive here

    Update
    I found another gif file smiley so please redownload
      • 20413
      • 2,877 Posts
      NICE CIPA! cool
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 21056
        • 327 Posts
        Really nice module - after I’d applied the amended code on Pg 2 of this thread, it worked straight out of the box. A few things I’ve come across:

        1.

        I’m having a bit of trouble with a TIMESTAMP field - because the DATE format in the module defaults to YYYY-MM-DD, it loses the time part - e.g.

        2009-12-04 14:45:00


        is rewritten as

        2009-12-04 00:00:00


        when that record is edited. I’m not entirely sure how the module is detecting the date format. Would it be an easy fix to make it recognise times as well as dates?


        2. I’m finding if I use a select element for displaying with a query, it is using the returned columns in the opposite order from what is stated in the comments - e.g. instead of the example in record.edit.inc.php

        select@SELECT value,caption,option_group from `cities` SORT option_group ASC


        I need to order the columns as:

        select@SELECT option_group,caption,value from `cities` SORT option_group ASC



        3. I’ve added in a new type of display item - readonly. This is useful where you might want to display a value, but not allow the user to edit it. In record.edit.inc.php, above the line

        case "string":


        I added:

        case "readonly":
        $tableRows .= "<input{$class} type=\"hidden\" name=\"fld_$fld\" value =\"".$row[$fld]."\" />".$row[$fld];
        break;	



        4. I made the filter dropdown a little friendlier by using the set headings (instead of fieldname):

        In records.list.records.inc.php, change:

        if($props['use']) $select_fields[] = $fldname;


        to

        if($props['use']) $select_fields[$fldname] = $props['heading']? $props['heading']:$fldname;


        and

        <td><?php echo printSelectField( implode(',',$select_fields),$_REQUEST['dbe_fld'],'fldname' ); ?></td>


        to

        <td><?php echo printSelectField( $select_fields,$_REQUEST['dbe_fld'],'fldname' ); ?></td>


        It would be nice if there was an option to only show those listed, but this doesn’t look straightforward.


        5. I’ve made an advanced setting to choose whether to show the "add" button or not - this may be useful if you don’t want the user to be able to create new records. I changed:

        <td><a class="searchtoolbarbtn" href="<?php echo $dbeHomeUrl; ?>&ra=insert"><img src="media/style/<?php echo $manager_theme; ?>images/icons/add.png"  align="absmiddle" /> New Record</a></td>


        to

        <td><?php if (isset($dbConfig['settings']['hide_add']) && $dbConfig['settings']['hide_add']) { echo ' '; } else { ?> <a class="searchtoolbarbtn" href="<?php echo $dbeHomeUrl; ?>&ra=insert"><img src="media/style/<?php echo $manager_theme; ?>images/icons/add.png"  align="absmiddle" /> New Record</a> <?php } ?></td>


        And then adding the advanced setting:
        hide_add --> true

        6. I’ve swapped the contents of the H1 on every page for a configuration variable, to allow you to easily update the name of the module to make it more user friendly.

        This requires the following adding to the configuration string:

        &mod_name=Module name;string;dbEdit 


        7. Removed an excess <html> tag from header.inc.php

        8. Added installation instructions (and the updated configuration string) to the readme.txt file

        I’ve attached a version of the module with these changes made if anyone is interested / would like to continue development further. This was based on cipa’s version from yesterday, with the suggested amended file from pg2 of this thread.

        Edit: Updated the zip file to fix a bug where my change 4 above did not work when applying custom SQL through an advanced setting.
          Author: ManagerManager plugin - customise your ModX manager interface

          Rckt - web development, Sheffield, UK
          • 29076
          • 615 Posts
          Hey, this is great! Thank you. smiley
            I think, thererfor I am! But what I am, and why...?
            • 6038
            • 228 Posts
            aweshishly awesome dellishus lubberly grin
              • 5340
              • 1,624 Posts
              I have a 2 question:

              1. Is there a solution to insert new records in the middle of the data, not only at the end.
              2. Is it possible to re-arrange the records with a drag and drop action like in Doc Manager.

              Thx
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                The data in DocManager can be re-ordered via drag-and-drop because there is an extra field to hold the desired display order (the menuindex field), and this can be changed via the javascript and AJAX requests triggered by the drag-and-drop, as well as by individually editing the documents and changing their Menu Index. A query to collect the items can be ordered by this extra field, which the Wayfinder snippet as well as the code to display the Document Tree do. The data is not actually moved in the database. The records in the database are still identified by and in the order of the original default auto-incremented ID they are given when added to the database (the document ID).

                So unless your table has such a field for display order, there is no safe way to change their order or insert records into the middle of the table.

                  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
                  • 5340
                  • 1,624 Posts
                  Probably I need to create some sort of plugin for dbEdit where you can define the ordering column you are talking about and then use some javascript to sort the rows plus the script to save the new values into db
                    • 10450
                    • 30 Posts
                    Hi

                    I am unable to add my table in dbedit. Although i can see the table in dbedit module but when i click on save button it gives me the error that "unable to save configeration".
                    Pls help embarrassed
                      • 10450
                      • 30 Posts
                      Quote from: TobyL at Mar 09, 2009, 10:27 PM

                      The message should include the error message returned from $modx->db->getLastError(). This clearly doesn’t return anything useful that’s why you’re not seeing anything after "Reason is:"

                      Firstly check that you have a "{table_prefix}dbedit_configs" in your database. (where {table_prefix} is the modx table prefix as set during modx installation). dbEdit should automatically create the table but if it’s not there you may have to create it yourself.

                      CREATE TABLE `{table_prefix}dbedit_configs` (`recID` TINYINT (3) UNSIGNED AUTO_INCREMENT, `name` VARCHAR (128) NOT NULL, `comment` VARCHAR (255) NOT NULL, `config` TEXT NOT NULL, PRIMARY KEY(`recID`), UNIQUE(`name`));
                      (again replace {table_prefix} with the actual modx table prefix).

                      Also check that this table is readable by the mysql user that you have configured for modx.



                      my dbedit_configs has the table prefix as modx but i am gettin same error embarrassed