-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from vlad-ghita/master
Cleanup & Symphony 2.3 compatiblity
- Loading branch information
Showing
5 changed files
with
91 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
|
||
Incremental Number Field | ||
------------------------------------ | ||
====================== | ||
|
||
Version: 1.0 | ||
Author: John Porter (john.porter@designermonkey.co.uk) | ||
Build Date: 18th July 2011 | ||
Requirements: Symphony 2.2 | ||
## 1 About ## | ||
|
||
A field that automatically increments it's value by one for each new entry. | ||
|
||
[INSTALLATION] | ||
|
||
## 1 Installation ## | ||
|
||
1. Upload the 'incremental_number' folder in this archive to your Symphony 'extensions' folder. | ||
|
||
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 "Incremental Number" field to your sections. | ||
|
||
|
||
[CHANGES] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<?php | ||
|
||
Class extension_incremental_number extends Extension{ | ||
|
||
public function about(){ | ||
return array('name' => 'Field: Incremental Number', | ||
'version' => '1.0', | ||
'release-date' => '2011-07-18', | ||
'author' => array('name' => 'John Porter', | ||
'email' => 'contact@designermonkey.co.uk') | ||
); | ||
} | ||
Class extension_incremental_number extends Extension | ||
{ | ||
|
||
public function uninstall(){ | ||
Symphony::Database()->query("DROP TABLE `tbl_fields_incremental_number`"); | ||
try{ | ||
Symphony::Database()->query("DROP TABLE `tbl_fields_incremental_number`"); | ||
} | ||
catch( Exception $e ){ | ||
} | ||
|
||
return true; | ||
} | ||
|
||
|
||
public function install(){ | ||
|
||
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, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `field_id` (`field_id`) | ||
) TYPE=MyISAM"); | ||
|
||
try{ | ||
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, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `field_id` (`field_id`) | ||
) TYPE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;" | ||
); | ||
} catch( Exception $e ){ | ||
} | ||
|
||
return true; | ||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<extension id="incremental_number"> | ||
<extension id="incremental_number" status="released" xmlns="http://symphony-cms.com/schemas/extension/1.0"> | ||
<name>Incremental Number Field</name> | ||
|
||
<description>Increment a number per entry in a section</description> | ||
|
||
<repo type="github">https://github.com/designermonkey/incremental_number</repo> | ||
|
||
<url type="discuss">http://symphony-cms.com/discuss/thread/81151/</url> | ||
|
||
<types> | ||
<type>Field Types</type> | ||
</types> | ||
|
||
<authors> | ||
<author> | ||
<name github="designermonkey" symphony="designermonkey">John Porter</name> | ||
<website>http://designermonkey.co.uk</website> | ||
</author> | ||
<author> | ||
<name github="vlad-ghita" symphony="vladG">Vlad Ghita</name> | ||
<email>vlad_micutul@yahoo.com</email> | ||
<website>http://www.xanderadvertising.com</website> | ||
</author> | ||
</authors> | ||
|
||
<releases> | ||
<release version="1.1.0" date="2012-05-24" min="2.3"><![CDATA[ | ||
* Cleanup & Symphony 2.3 compatibility. | ||
]]></release> | ||
|
||
<release version="1.0.0" date="2011-11-28" min="2.2" /> | ||
</releases> | ||
</extension> | ||
|
||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters