Jump to content
bernhard

Preview/Discussion: RockDataTables

Recommended Posts

22 minutes ago, adrian said:

but you have put a lot more thought into this than I, so feel free to ignore my ramblings

actually that's a good point because requesting the data from the server is one thing whereas presenting it is another. at datatables you have cell renderers that render your values differently in different situations. so your datefield would ideally be an integer (making it sortable) and be DISPLAYED in the table as a formatted string (using moment.js). so you would not need to format the date via sql because that is done on the client ;) maybe that's why i was not really eager about it and you thought it would be more important. but having a findObject/Array method in the core would justify that feature to some extend.

regarding the datatables there will also be an option for defining php functions (see here https://processwire.com/talk/topic/15524-preview-rockdatatables/?do=findComment&comment=158061 ).

$table->data(
    $pages->find('template=item'), [
      ['col_name1', 'label of this column', function() { return $this->page->title; }],
      ...

So that would make it really simple to setup tables - you would not have to know or write anything related to SQL. You could just use php's date('Ymd', $page->yourdatefield) function. So all the SQL options are really only meant to be used for complex tables. I think every developer working with that kind of complex tables should not be afraid of using some (very simple btw) sql queries :)

thanks for all your input!

 

  • Like 2

Share this post


Link to post
Share on other sites
14 hours ago, bernhard said:

You mean something like "make a piechart of column x and y"? I'm already thinking of that but don't know if it's really worth the effort when you can write nice charts with some lines of chartjs code... maybe a simple example/tutorial would be of more help...

2

Yes, a simple tutorial would be a great starting point. If there's enough clamour / demand for it, you could consider doing some concrete implementations based on Chartjs. Exciting stuff.
 

 

Share this post


Link to post
Share on other sites
5 hours ago, FrancisChung said:

you could consider doing some concrete implementations based on Chartjs.


Rather than chartjs, can I suggest something that outputs SVG (not canvas) and is potentially based on D3js to make it easy to manipulate beyond the charting library's built-in options. SVG gives more options for exporting the charts for use in vector graphics editors.

I admit I haven't done a chart heavy project in a couple of years so I am not fully up to date, but I quite like http://c3js.org/ - they are not the sexiest charts by default, but you can manipulate however you want via CSS and D3js making it incredibly flexible. There might be other good/better options out there now also so definitely worth some research time.

  • Like 5

Share this post


Link to post
Share on other sites

thanks @adrian very nice library! I've used google charts and chartjs in the past but it seems c3 has some very nice concepts as well. will have a look. @kongondo I guess you are working on a C3 module or are you really talking about D3 itself?

Share this post


Link to post
Share on other sites
4 minutes ago, bernhard said:

@kongondo I guess you are working on a C3 module or are you really talking about D3 itself?

No. I am using D3 itself. Early on, I researched quite a number of charting libraries (including all the usual suspects). I also looked at C3 (and similar). It is a wrapper around D3 to help you avoid the D3 learning curve. I decided to stick with D3 itself for a number of reasons.

  1. I didn't mind the D3 learning curve. In fact, I didn't find it as challenging as some sell it to be. No disrespect to C3 and maybe it is the ProcessWire in me but I wanted to get my hands dirty instead of being on the other side of some other library. Besides, if I was going to learn C3 API, I might as well learn D3.
  2. There's thousands of D3 examples with thousands of developers around the world using it. Whatever you want to do, there's a high likelihood that somebody else has already done it; So, there is already an existing solution to your problem .
  • Like 2

Share this post


Link to post
Share on other sites
21 minutes ago, bernhard said:

very nice library!

It really is supercool - so incredibly flexible. I think it's initial look might put some people off, but you have so much control over what is output which is what makes it so powerful - sounds like something else we all love around here :)

  • Like 1

Share this post


Link to post
Share on other sites

I agree with @kongondo that D3 isn't really that hard - I think it comes down the how much flexibility you need. I think you have to take the approach that best fits the task - as always.

PS - this was my original D3 type approach to generating SVG and PNG diagrams/charts programmatically: https://pear.php.net/package/Image_Canvas

It was very cool back in the day :)

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, gmclelland said:

Note that the Flot library listed here is essentially orphaned.

Pure D3 sounds like a solid choice. I really like where this thread has gone so far :) I hope I can make use of this and buy bernhard dozens of drinks in the future (his liver better be made of steel).

  • Like 3

Share this post


Link to post
Share on other sites

Wow, RockDataTables would be perfect for an upcoming project, and for where I'm working in general (dashboards collating info from diverse sources via external APIs). Please keep us updated, I would definitely pay a reasonable fee for a Pro module!

  • Like 1

Share this post


Link to post
Share on other sites

@bernhard:

This is great!

Is there a more complete version of this function somewhere? I mean more supported Fieldtypes "and stuff"?

Thank you.

Share this post


Link to post
Share on other sites

It's still the version linked above. I only added the comment for the early exit if no pages are found.

16 hours ago, theo said:

I mean more supported Fieldtypes "and stuff"?

Which fieldtypes do you need support for? It's very easy to add your own Fieldtypes to the switch statement. Any contributions are welcome. I'll start working on the module in the next days and I can start with that function as it is very important for the module. Though, as I said, it's already very easy to modify it to your needs and you don't have to wait for my version..

Share this post


Link to post
Share on other sites
6 minutes ago, bernhard said:

Which fieldtypes do you need support for? It's very easy to add your own Fieldtypes to the switch statement. Any contributions are welcome. I'll start working on the module in the next days and I can start with that function as it is very important for the module. Though, as I said, it's already very easy to modify it to your needs and you don't have to wait for my version..

I just wanted to ask if I missed something.

It is not urgent for me, I am still evaluating what's possible with PW to be able to decide if it's the right tool for a certain job.

Are you going to publish your code in the next weeks or so?

Thank you.

Share this post


Link to post
Share on other sites
7 minutes ago, theo said:

Are you going to publish your code in the next weeks or so?

I plan to do so, yes.

  • Thanks 2

Share this post


Link to post
Share on other sites

@bernhard: Another thing to keep in mind.

Field Names can contain uppercase characters whereas the database fields are all lowercase, it seems.

So after getting the type with the name possibly containing uppercase chars, the field name has to be converted to lowercase for the DB table "field_xyz"

    foreach ($fields as $f) {
        $field = $this->fields->get($f);
        $f=strtolower($f);

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Playing around with this, I have tested repeaters and there is some code to get titles in addition to the index from FieldtypeOptions  (Not sure if you like this).

Just sharing what I have.

$this->addHook("Pages::findObject", function($event) {
    $event->return = $this->pages->findArray($event->arguments(0), $event->arguments(1), $event->arguments(2), true);
});
$this->addHook("Pages::findArray", function($event) {
    $selector = $event->arguments(0);
    $fields = $event->arguments(1);
    $fields_pages = $event->arguments(2) ?: [];
    $type = $event->arguments(3) ? \PDO::FETCH_OBJ : \PDO::FETCH_ASSOC;
    // build sql string
    $sql = "SELECT\n  p.";

    // add fields of pages table
    $fields_pages[] = 'id'; // make sure we return the page id
    $fields_pages = array_unique($fields_pages);
    $sql .= implode(",\n  p.", $fields_pages);

    foreach ($fields as $f) {
        $field = $this->fields->get($f);

        if (!$field)
            continue;
        $fieldtype = $field->type;
        $f = strtolower($f);
        // fielddata is always stored in the "data" column of the field's table
        // multilang fields have several data columns identified by the language id
        // we use a variable to query the current user's language, eg data1234
        $data = "data";
        switch (true) {
            // if it is a multilang field we append the language id to query the correct column
            case $fieldtype instanceof FieldtypeTextLanguage:
            case $fieldtype instanceof FieldtypeTextareaLanguage:
                if ($this->user->language->name != 'default')
                    $data .= $this->user->language->id;
            // no break here intended!
            // build sql query
            case $fieldtype instanceof FieldtypeText:
            case $fieldtype instanceof FieldtypeCheckbox:
                $sql .= ",\n  (SELECT $data FROM field_$f WHERE pages_id = p.id) AS $f";
                break;
            case $fieldtype instanceof FieldtypePage:
            case $fieldtype instanceof FieldtypeRepeater:
                $sql .= ",\n  (SELECT GROUP_CONCAT($data SEPARATOR ',') FROM field_$f WHERE pages_id = p.id) AS $f";
                break;
            case $fieldtype instanceof FieldtypeFile:
                $sql .= ",\n  (SELECT $data FROM field_$f WHERE pages_id = p.id) AS $f";
                //$sql .= ",\n  (SELECT description FROM field_$f WHERE pages_id = p.id) AS ".$f."_desc";
                break;
            case $fieldtype instanceof FieldtypeOptions:
                $sql .= ",\n  (SELECT $data FROM field_$f WHERE pages_id = p.id) AS $f";
                $sql .= ",\n  (SELECT title FROM fieldtype_options WHERE fields_id=(SELECT id FROM fields WHERE name = '$f') AND option_id=$f) AS " . $f . "_title";
                break;
            default:
                $sql .= ",\n  '$fieldtype not supported' AS $f";
        }
    }

    $pages = $this->pages->findIDs($selector);

    if (count($pages) == 0) {
        $event->return = [];
    } else {
        $sql .= "\nFROM\n  pages AS p";
        $sql .= "\nWHERE\n  p.id IN (" . implode(",", $pages) . ")";
        //echo '<pre>' . $sql . '</pre>';
        $results = $this->database->query($sql);
        $event->return = $results->fetchAll($type);
    }
});

 

Testing with:

foreach ($pages->findArray("template=families, sort=title, limit=5000", array('title'), array()) as $p) {
    foreach ($pages->findArray("parent=" . $p['id'] . ",sort=title, limit=5000", array('title'), array()) as $m) {
        foreach ($pages->findArray("parent=" . $m['id'] . ",sort=title, limit=5000", array('title', 'sku12', 'Sound_Sample'), array()) as $s) {
            echo ($p['title'] . ' ' . $m['title'] . ' ' . $s['title'] . '<br>');
            $repeater = $s['sound_sample'];
            if ($repeater) {
                foreach ($pages->findArray('id=' . str_replace(',', '|', $repeater) . ",limit=5000", array('name', 'Sound_Type_ss', 'Files_ss'), array()) as $r) {
                    echo '<h5>' . $r['files_ss'] . '</h5>';
                    echo '<h5>' . $r['sound_type_ss_title'] . '</h5>';
                }
            }
        }
    }
}

 

  • Like 1

Share this post


Link to post
Share on other sites

Playing more...

If you need a fast multi level nav, you can try the code below (using findArray).

Set "has_parent" to the id of the parent page.

The difference to looping through pages -> children is remarkable.

Objects : 794 / Execution time : 0.021355867385864 seconds

 

function buildTree($flat, $pidKey, $idKey = null) {
    $grouped = array();
    foreach ($flat as $sub) {
        $grouped[$sub[$pidKey]][] = $sub;
    }
    $fnBuilder = function($siblings) use (&$fnBuilder, $grouped, $idKey) {
        foreach ($siblings as $k => $sibling) {
            $id = $sibling[$idKey];
            if (isset($grouped[$id])) {
                $sibling['children'] = $fnBuilder($grouped[$id]);
            }
            $siblings[$k] = $sibling;
        }
        return $siblings;
    };
    $tree = $fnBuilder($grouped[$flat[0][$pidKey]]); //!!
    return $tree;
}

$arr = $pages->findArray("has_parent=1029, sort=parent_id, include=all, limit=5000", array('title'), array('id', 'parent_id', 'name'));
$tree = buildTree($arr, 'parent_id', 'id');

foreach ($tree as $p1) {
    echo '<h2>' . $p1['title'] . '</h2>';
    if (isset($p1['children']))
        foreach ($p1['children'] as $p2) {
            echo '<h3>' . $p2['title'] . '</h3>';
            if (isset($p2['children']))
                foreach ($p2['children'] as $p3) {
                    $count++;
                    echo '<a href="../myparent/' . $p1['name'] . '/' . $p2['name'] . '/' . $p3['name'] . '/">';
                    echo '<h6>' . $p3['title'] . '</h6></a>';
                }
        }
}

 

Function buidTree is from here: https://stackoverflow.com/questions/4196157/create-array-tree-from-array-list

@bernhard Am I hijacking your thread?

  • Like 1

Share this post


Link to post
Share on other sites
8 minutes ago, theo said:

@bernhard Am I hijacking your thread?

Totally fine, I enjoy the discussion (and added this tag to the thread title).

Your example shows that the findArray method would be useful not only for the datatables module but also for other scenarios. I think it would be a good addition to the core (as already mentioned by adrian). I'll work on this next week and make a PR ans see what ryan says.

For reference, here is info regarding the limit for WHERE IN(...): https://stackoverflow.com/questions/4275640/mysql-in-condition-limit

  • Like 1

Share this post


Link to post
Share on other sites
Quote

> Totally fine, I enjoy the discussion (and added this tag to the thread title).

Great! :)

Although it would be a great addition from the community, I am not sure if ryan would like to add it to core.

You lose all the comfort of Processwire.

For example I've written some code last evening to access image-urls and descriptions (snippet, experimental):

case $fieldtype instanceof FieldtypeImage:
  $sql .= ",\n  (SELECT GROUP_CONCAT($data SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f";
  $sql .= ",\n  (SELECT GROUP_CONCAT(description SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS " . $f . "_desc";
break;
foreach ($pages->findArray("id=1, sort=title, limit=1000", array('title', 'images'), array()) as $p) {
 $images = explode(chr(29), $p['images']);
 $images_desc = explode(chr(29), $p['images_desc']);
 $imgs = array_combine($images, $images_desc);
 $langid = $this->user->language->id;
  if ($langid == $languages->getDefault()->id)
      $langid = 0;

 foreach ($imgs as $url => $descr) {
  $ajson = json_decode($descr, true);
  if (isset($ajson[$langid])) $desc=$ajson[$langid]; else $desc="";
  echo "URL=" . $p['id'] . '/' . $url . ", DESCR=" . $desc;
 }
}

 

You see, it works if you know how, but it feels a bit like writing assembler. ;)
But yes, it is fast!

  • Like 1

Share this post


Link to post
Share on other sites

The method could just be another option for find(), just like findIDS and findMany etc. exist. It will be simple for basic usage and offer the option for custom SQL queries for advanced use. I plan to implement it like this (pseudo):

$pages->findArray('template=foo, sort=bar', [
  'field1',
  'field2',
  'url' => 'SELECT GROUP_CONCAT($data SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f',
  'desc' => 'SELECT GROUP_CONCAT(description SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f_desc',
]);

field1 and 2 would be simple, url and desc are an example of advanced use.

  • Like 1

Share this post


Link to post
Share on other sites
15 minutes ago, bernhard said:

The method could just be another option for find(), just like findIDS and findMany etc. exist. It will be simple for basic usage and offer the option for custom SQL queries for advanced use. I plan to implement it like this (pseudo):


$pages->findArray('template=foo, sort=bar', [
  'field1',
  'field2',
  'url' => 'SELECT GROUP_CONCAT($data SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f',
  'desc' => 'SELECT GROUP_CONCAT(description SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f_desc',
]);

field1 and 2 would be simple, url and desc are an example of advanced use.

Yes, speed must be the first priority here. Load only things you need.

In case of Images, only desc is "advanced use".

"data" is already the filename and url is not in the database.

URL is (pseudo) assets/files/$pageid/$data

But I think we should offer a more convenient way for "description" than writing the select statement yourself.

"description" exists for FieldtypeFile too.

  • Like 1

Share this post


Link to post
Share on other sites

@bernhard: Or like this:

 

$this->addHook("Pages::findArray", function($event) {
...
    foreach ($fields as $f) {
        $field_extra = explode(':', $f);
        $f = $field_extra[0];
        $field_extra = array_slice($field_extra, 1);
        $field = $this->fields->get($f);
...
            case $fieldtype instanceof FieldtypeImage:
                $sql .= ",\n  (SELECT GROUP_CONCAT($data SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f";
                if (in_array('description', $field_extra))
                    $sql .= ",\n  (SELECT GROUP_CONCAT(description SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS " . $f . "_description";
                break;
            case $fieldtype instanceof FieldtypeOptions:
                $sql .= ",\n  (SELECT $data FROM field_$f WHERE pages_id = p.id) AS $f";
                if (in_array('title', $field_extra))
                    $sql .= ",\n  (SELECT title FROM fieldtype_options WHERE fields_id=(SELECT id FROM fields WHERE name = '$f') AND option_id=$f) AS " . $f . "_title";
                break;

 

Then request extra data like 'images:description':

foreach ($pages->findArray("id=1, sort=title, limit=1000", ['title', 'images:description'], []) as $p) {

 

Share this post


Link to post
Share on other sites

Ok, took some time but now I get your point :) And I like it!

This could definitely speed things up and make things a lot easier. Not sure how to implement this properly, though. We have different table structures for some fields. The first and easiest is for a simple textfield:

pages_id | data

then we have image/field fields:

pages_id | data | sort | description | modified | created

then we have option fields:

pages_id | data | sort

 

So if I understood you correctly, you are suggesting something like this:

$pages->findArray('foo=bar', [
  'mytextfield',
  'myimagefield:description',
  'myoptionsfield:title',
]);

Resulting in an output like this:

array (5)
mytextfield => "demo page" (9)
myimagefield => "foo.jpg|bar.jpg" (15)
myimagefield_desc => "my foo image|my bar image" (25)
myoptionsfield => "1|2|4" (5)
myoptionsfield_title => "option 1|option 2|option 4" (26)

Right?

What if we changed this a little bit and used arrays. See the examples below:

$pages->findArray('foo=bar', [
    // examples below
]);

// simple textfield
// request:
    'mytextfield'
// return: data column of this field
    'this is some text'

// image field
// request
    'myimagefield'
// return
    'foo.jpg|bar.jpg'
    
// image field with more requested info
// request
    'myimagefield' => [
        'description',
        'sort',
        'mycustomsql' => 'SELECT ... FROM ...',
    ],
// return
    'myimagefield' => 'foo.jpg|bar.jpg',
    'myimagefield_description' => 'foo desc|bar desc',
    'myimagefield_sort' => '1|2',
    'myimagefield_mycustomsql' => 'x|y'
    
// simple options field
// request
    'myoptionsfield'
// return
    '1|2|4'
    
// options field more info
// request
    'myoptionsfield' => [
        'title'
    ],
// return
    'myoptionsfield' => '1|2|4',
    'myoptionsfield_title' => 'option 1|..2|..4',

// custom sql field
// request
    'mycustomsqlfield' => 'SELECT ... FROM ...',
// return
    'mycustomsqlfield' => 'some return value',
    
// page field
// request
    'mypagefield' => [
        'pages:templates_id',
        'pages:status',
    ],
// return
    'mypagefield' => '1010|1011|1012',
    'mypagefield_templates_id' => '44|45|44',
    'mypagefield_status' => '1|1|8192',

Some notes:

  • If a simple string is requested, the "data" column of this table will be returned (or data1234 for multilang fields)
  • all concatenated fields MUST be sorted via the sort column in order to have a consistant sort order across multiple array items
  • What if image descriptions are empty? Would it still work?
  • If a key => value is requested and the "value" is an array we do sub-queries
    • if the subquery has a colon we query this table instead of the current field's table (pages:status instead of mypagefield:status)

 

This should give us a lot of flexibility, I think. For more complex scenarios we will still need to use joins. I've already started working on a proof of concept SQL editor module: 

With both tools in our hands I think it will be quite easy to query all the data we need and it will still be quite simple to use.

@adrian I would be very interested in your opinion about this :)

Share this post


Link to post
Share on other sites
1 hour ago, bernhard said:

Ok, took some time but now I get your point :) And I like it!

This could definitely speed things up and make things a lot easier. Not sure how to implement this properly, though. We have different table structures for some fields. The first and easiest is for a simple textfield:

 

It is easy to make it "all purpose" with the code above.

Just change it to return all the requested values (foreach):

case $fieldtype instanceof FieldtypeImage:
   $sql .= ",\n  (SELECT GROUP_CONCAT($data SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS $f";
   foreach ($field_extra as $exfld)
      $sql .= ",\n  (SELECT GROUP_CONCAT($exfld SEPARATOR 0x1D) FROM field_$f WHERE pages_id = p.id) AS " . $f . "_".$exfld;
break;

Query like this:

foreach ($pages->findArray("id=1, sort=title, limit=1000", ['title', 'images:description:modified:created'], ['created']) as $p) {
echo $p['created']; //Page created
echo $p['images_created']; //Images created. Delimited String
echo $p['images_modified']; //Images modified.Delimited String

Created SQL looks like

SELECT p.created, p.id, (SELECT data1012 FROM field_title WHERE pages_id = p.id) AS title, 
(SELECT GROUP_CONCAT(data SEPARATOR 0x1D) FROM field_images WHERE pages_id = p.id) AS images, 
(SELECT GROUP_CONCAT(description SEPARATOR 0x1D) FROM field_images WHERE pages_id = p.id) AS images_description, 
(SELECT GROUP_CONCAT(modified SEPARATOR 0x1D) FROM field_images WHERE pages_id = p.id) AS images_modified, 
(SELECT GROUP_CONCAT(created SEPARATOR 0x1D) FROM field_images WHERE pages_id = p.id) AS images_created FROM pages AS p WHERE p.id IN (1)

Not sure if array or delimited makes a difference.

I don't think this is ever going to be a foolproof tool, but it's great base which you can extend to your taste.

For my purpose (Exporting data to CSV fast) it's almost ready.

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, theo said:

Not sure if array or delimited makes a difference.

array makes two things possible:

  1. add custom sql queries as sub-queries (don't know if that would be useful in some cases? or unnecessary?)
  2. add pages:status syntax - this makes a lot of sense to me, because I've come over this problem a lot with tables where you want to know the status of the referenced page. you would need joins for that and using a subquery could make it possible to avoid this complexity. have to make performance tests though.
36 minutes ago, theo said:

I don't think this is ever going to be a foolproof tool

Why not? Or what exactly?

37 minutes ago, theo said:

For my purpose (Exporting CSV Data fast) it's almost ready.

Jep, can imagine that it shines here :)

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild. 
      EDIT: You can now install it directly from the Modules directory: http://modules.processwire.com/modules/inputfield-float-range/
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Optional step value (Read more) Optional manual override of the selected value (will still adhere to the rules above) Configurable rounding of manually entered values (floor, round, ceil, disable) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant  
      Changelog
      004 (current version)
      - Make rounding of manually entered values configurable (floor, round, ceil or disable)
      - Fix small JS bug when the value-display field was not displayed
      - Update README
      003
      - Code cleanup, add some ModuleInfo data & LICENSE
      - Submit to PW Modules directory (http://modules.processwire.com/modules/inputfield-float-range/)
      002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional
      001
      - Initial release
       
      Thanks!
       
       
    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-10-18
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
×
×
  • Create New...