Skip to content

Commit

Permalink
Updated to Incremental Number field
Browse files Browse the repository at this point in the history
Signed-off-by: John Porter <john.porter@designermonkey.co.uk>
  • Loading branch information
John Porter committed Jul 18, 2011
1 parent f7b8799 commit 14e372a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
21 changes: 7 additions & 14 deletions README
@@ -1,27 +1,20 @@

Number Field
Incremental Number Field
------------------------------------

Version: 1.4
Author: Symphony Team (team@symphony21.com)
Build Date: 14th May 2008
Requirements: Symphony Beta revision 5 or greater.
Author: John Porter (john.porter@designermonkey.co.uk)
Build Date: 18th July 2011
Requirements: Symphony 2.2


[INSTALLATION]

1. Upload the 'numberfield' folder in this archive to your Symphony 'extensions' folder.
1. Upload the 'incremental_number' folder in this archive to your Symphony 'extensions' folder.

2. Enable it by selecting the "Field: Number", choose Enable from the with-selected menu, then click Apply.
2. Enable it by selecting the "Field: Incremental Number", choose Enable from the with-selected menu, then click Apply.

3. You can now add the "Number" field to your sections.
3. You can now add the "Incremental Number" field to your sections.


[CHANGES]

1.4
- In the publish area, will no longer get errors when leaving a non-required number field empty.

1.3
- Filtering supports ranges via the use of MySQL expressions. To filter by ranges, add 'mysql:' to the
beginning of the filter input. Use 'value' for field name. E.G. mysql: value >= 1.01 AND value <= {$price}
12 changes: 6 additions & 6 deletions extension.driver.php
@@ -1,24 +1,24 @@
<?php

Class extension_order_number extends Extension{
Class extension_incremental_number extends Extension{

public function about(){
return array('name' => 'Field: Order Number',
'version' => '1.4',
'release-date' => '2008-05-14',
return array('name' => 'Field: Incremental Number',
'version' => '1.0',
'release-date' => '2011-07-18',
'author' => array('name' => 'John Porter',
'email' => 'contact@designermonkey.co.uk')
);
}

public function uninstall(){
Symphony::Database()->query("DROP TABLE `tbl_fields_order_number`");
Symphony::Database()->query("DROP TABLE `tbl_fields_incremental_number`");
}


public function install(){

return Symphony::Database()->query("CREATE TABLE `tbl_fields_order_number` (
return Symphony::Database()->query("CREATE TABLE `tbl_fields_incremental_number` (
`id` int(11) unsigned NOT NULL auto_increment,
`field_id` int(11) unsigned NOT NULL,
`start_number` int(11) unsigned NOT NULL,
Expand Down
@@ -1,10 +1,10 @@
<?php

Class field_order_number extends Field{
Class field_incremental_number extends Field{

function __construct(&$parent){
parent::__construct($parent);
$this->_name = 'Order Number';
$this->_name = 'Incremental Number';
$this->_required = true;
$this->set('required', 'yes');
}
Expand Down

0 comments on commit 14e372a

Please sign in to comment.