aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2010-12-23 23:14:42 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2010-12-23 23:14:42 +0000
commitbd2f4275434bb99880e6659a1a528bd8eec380f4 (patch)
tree7394de7942ef4791b066a03ab412c674fdbf4ba5
parent58214267999e01688b9d885dbf5fe02f14b3be8e (diff)
added sound cards - part 1
-rw-r--r--h-source/Application/Controllers/SoundcardsController.php160
-rw-r--r--h-source/Application/Include/hardware.php43
-rw-r--r--h-source/Application/Include/languages.php20
-rw-r--r--h-source/Application/Include/myFunctions.php26
-rw-r--r--h-source/Application/Models/BaseModel.php1
-rw-r--r--h-source/Application/Models/SoundcardsModel.php74
-rw-r--r--h-source/Application/Views/Hardware/left.php4
-rw-r--r--h-source/Application/Views/Soundcards/catalogue.php82
-rw-r--r--h-source/Application/Views/Soundcards/form.php106
-rw-r--r--h-source/Application/Views/Soundcards/page.php94
-rw-r--r--h-source/Config/Route.php9
-rwxr-xr-xh-source/Public/Img/H2O/audio-card.pngbin0 -> 4588 bytes
-rwxr-xr-xh-source/Public/Img/H2O/audio-card_22.pngbin0 -> 1051 bytes
-rw-r--r--h-source/tables.sql4
14 files changed, 620 insertions, 3 deletions
diff --git a/h-source/Application/Controllers/SoundcardsController.php b/h-source/Application/Controllers/SoundcardsController.php
new file mode 100644
index 0000000..9952afd
--- /dev/null
+++ b/h-source/Application/Controllers/SoundcardsController.php
@@ -0,0 +1,160 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This file is part of h-source
+//
+// h-source is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// h-source is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with h-source. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class SoundcardsController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('SoundcardsModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['SoundcardsModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'soundcard';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Soundcards::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Wifi::$commYear => "comm_year",
+ "+++checkIsStrings|".Soundcards::$audioSelect => "sound_card_works",
+ "++++checkIsStrings|".Soundcards::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Soundcards::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Wifi::$commYear => "comm_year",
+ "+++checkIsStrings|".Soundcards::$audioSelect => "sound_card_works",
+ "++++checkIsStrings|".Soundcards::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "++checkLength|49" => "driver",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ );
+
+ $this->m['HardwareModel']->softConditions['insert'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "++checkLength|49" => "driver",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,kernel,description,distribution,comm_year,sound_card_works,pci_id,interface,driver','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'sound_card_works:sanitizeString' => 'undef',
+ 'interface:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'Soundcard';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'sound_card_works' => $this->viewArgs['sound_card_works'],
+ 'interface' => $this->viewArgs['interface'],
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php
index 852cd62..e0919a9 100644
--- a/h-source/Application/Include/hardware.php
+++ b/h-source/Application/Include/hardware.php
@@ -24,7 +24,7 @@ if (!defined('EG')) die('Direct access not allowed!');
class Hardware
{
- public static $controllers = array('notebooks','wifi','videocards','printers','scanners','threegcards'); //used by UsersController::login()
+ public static $controllers = array('notebooks','wifi','videocards','printers','scanners','threegcards','soundcards'); //used by UsersController::login()
public static $commYear = 'not-specified,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992';
@@ -290,4 +290,45 @@ class ThreeGcards extends Wifi
{
return implode(',',array_values(self::$vendors));
}
+}
+
+class Soundcards extends Hardware
+{
+ public static $vendors = array(
+ "ALi Corporation" => "ALi-Corporation",
+ "Advanced Micro Devices (AMD)" => "Advanced-Micro-Devices",
+ "Analog Devices" => "Analog-Devices",
+ "ATI Technologies Inc" => "ATI-Technologies-Inc",
+ "Aureal Semiconductor" => "Aureal-Semiconductor",
+ "Avance Logic Inc (ALI)" => "Avance-Logic-Inc",
+ "Aztech System Ltd" => "Aztech-System-Ltd",
+ "Brooktree Corporation" => "Brooktree-Corporation",
+ "C-Media Electronics Inc" => "C-Media-Electronics-Inc",
+ "Cirrus Logic" => "Cirrus-Logic",
+ "Creative Labs" => "Creative-Labs",
+ "Ensoniq" => "Ensoniq",
+ "ESS Technology" => "ESS-Technology",
+ "ForteMedia Inc" => "ForteMedia-Inc",
+ "Intel Corporation" => "Intel-Corporation",
+ "Motorola" => "Motorola",
+ "National Semiconductor Corporation" => "National-Semiconductor-Corporation",
+ "Neomagic Corp" => "Neomagic-Corp",
+ "nVidia Corporation" => "nVidia-Corporation",
+ "RME" => "RME",
+ "S3 Inc" => "S3-Inc",
+ "Silicon Integrated Systems (SiS)" => "Silicon-Integrated-Systems",
+ "Trident Microsystems" => "Trident-Microsystems",
+ "VIA Technologies Inc" => "VIA-Technologies-Inc",
+ "Xilinx Corporation" => "Xilinx-Corporation",
+ "Yamaha Corporation" => "Yamaha-Corporation",
+ );
+
+ public static $audioSelect = 'yes,no';
+
+ public static $interface = "not-specified,PCI,ISA,USB,Firewire,Parallel,PCI-E,PCMCIA";
+
+ public static function vendorsList()
+ {
+ return implode(',',array_values(self::$vendors));
+ }
} \ No newline at end of file
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index 2d1514b..44c9020 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -139,6 +139,7 @@ class Lang
"My description" => "La mia descrizione",
"contributions" => "contributi",
"contributions of" => "contributi di",
+ "No sound cards found" => "Non รจ stata trovata alcuna scheda audio",
),
'es' => array
(
@@ -318,6 +319,10 @@ class MyStrings
'threegcards' => array(
'element' => '3G-card',
),
+
+ 'soundcards' => array(
+ 'element' => 'sound card',
+ ),
),
'fr' => array(
@@ -345,6 +350,10 @@ class MyStrings
'threegcards' => array(
'element' => '3G-card',
),
+
+ 'soundcards' => array(
+ 'element' => 'sound card',
+ ),
),
'it' => array(
@@ -372,6 +381,10 @@ class MyStrings
'threegcards' => array(
'element' => '3G-card',
),
+
+ 'soundcards' => array(
+ 'element' => 'sound card',
+ ),
),
'es' => array(
@@ -399,6 +412,10 @@ class MyStrings
'threegcards' => array(
'element' => '3G-card',
),
+
+ 'soundcards' => array(
+ 'element' => 'sound card',
+ ),
),
);
@@ -409,7 +426,8 @@ class MyStrings
'videocard' => 'videocards',
'printer' => 'printers',
'scanner' => 'scanners',
- '3G-card' => 'threegcards'
+ '3G-card' => 'threegcards',
+ 'soundcard' => 'soundcards',
);
public static function getTypes()
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
index e182690..0aa5aca 100644
--- a/h-source/Application/Include/myFunctions.php
+++ b/h-source/Application/Include/myFunctions.php
@@ -318,6 +318,32 @@ function betterVendor($string)
"Franklin-Wireless-Corporation" => "Franklin Wireless Corporation",
"Novatel-Wireless" => "Novatel Wireless",
"Sierra-Wireless" => "Sierra Wireless",
+ "ALi-Corporation" => "ALi Corporation",
+ "Advanced-Micro-Devices" => "Advanced Micro Devices (AMD)",
+ "Analog-Devices" => "Analog Devices",
+ "ATI-Technologies-Inc" => "ATI Technologies Inc",
+ "Aureal-Semiconductor" => "Aureal Semiconductor",
+ "Avance-Logic-Inc" => "Avance Logic Inc (ALI)",
+ "Aztech-System-Ltd" => "Aztech System Ltd",
+ "Brooktree-Corporation" => "Brooktree Corporation",
+ "C-Media-Electronics-Inc" => "C-Media Electronics Inc",
+ "Cirrus-Logic" => "Cirrus Logic",
+ "Creative-Labs" => "Creative Labs",
+ "Ensoniq" => "Ensoniq",
+ "ESS-Technology" => "ESS Technology",
+ "ForteMedia-Inc" => "ForteMedia Inc",
+ "Intel-Corporation" => "Intel Corporation",
+ "Motorola" => "Motorola",
+ "National-Semiconductor-Corporation" => "National Semiconductor Corporation",
+ "Neomagic-Corp" => "Neomagic Corp",
+ "nVidia-Corporation" => "nVidia Corporation",
+ "RME" => "RME",
+ "S3 Inc" => "S3-Inc",
+ "Silicon-Integrated-Systems" => "Silicon Integrated Systems (SiS)",
+ "Trident-Microsystems" => "Trident Microsystems",
+ "VIA-Technologies-Inc" => "VIA Technologies Inc",
+ "Xilinx-Corporation" => "Xilinx Corporation",
+ "Yamaha-Corporation" => "Yamaha Corporation",
);
return (array_key_exists($string,$names)) ? $names[$string] : $string;
diff --git a/h-source/Application/Models/BaseModel.php b/h-source/Application/Models/BaseModel.php
index 5a06db4..ce613c5 100644
--- a/h-source/Application/Models/BaseModel.php
+++ b/h-source/Application/Models/BaseModel.php
@@ -24,6 +24,7 @@ class BaseModel extends Model_Tree {
public $type = ''; //device type
public $diffFields = array();
+ public $fieldsWithBreaks = array();
public function __construct() {
$this->_tables = 'hardware';
diff --git a/h-source/Application/Models/SoundcardsModel.php b/h-source/Application/Models/SoundcardsModel.php
new file mode 100644
index 0000000..cea12be
--- /dev/null
+++ b/h-source/Application/Models/SoundcardsModel.php
@@ -0,0 +1,74 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This file is part of h-source
+//
+// h-source is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// h-source is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with h-source. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class SoundcardsModel extends BaseModel
+{
+
+ public $type = 'soundcard'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'comm_year',
+ 'sound_card_works' => 'sound_card_works',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'comm_year' => gtext("year"),
+ 'sound_card_works' => gtext("does it work?"),
+ 'interface' => gtext("interface"),
+ );
+
+ $this->_popupFunctions = array(
+ 'vendor' => 'betterVendor',
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="soundcard" and deleted="no"',
+ 'comm_year' => 'type="soundcard" and deleted="no"',
+ 'sound_card_works' => 'type="soundcard" and deleted="no"',
+ 'interface' => 'type="soundcard" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'pci_id' => gtext("VendorID:ProductID code of the device"),
+ 'comm_year' => gtext('year of commercialization'),
+ 'interface' => gtext("interface"),
+ 'distribution' => gtext('GNU/Linux distribution used for the test'),
+ 'kernel' => gtext('tested with the following kernel libre'),
+ 'sound_card_works' => gtext("does it work with free software?"),
+ 'driver' => gtext("free driver used"),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Views/Hardware/left.php b/h-source/Application/Views/Hardware/left.php
index 020719c..084838a 100644
--- a/h-source/Application/Views/Hardware/left.php
+++ b/h-source/Application/Views/Hardware/left.php
@@ -50,4 +50,8 @@
<img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/usb.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/threegcards/catalogue/<?php echo $lang;?>">3G cards</a>
</div>
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/audio-card.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/soundcards/catalogue/<?php echo $lang;?>">Sound cards</a>
+ </div>
+
</div> \ No newline at end of file
diff --git a/h-source/Application/Views/Soundcards/catalogue.php b/h-source/Application/Views/Soundcards/catalogue.php
new file mode 100644
index 0000000..61875c6
--- /dev/null
+++ b/h-source/Application/Views/Soundcards/catalogue.php
@@ -0,0 +1,82 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This file is part of h-source
+//
+// h-source is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// h-source is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with h-source. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo betterVendor($this->viewArgs['vendor'])?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sound_card_works']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No sound cards found");?>..
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/audio-card_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo betterVendor($item['hardware']['vendor']);?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo $item['hardware']['sound_card_works'];?></b></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Soundcards/form.php b/h-source/Application/Views/Soundcards/form.php
new file mode 100644
index 0000000..ca57502
--- /dev/null
+++ b/h-source/Application/Views/Soundcards/form.php
@@ -0,0 +1,106 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This file is part of h-source
+//
+// h-source is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// h-source is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with h-source. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Soundcards::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?></div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div>
+ <?php echo Html_Form::select('interface',$values['interface'],Soundcards::$interface,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php include(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . 'noscript_distributions.php');?>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label hidden_x_explorer"><?php echo gtext("does it work with free software?");?></div>
+ <?php echo Html_Form::select('sound_card_works',$values['sound_card_works'],Wifi::$wifiSelect,"select_entry hidden_x_explorer");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div>
+ <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Soundcards/page.php b/h-source/Application/Views/Soundcards/page.php
new file mode 100644
index 0000000..a0ec548
--- /dev/null
+++ b/h-source/Application/Views/Soundcards/page.php
@@ -0,0 +1,94 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This file is part of h-source
+//
+// h-source is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// h-source is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with h-source. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/audio-card_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo betterVendor($item[$tableName]['vendor']);?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['sound_card_works'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("free driver used");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['driver'];?></b></div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php
index 7807f09..bf3dd1b 100644
--- a/h-source/Config/Route.php
+++ b/h-source/Config/Route.php
@@ -110,6 +110,15 @@ class Route
'threegcards,climb',
'threegcards,talk',
'moderators,actions',
+ 'soundcards,catalogue',
+ 'soundcards,view',
+ 'soundcards,history',
+ 'soundcards,revision',
+ 'soundcards,insert',
+ 'soundcards,update',
+ 'soundcards,differences',
+ 'soundcards,climb',
+ 'soundcards,talk',
);
//it can be 'yes' or 'no'
diff --git a/h-source/Public/Img/H2O/audio-card.png b/h-source/Public/Img/H2O/audio-card.png
new file mode 100755
index 0000000..bf7445d
--- /dev/null
+++ b/h-source/Public/Img/H2O/audio-card.png
Binary files differ
diff --git a/h-source/Public/Img/H2O/audio-card_22.png b/h-source/Public/Img/H2O/audio-card_22.png
new file mode 100755
index 0000000..d5a7ad4
--- /dev/null
+++ b/h-source/Public/Img/H2O/audio-card_22.png
Binary files differ
diff --git a/h-source/tables.sql b/h-source/tables.sql
index 6ec4d72..8d38e81 100644
--- a/h-source/tables.sql
+++ b/h-source/tables.sql
@@ -94,7 +94,8 @@ create table hardware (
interface char(15) not null default 'not-specified',
bios char(15) not null default 'not-specified',
webcam_type varchar(100) CHARACTER SET utf8 not null,
- webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified'
+ webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
+ sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified'
)engine=innodb;
create table revisions (
@@ -122,6 +123,7 @@ create table revisions (
bios char(15) not null default 'not-specified',
webcam_type varchar(100) CHARACTER SET utf8 not null,
webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
+ sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified',
id_hard INT UNSIGNED NOT NULL
)engine=innodb;