You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(120) |
Jun
(74) |
Jul
(97) |
Aug
(35) |
Sep
(35) |
Oct
(34) |
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(18) |
Feb
(8) |
Mar
(7) |
Apr
(23) |
May
(28) |
Jun
(31) |
Jul
(27) |
Aug
(34) |
Sep
(48) |
Oct
(511) |
Nov
(197) |
Dec
(333) |
2005 |
Jan
(212) |
Feb
(33) |
Mar
(94) |
Apr
(51) |
May
(16) |
Jun
|
Jul
(200) |
Aug
(43) |
Sep
(88) |
Oct
(60) |
Nov
(62) |
Dec
(41) |
2006 |
Jan
(94) |
Feb
(49) |
Mar
(54) |
Apr
|
May
(39) |
Jun
(39) |
Jul
(61) |
Aug
(36) |
Sep
(23) |
Oct
(76) |
Nov
(73) |
Dec
(32) |
2007 |
Jan
|
Feb
(87) |
Mar
|
Apr
(8) |
May
(36) |
Jun
(49) |
Jul
(54) |
Aug
(8) |
Sep
(50) |
Oct
(36) |
Nov
|
Dec
(3) |
2008 |
Jan
(133) |
Feb
(54) |
Mar
(39) |
Apr
(2) |
May
(6) |
Jun
(74) |
Jul
(97) |
Aug
(70) |
Sep
(12) |
Oct
(20) |
Nov
(64) |
Dec
(24) |
2009 |
Jan
(25) |
Feb
(49) |
Mar
(18) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Verdon V. <ve...@us...> - 2009-03-04 14:48:20
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21558/boost Modified Files: boost.php Log Message: working on attributes Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/boost/boost.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** boost.php 5 Dec 2008 15:22:49 -0000 1.3 --- boost.php 4 Mar 2009 14:48:15 -0000 1.4 *************** *** 24,28 **** $proper_name = 'vShop'; ! $version = '0.7.0'; $register = false; $unregister = false; --- 24,28 ---- $proper_name = 'vShop'; ! $version = '0.7.1'; $register = false; $unregister = false; |
From: Verdon V. <ve...@us...> - 2009-03-04 14:42:42
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18882/class Modified Files: vShop.php vShop_Forms.php vShop_Item.php vShop_Runtime.php Added Files: vShop_Attribute.php Log Message: working on attributes Index: vShop_Runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop_Runtime.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** vShop_Runtime.php 25 Nov 2008 15:19:30 -0000 1.1.1.1 --- vShop_Runtime.php 4 Mar 2009 14:39:53 -0000 1.2 *************** *** 106,110 **** $item = new vShop_Item($result[0]['id']); $tpl['NAME'] = $item->viewLink(); ! $tpl['ADD'] = $item->addLink(true) . ' ' . $item->addLink(); if ($item->file_id) { $tpl['THUMBNAIL'] = $item->getThumbnail(true); --- 106,114 ---- $item = new vShop_Item($result[0]['id']); $tpl['NAME'] = $item->viewLink(); ! if ($item->getQtyAttributes() < 1) { ! $tpl['ADD'] = $item->addLink(true) . ' ' . $item->addLink(); ! } else { ! $tpl['ADD'] = sprintf('<a href="%s">', $item->viewLink(true)) . dgettext('vshop', 'Choose Options') . '</a>'; ! } if ($item->file_id) { $tpl['THUMBNAIL'] = $item->getThumbnail(true); Index: vShop_Item.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop_Item.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vShop_Item.php 2 Dec 2008 19:43:15 -0000 1.2 --- vShop_Item.php 4 Mar 2009 14:39:53 -0000 1.3 *************** *** 271,274 **** --- 271,397 ---- + public function getAllAttributes($limit=false) + { + PHPWS_Core::initModClass('vshop', 'vShop_Attribute.php'); + $db = new PHPWS_DB('vshop_attributes'); + $db->addOrder('set_id asc'); + $db->addWhere('item_id', $this->id); + if ($limit) { + $db->setLimit((int)$limit); + } + $result = $db->getObjects('vShop_Attribute'); + return $result; + } + + + public function getOptionSets($print=false,$form=true) + { + if ($this->getQtyAttributes() == 0) { + return null; + } + + $all_sets = null; + $choices = null; + $buttons = null; + $boxes = null; + $match = null; + + /* get the sets */ + $db = new PHPWS_DB('vshop_attributes'); + $db->addWhere('item_id', $this->id); + $db->addColumn('set_id', null, null, false, true); + $set_ids = $db->select(); + + foreach ($set_ids as $set) { + $db = new PHPWS_DB('vshop_option_sets'); + $db->addWhere('id', $set['set_id']); + $o_set = $db->select('row'); + + /* get the values */ + $db = new PHPWS_DB('vshop_attributes'); + $db->addWhere('item_id', $this->id); + $db->addWhere('set_id', $set['set_id']); + $value_ids = $db->select(); + + foreach ($value_ids as $value) { + $db = new PHPWS_DB('vshop_option_values'); + $db->addWhere('id', $value['value_id']); + $db->addOrder('sort asc'); + $s_values = $db->select('row'); + + if ($print) { // print + // not sure about print yet + } elseif ($form) { // form + $mods = null; + if ($value['price_mod'] > 0) { + if (PHPWS_Settings::get('vshop', 'curr_symbol_pos') == 1) { + $mods[] = $value['price_prefix'].PHPWS_Settings::get('vshop', 'currency_symbol').$value['price_mod']; + } else { + $mods[] = $value['price_prefix'].$value['price_mod'].PHPWS_Settings::get('vshop', 'currency_symbol'); + } + } + if ($value['weight_mod'] > 0) { + $mods[] = $value['weight_prefix'].$value['weight_mod'].PHPWS_Settings::get('vshop', 'weight_unit'); + } + if ($mods) { + $mods = '(' . implode(', ', $mods) . ')'; + } + if ($o_set['type'] == 1) { // list + $choices[$set['set_id']][$value['value_id']] = $s_values['title'].' '.$mods; + } elseif ($o_set['type'] == 2) { // buttons + $buttons .= PHPWS_Form::formRadio('options['.$set['set_id'].']', $value['value_id'], $match, null, $s_values['title'].' '.$mods) . "<br />\n"; + } elseif ($o_set['type'] == 3) { // checkboxes + $boxes .= PHPWS_Form::formCheckBox('options['.$set['set_id'].'][]', $value['value_id'], $match, null, $s_values['title'].' '.$mods) . "<br />\n"; + } + } else { // array + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['id'] = $s_values['id']; + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['title'] = $s_values['title']; + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['price_prefix'] = $value['price_prefix']; + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['price_mod'] = $value['price_mod']; + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['weight_prefix'] = $value['weight_prefix']; + $all_sets[$set['set_id']]['values']['value_'.$value['value_id']]['weight_mod'] = $value['weight_mod']; + } + } + + if ($print) { // print + // not sure about print yet + } elseif ($form) { // form + if (isset($_REQUEST[$set['set_id']])) { + $match = 'options['.$set['set_id'].']'; + } else { + $match =null; + } + if ($o_set['type'] == 1) { // list + $all_sets .= '<strong>' . $o_set['title'] . '</strong><br />'; + $all_sets .= PHPWS_Form::formSelect('options['.$set['set_id'].']', $choices[$set['set_id']]) . '<br /><br />'; + } elseif ($o_set['type'] == 2) { // buttons + $all_sets .= '<strong>' . $o_set['title'] . '</strong><br />'; + $all_sets .= $buttons . '<br />'; + } elseif ($o_set['type'] == 3) { // checkboxes + $all_sets .= '<strong>' . $o_set['title'] . '</strong><br />'; + $all_sets .= $boxes . '<br />'; + } + } else { // array + $all_sets[$set['set_id']]['id'] = $o_set['id']; + $all_sets[$set['set_id']]['type'] = $o_set['type']; + $all_sets[$set['set_id']]['title'] = $o_set['title']; + } + + } + + // print_r($all_sets); exit; + return $all_sets; + } + + + public function getQtyAttributes() + { + $db = new PHPWS_DB('vshop_attributes'); + $db->addWhere('item_id', $this->id); + $qty = $db->count(); + return $qty; + } + + public function view() { *************** *** 277,281 **** --- 400,410 ---- } + // PHPWS_Core::initModClass('vshop', 'vShop_Cart.php'); + // $cart = vShop_Cart::CreateInstance(); + // $cart_data = $cart->GetCart(); + // print_r($cart_data); + $key = new Key($this->key_id); + $options = $this->getQtyAttributes(); if (!$key->allowView()) { *************** *** 283,289 **** --- 412,431 ---- } + if ($options > 0) { + $form = new PHPWS_Form('vshop_addItem'); + $form->addHidden('module', 'vshop'); + $form->addHidden('uop', 'addto_cart'); + $form->addHidden('item', $this->id); + $form->addHidden('dept', $this->dept_id); + $form->addSubmit(dgettext('vshop', 'Add to cart')); + $tpl = $form->getTemplate(); + } + Layout::addPageTitle($this->getTitle()); $tpl['ITEM_LINKS'] = $this->links(); $tpl['TITLE'] = $this->getTitle(true); + if ($options > 0) { + $tpl['PRICE_NOTE'] = dgettext('vshop', 'From'); + } $tpl['PRICE'] = $this->getPrice(true); if (PHPWS_Settings::get('vshop', 'use_inventory')) { *************** *** 298,303 **** $tpl['FILE'] = $this->getFile(); ! $key->flag(); return PHPWS_Template::process($tpl, 'vshop', 'view_item.tpl'); } --- 440,448 ---- $tpl['FILE'] = $this->getFile(); ! if ($options > 0) { ! $tpl['OPTIONS'] = $this->getOptionSets(); ! } + $key->flag(); return PHPWS_Template::process($tpl, 'vshop', 'view_item.tpl'); } *************** *** 308,312 **** $links = array(); ! $links[] = $this->addLink(true) . ' ' . $this->addLink(); if (Current_User::allow('vshop', 'edit_items')) { $vars['dept_id'] = $this->dept_id; --- 453,461 ---- $links = array(); ! if ($this->getQtyAttributes() < 1) { ! $links[] = $this->addLink(true) . ' ' . $this->addLink(); ! } //else { ! // $links[] = sprintf('<a href="%s">', $this->viewLink(true)) . dgettext('vshop', 'Choose Options') . '</a>'; ! // } if (Current_User::allow('vshop', 'edit_items')) { $vars['dept_id'] = $this->dept_id; *************** *** 384,388 **** $links = array(); ! $links[] = $this->addLink(true) . ' ' . $this->addLink(); if (Current_User::allow('vshop', 'edit_items')) { --- 533,541 ---- $links = array(); ! if ($this->getQtyAttributes() < 1) { ! $links[] = $this->addLink(true) . ' ' . $this->addLink(); ! } else { ! $links[] = sprintf('<a href="%s">', $this->viewLink(true)) . dgettext('vshop', 'Choose Options') . '</a>'; ! } if (Current_User::allow('vshop', 'edit_items')) { Index: vShop.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** vShop.php 5 Dec 2008 15:22:52 -0000 1.5 --- vShop.php 4 Mar 2009 14:39:49 -0000 1.6 *************** *** 68,71 **** --- 68,76 ---- case 'post_option_value': case 'delete_option_value': + // case 'view_attribute': + // case 'new_attribute': + // case 'edit_attribute': + // case 'post_attribute': + // case 'delete_attribute': PHPWS_Core::initModClass('vshop', 'vShop_Forms.php'); *************** *** 158,162 **** } else { $this->forwardMessage(dgettext('vshop', 'Item saved successfully.')); ! PHPWS_Core::reroute('index.php?module=vshop&dept='.$this->item->dept_id); } } else { --- 163,168 ---- } else { $this->forwardMessage(dgettext('vshop', 'Item saved successfully.')); ! // old PHPWS_Core::reroute('index.php?module=vshop&dept='.$this->item->dept_id); ! PHPWS_Core::reroute('index.php?module=vshop&aop=menu&tab=list_items&dept='.$this->item->dept_id); // new from wendall } } else { *************** *** 315,318 **** --- 321,371 ---- + case 'view_attribute': + // $settingsPanel->setCurrentTab('option_values'); + $this->loadAttribute(); + $this->title = $this->attribute->getTitle(true); + $this->content = $this->attribute->view(); + break; + + case 'new_attribute': + case 'edit_attribute': + // $settingsPanel->setCurrentTab('option_values'); + if (!Current_User::authorized('vshop', 'edit_items')) { + Current_User::disallow(); + } + // $this->loadAttribute(); + $this->loadForm('edit_attribute'); + break; + + case 'post_attribute': + // $settingsPanel->setCurrentTab('option_values'); + if (!Current_User::authorized('vshop', 'edit_items')) { + Current_User::disallow(); + } + if ($this->postAttribute()) { + if (PHPWS_Error::logIfError($this->attribute->save())) { + $this->forwardMessage(dgettext('vshop', 'Error occurred when saving attribute.')); + PHPWS_Core::reroute('index.php?module=vshop&aop=menu&tab=option_values'); // CHECK !!! + } else { + $this->forwardMessage(dgettext('vshop', 'Attribute saved successfully.')); + PHPWS_Core::reroute('index.php?module=vshop&aop=menu&tab=option_values'); // CHECK !!! + } + } else { + $this->loadForm('edit_attribute'); + } + break; + + case 'delete_attribute': + // $settingsPanel->setCurrentTab('option_values'); + if (!Current_User::authorized('vshop', 'edit_items')) { + Current_User::disallow(); + } + $this->loadAttribute(); + $this->attribute->delete(); + $this->message = dgettext('vshop', 'Attribute deleted.'); + $this->loadForm('attributes'); // CHECK !!! + break; + + case 'post_settings': $settingsPanel->setCurrentTab('settings'); *************** *** 447,450 **** --- 500,508 ---- case 'post_option_value': case 'delete_option_value': + // case 'view_attribute': + // case 'new_attribute': + // case 'edit_attribute': + // case 'post_attribute': + // case 'delete_attribute': $settingsPanel->setContent($this->content); $this->content = $settingsPanel->display(); *************** *** 549,554 **** $new_qty = $qty_incart + $qty; } ! if (PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) { ! $cart->addItems($this->item->id, null, $qty); $this->forwardMessage(sprintf(dgettext('vshop', '%s successfully added to your cart.'), $this->item->getTitle(true))); } else { --- 607,629 ---- $new_qty = $qty_incart + $qty; } ! // old if (PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) { ! if ((PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) || (!PHPWS_Settings::get('vshop', 'use_inventory'))) { // fixed thanks wendall ! print_r($_REQUEST); exit; // TEMP ! /* need to test for options here and if there are, build data array for them */ ! if (isset($_REQUEST['options'])) { ! // $options = $_REQUEST['options']; ! PHPWS_Core::initModClass('vshop', 'vShop_Option_set.php'); ! PHPWS_Core::initModClass('vshop', 'vShop_Attribute.php'); ! /* loop through the options */ ! foreach ($_REQUEST['options'] as $o_set) { ! /* if the option is an array - checkboxes */ ! if (is_array($o_set)) { ! } else { ! } ! } ! } else { ! $options = null; ! } ! $cart->addItems($this->item->id, $options, $qty); $this->forwardMessage(sprintf(dgettext('vshop', '%s successfully added to your cart.'), $this->item->getTitle(true))); } else { *************** *** 843,846 **** --- 918,951 ---- + public function loadAttribute($id=0) + { + PHPWS_Core::initModClass('vshop', 'vShop_Attribute.php'); + + if ($id) { + $this->attribute = new vShop_Attribute($id); + } elseif (isset($_REQUEST['attribute_id'])) { + $this->attribute = new vShop_Attribute($_REQUEST['attribute_id']); + // } elseif (isset($_REQUEST['id'])) { + // $this->attribute = new vShop_Attribute($_REQUEST['id']); + } elseif (isset($_REQUEST['attribute'])) { + $this->attribute = new vShop_Attribute($_REQUEST['attribute']); + } else { + $this->attribute = new vShop_Attribute; + } + + if (empty($this->item)) { + if (isset($this->attribute->item_id)) { + $this->loadItem($this->attribute->item_id); + } elseif (isset($_REQUEST['item_id'])) { + $this->loadItem($_REQUEST['item_id']); + $this->attribute->item_id = $_REQUEST['item_id']; + } else { + $this->loadItem(); + $this->attribute->item_id = $this->item->id; + } + } + } + + public function loadOrder($id=0) { *************** *** 939,943 **** } ! if (!empty($_POST['price']) ) { $this->item->setPrice($_POST['price']); } --- 1044,1049 ---- } ! // old if (!empty($_POST['price'])) { ! if (is_numeric($_POST['price'])) { $this->item->setPrice($_POST['price']); } *************** *** 947,959 **** $this->item->setTaxable(0) ; ! if (!empty($_POST['stock']) ) { $this->item->setStock((int)$_POST['stock']); } ! if (!empty($_POST['weight']) ) { $this->item->setWeight($_POST['weight']); } ! if (!empty($_POST['shipping']) ) { $this->item->setShipping($_POST['shipping']); } --- 1053,1068 ---- $this->item->setTaxable(0) ; ! // old if (!empty($_POST['stock'])) { ! if (is_int($_POST['stock'])) { $this->item->setStock((int)$_POST['stock']); } ! // old if (!empty($_POST['weight'])) { ! if (is_numeric($_POST['weight'])) { $this->item->setWeight($_POST['weight']); } ! // old if (!empty($_POST['shipping'])) { ! if (is_numeric($_POST['shipping'])) { $this->item->setShipping($_POST['shipping']); } *************** *** 1056,1059 **** --- 1165,1206 ---- + public function postAttribute() + { + $this->loadAttribute(); + //print_r($_POST); exit; + + if (isset($_POST['set_id'])) { + $this->attribute->setSet_id($_POST['set_id']); + } else { + PHPWS_Core::initModClass('vshop', 'vShop_Option_value.php'); + $value = new vShop_Option_value($_POST['value_id']); + $this->attribute->setSet_id($value->set_id); + } + $this->attribute->setValue_id($_POST['value_id']); + $this->attribute->setItem_id($_POST['item_id']); + if (!empty($_POST['price_mod']) ) { + $this->attribute->setPrice_mod($_POST['price_mod']); + } else { + $this->attribute->setPrice_mod(0); + } + $this->attribute->setPrice_prefix($_POST['price_prefix']); + if (!empty($_POST['weight_mod']) ) { + $this->attribute->setWeight_mod($_POST['weight_mod']); + } else { + $this->attribute->setWeight_mod(0); + } + $this->attribute->setWeight_prefix($_POST['weight_prefix']); + + if (isset($errors)) { + $this->message = implode('<br />', $errors); + $this->loadForm('edit_attribute'); // CHECK !!! + return false; + } else { + return true; + } + + } + + public function postSettings() { *************** *** 1340,1348 **** } /* loop through the items in the cart */ foreach ($cart_data as $id=>$val) { ! $qty = $cart_data[$id]['count']; $item = new vShop_Item($id); $subtotal = $item->price * $qty; $item_tax = 0.00; --- 1487,1499 ---- } + //print_r($cart_data); exit; /* loop through the items in the cart */ foreach ($cart_data as $id=>$val) { ! print_r($cart_data[$id]['data']->_itemData); //exit; // TEMP $qty = $cart_data[$id]['count']; + // $opts = $cart_data[$id]['']; $item = new vShop_Item($id); + // if () { + // } $subtotal = $item->price * $qty; $item_tax = 0.00; *************** *** 1430,1434 **** } ! // print_r($order_array); exit; $this->order->order_array = $order_array; $this->order->order_date = mktime(); --- 1581,1585 ---- } ! print_r($order_array); exit; $this->order->order_array = $order_array; $this->order->order_date = mktime(); *************** *** 1527,1531 **** public function navLinks() { ! $links = null; if (!PHPWS_Settings::get('vshop', 'use_breadcrumb')) { if (vShop::countDepts() !== 1) { --- 1678,1683 ---- public function navLinks() { ! // $links = null; ! $links = array(); if (!PHPWS_Settings::get('vshop', 'use_breadcrumb')) { if (vShop::countDepts() !== 1) { --- NEW FILE: vShop_Attribute.php --- <?php /** * vshop - phpwebsite module * * See docs/AUTHORS and docs/COPYRIGHT for relevant info. * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @version $Id: vShop_Attribute.php,v 1.1 2009/03/04 14:39:52 verdonv Exp $ * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> */ class vShop_Attribute { public $id = 0; public $set_id = null; public $value_id = null; public $item_id = null; public $price_mod = 0; public $price_prefix = null; public $weight_mod = 0; public $weight_prefix = null; public $_error = null; public function __construct($id=0) { if (!$id) { return; } $this->id = (int)$id; $this->init(); } public function init() { $db = new PHPWS_DB('vshop_attributes'); $result = $db->loadObject($this); if (PEAR::isError($result)) { $this->_error = & $result; $this->id = 0; } elseif (!$result) { $this->id = 0; } } public function setSet_id($set_id) { $this->set_id = (int)$set_id; } public function setValue_id($value_id) { $this->value_id = (int)$value_id; } public function setItem_id($item_id) { $this->item_id = (int)$item_id; } public function setPrice_mod($price_mod) { $this->price_mod = $price_mod; } public function setPrice_prefix($price_prefix) { $this->price_prefix = $price_prefix; } public function setWeight_mod($weight_mod) { $this->weight_mod = $weight_mod; } public function setWeight_prefix($weight_prefix) { $this->weight_prefix = $weight_prefix; } public function getTitle($print=false) { if (empty($this->set_id) || empty($this->value_id)) { return null; } if ($print) { PHPWS_Core::initModClass('vshop', 'vShop_Option_set.php'); $set = new vShop_Option_set($this->set_id); PHPWS_Core::initModClass('vshop', 'vShop_Option_value.php'); $value = new vShop_Option_value($this->value_id); return $set->getTitle(true) . ' : ' . $value->getTitle(true); } else { return $this->set_id . ':' . $this->value_id; } } public function getSet($print=false) { if (empty($this->set_id)) { return null; } if ($print) { PHPWS_Core::initModClass('vshop', 'vShop_Option_set.php'); $set = new vShop_Option_set($this->set_id); return $set->getTitle(true); } else { return $this->set_id; } } public function getValue($print=false) { if (empty($this->value_id)) { return null; } if ($print) { PHPWS_Core::initModClass('vshop', 'vShop_Option_value.php'); $value = new vShop_Option_value($this->value_id); return $value->getTitle(true); } else { return $this->value_id; } } public function getPrice_mod($print=false) { if (empty($this->price_mod)) { return null; } if ($print) { if (PHPWS_Settings::get('vshop', 'curr_symbol_pos') == 1) { $price_mod = PHPWS_Settings::get('vshop', 'currency_symbol') . number_format($this->price_mod, 2, '.', ','); if (PHPWS_Settings::get('vshop', 'display_currency')) { $price_mod .= ' ' . PHPWS_Settings::get('vshop', 'currency'); } } else { $price_mod = number_format($this->price_mod, 2, '.', ',') . PHPWS_Settings::get('vshop', 'currency_symbol'); if (PHPWS_Settings::get('vshop', 'display_currency')) { $price_mod .= ' ' . PHPWS_Settings::get('vshop', 'currency'); } } return $price_mod; } else { return $this->price_mod; } } public function getWeight_mod($print=false) { if (empty($this->weight_mod)) { return null; } if ($print) { return $this->weight_mod . PHPWS_Settings::get('vshop', 'weight_unit'); } else { return $this->weight_mod; } } public function view() { if (!$this->id) { PHPWS_Core::errorPage(404); } $tpl['ATTRIBUTE_LINKS'] = $this->links(); $tpl['TITLE'] = $this->getTitle(true); return PHPWS_Template::process($tpl, 'vshop', 'view_attribute.tpl'); } public function links() { $links = array(); if (Current_User::allow('vshop', 'edit_items')) { $vars['attribute_id'] = $this->id; $vars['aop'] = 'edit_attribute'; $links[] = PHPWS_Text::secureLink(dgettext('vshop', 'Edit attribute'), 'vshop', $vars); } if($links) return implode(' | ', $links); } public function delete() { if (!$this->id) { return; } $db = new PHPWS_DB('vshop_attributes'); $db->addWhere('id', $this->id); PHPWS_Error::logIfError($db->delete()); } public function rowTag() { $vars['attribute_id'] = $this->id; $links = array(); if (Current_User::allow('vshop', 'edit_items')) { $vars['aop'] = 'edit_attribute'; $links[] = PHPWS_Text::secureLink(dgettext('vshop', 'Edit'), 'vshop', $vars); $vars['aop'] = 'delete_attribute'; $js['ADDRESS'] = PHPWS_Text::linkAddress('vshop', $vars, true); $js['QUESTION'] = sprintf(dgettext('vshop', 'Are you sure you want to delete the attribute %s?'), $this->getTitle()); $js['LINK'] = dgettext('vshop', 'Delete'); $links[] = javascript('confirm', $js); } $tpl['TITLE'] = $this->viewLink(); if($links) $tpl['ACTION'] = implode(' | ', $links); return $tpl; } public function viewTpl() { $vars['attribute_id'] = $this->id; $links = array(); if (Current_User::allow('vshop', 'edit_items')) { $vars['aop'] = 'edit_attribute'; $links[] = PHPWS_Text::secureLink(dgettext('vshop', 'Edit'), 'vshop', $vars); } if (Current_User::allow('vshop', 'edit_items')) { $vars['aop'] = 'delete_attribute'; $js['ADDRESS'] = PHPWS_Text::linkAddress('vshop', $vars, true); $js['QUESTION'] = sprintf(dgettext('vshop', 'Are you sure you want to delete the attribute %s?'), $this->getTitle(true)); $js['LINK'] = dgettext('vshop', 'Delete'); $links[] = javascript('confirm', $js); } // $tpl['ATTRIBUTE_TITLE'] = $this->getTitle(true); $tpl['ATTRIBUTE_SET'] = $this->getSet(true); $tpl['ATTRIBUTE_VALUE'] = $this->getValue(true); $tpl['ATTRIBUTE_PRICE_PREFIX'] = $this->price_prefix; $tpl['ATTRIBUTE_PRICE_MOD'] = $this->getPrice_mod(true); $tpl['ATTRIBUTE_WEIGHT_PREFIX'] = $this->weight_prefix; $tpl['ATTRIBUTE_WEIGHT_MOD'] = $this->getWeight_mod(true); if($links) $tpl['ATTRIBUTE_LINKS'] = implode(' | ', $links); return $tpl; } public function save() { $db = new PHPWS_DB('vshop_attributes'); $result = $db->saveObject($this); if (PEAR::isError($result)) { return $result; } } public function viewLink() { $vars['aop'] = 'view_attribute'; $vars['attribute'] = $this->id; return PHPWS_Text::moduleLink(dgettext('vshop', $this->title), 'vshop', $vars); } } ?> Index: vShop_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop_Forms.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** vShop_Forms.php 5 Dec 2008 15:22:52 -0000 1.5 --- vShop_Forms.php 4 Mar 2009 14:39:53 -0000 1.6 *************** *** 103,106 **** --- 103,114 ---- break; + case 'new_attribute': + case 'edit_attribute': + if (empty($this->vshop->attribute)) { + $this->vshop->loadAttribute(); + } + $this->editAttribute(); + break; + case 'edit_order': if (empty($this->vshop->order)) { *************** *** 534,541 **** --- 542,585 ---- + $tpl['ATTRIBUTES_LABEL'] = dgettext('vshop', 'Item options'); + if ($this->getQtyValues() > 0) { + $tpl['ADD_ATTRIBUTE_LINK'] = PHPWS_Text::secureLink(dgettext('vshop', 'Add Attribute'), 'vshop', array('aop'=>'new_attribute', 'item_id'=>$item->id)); + } else { + $tpl['ADD_ATTRIBUTE_LINK'] = dgettext('vshop', 'Sorry, but you must define option sets and values before you may add an attribute to an item.'); + } + + $attributes = $item->getAllAttributes(); + if (PHPWS_Error::logIfError($attributes)) { + $this->vshop->content = dgettext('vshop', 'An error occurred when accessing this items\'s attributes.'); + return; + } + + if ($attributes) { + $tpl['ATTRIBUTE_SET_LABEL'] = dgettext('vshop', 'Set'); + $tpl['ATTRIBUTE_VALUE_LABEL'] = dgettext('vshop', 'Value'); + $tpl['ATTRIBUTE_PRICE_LABEL'] = dgettext('vshop', 'Price mod'); + $tpl['ATTRIBUTE_WEIGHT_LABEL'] = dgettext('vshop', 'Weight mod'); + foreach ($attributes as $attribute) { + $tpl['attributes'][] = $attribute->viewTpl(); + } + } else { + $tpl['NONE'] = dgettext('vshop', 'This item has no options'); + } + + + + $this->vshop->content = PHPWS_Template::process($tpl, 'vshop', 'edit_item.tpl'); } + public function getQtyValues() + { + $db = new PHPWS_DB('vshop_option_values'); + $qty = $db->count(); + return $qty; + } + + public function editTax() { *************** *** 660,663 **** --- 704,778 ---- + public function editAttribute() + { + $form = new PHPWS_Form; + $attribute = & $this->vshop->attribute; + $item = & $this->vshop->item; + //print_r($item); exit; + + $form->addHidden('module', 'vshop'); + $form->addHidden('aop', 'post_attribute'); + if ($attribute->id) { + $this->vshop->title = dgettext('vshop', 'Update attribute'); + $form->addHidden('attribute_id', $attribute->id); + $form->addHidden('set_id', $attribute->set_id); + $form->addSubmit(dgettext('vshop', 'Update')); + } else { + $this->vshop->title = dgettext('vshop', 'Add new attribute'); + $form->addSubmit(dgettext('vshop', 'Add')); + } + $form->addHidden('item_id', $item->id); + + PHPWS_Core::initModClass('vshop', 'vShop_Option_value.php'); + $db = new PHPWS_DB('vshop_option_values'); + $db->addColumn('id'); + $db->addColumn('set_id'); + $db->addColumn('title'); + $db->addColumn('vshop_option_sets.title', null, 'setname'); + $db->addOrder('vshop_option_sets.title asc'); + $db->addOrder('sort asc'); + $db->addOrder('title asc'); + $db->addWhere('vshop_option_sets.id', 'vshop_option_values.set_id'); + // $db->setTestMode(); + $result = $db->select(); + if ($result) { + foreach ($result as $value) { + $name = $value['setname'] . ' : ' . $value['title']; + $choices[$value['id']] = PHPWS_Text::parseOutput($name); + } + $form->addSelect('value_id', $choices); + $form->setLabel('value_id', dgettext('vshop', 'Option value')); + $form->setMatch('value_id', $attribute->value_id); + } + + $choices = array('+'=>'+','-'=>'-'); + $form->addSelect('price_prefix', $choices); + $form->setLabel('price_prefix', dgettext('vshop', 'Price prefix')); + $form->setMatch('price_prefix', $attribute->price_prefix); + + $form->addText('price_mod', $attribute->price_mod); + $form->setSize('price_mod', 10); + $form->setMaxSize('price_mod', 20); + // $form->setRequired('price_mod'); + $form->setLabel('price_mod', dgettext('vshop', 'Price modifier (x.xx)')); + + $choices = array('+'=>'+','-'=>'-'); + $form->addSelect('weight_prefix', $choices); + $form->setLabel('weight_prefix', dgettext('vshop', 'Weight prefix')); + $form->setMatch('weight_prefix', $attribute->weight_prefix); + + $form->addText('weight_mod', $attribute->weight_mod); + $form->setSize('weight_mod', 5); + $form->setMaxSize('weight_mod', 5); + // $form->setRequired('weight_mod'); + $form->setLabel('weight_mod', sprintf(dgettext('vshop', 'Weight modifier (%s)'), PHPWS_Settings::get('vshop', 'weight_unit'))); + + $tpl = $form->getTemplate(); + $tpl['INFO_LABEL'] = dgettext('vshop', 'Attribute details'); + + $this->vshop->content = PHPWS_Template::process($tpl, 'vshop', 'edit_attribute.tpl'); + } + + public function editOrder() { |
From: Verdon V. <ve...@us...> - 2009-03-04 14:42:41
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18882/docs Modified Files: CHANGELOG TODO Log Message: working on attributes Index: TODO =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/docs/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 5 Dec 2008 15:22:52 -0000 1.2 --- TODO 4 Mar 2009 14:42:24 -0000 1.3 *************** *** 25,27 **** improve thanks screen after succesful checkout process ! CLEAN UP ORPHANS WHEN DELETING OPTION SETS, VALUES, ITEMS, ??? \ No newline at end of file --- 25,29 ---- improve thanks screen after succesful checkout process ! CLEAN UP ORPHANS WHEN DELETING OPTION SETS, VALUES, ITEMS, ??? ! ! WHAT TO DO ABOUT ADDING MULTIPLE ITEMS TO CART WITH DIFFERENT OPTIONS? \ No newline at end of file Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/docs/CHANGELOG,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CHANGELOG 5 Dec 2008 15:22:52 -0000 1.5 --- CHANGELOG 4 Mar 2009 14:42:24 -0000 1.6 *************** *** 1,6 **** ! Version 0.7.0 -- Dec 2008 ------------------------------------------------------------------ + added support for product attributes Version 0.6.0 -- Dec 2008 ------------------------------------------------------------------ --- 1,12 ---- ! Version 0.7.0 -- Dec 2008 - Feb 2009 ------------------------------------------------------------------ + added support for product attributes + + when saving an item, succes now returns with admin menu (thanks wendall) + + fixed setting links var in navLinks function (thanks wendall) + + fixed bug preventing add to cart when inventory was not being used + and qty in stock is 0 (thanks wendall) + + improved some error checking in post item function (thanks wendall) + Version 0.6.0 -- Dec 2008 ------------------------------------------------------------------ |
From: Verdon V. <ve...@us...> - 2009-03-04 14:42:35
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18882/templates Modified Files: edit_item.tpl view_item.tpl Added Files: edit_attribute.tpl Log Message: working on attributes Index: view_item.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/templates/view_item.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** view_item.tpl 25 Nov 2008 15:19:31 -0000 1.1.1.1 --- view_item.tpl 4 Mar 2009 14:42:25 -0000 1.2 *************** *** 3,7 **** <strong>{TITLE}</strong> <!-- BEGIN file --><div style="float: right; margin: 0 0 .2em .5em;">{FILE}</div><!-- END file --> ! <!-- BEGIN price -->{PRICE}<br /><!-- END price --> <!-- BEGIN stock -->{STOCK}<br /><!-- END stock --> <!-- BEGIN weight -->{WEIGHT}<br /><!-- END weight --> --- 3,7 ---- <strong>{TITLE}</strong> <!-- BEGIN file --><div style="float: right; margin: 0 0 .2em .5em;">{FILE}</div><!-- END file --> ! <!-- BEGIN price -->{PRICE_NOTE} {PRICE}<br /><!-- END price --> <!-- BEGIN stock -->{STOCK}<br /><!-- END stock --> <!-- BEGIN weight -->{WEIGHT}<br /><!-- END weight --> *************** *** 9,11 **** --- 9,12 ---- <!-- BEGIN description --><p>{DESCRIPTION}</p><!-- END description --> <br style="clear: right;" /> + <!-- BEGIN options -->{START_FORM}{OPTIONS}{SUBMIT}{END_FORM}<!-- END options --> </div> Index: edit_item.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/templates/edit_item.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_item.tpl 2 Dec 2008 19:43:16 -0000 1.2 --- edit_item.tpl 4 Mar 2009 14:42:25 -0000 1.3 *************** *** 14,17 **** --- 14,42 ---- </p> </fieldset> + <fieldset> + <legend><strong>{ATTRIBUTES_LABEL}</strong></legend> + <div align="right">{ADD_ATTRIBUTE_LINK}</div> + <table width="99%" cellpadding="4"> + <tr> + <th>{ATTRIBUTE_SET_LABEL}</th> + <th>{ATTRIBUTE_VALUE_LABEL}</th> + <th colspan="2">{ATTRIBUTE_PRICE_LABEL}</th> + <th colspan="2">{ATTRIBUTE_WEIGHT_LABEL}</th> + <th> </th> + </tr> + <!-- BEGIN attributes --> + <tr {TOGGLE}> + <td>{ATTRIBUTE_SET}</td> + <td>{ATTRIBUTE_VALUE}</td> + <td>{ATTRIBUTE_PRICE_PREFIX}</td> + <td>{ATTRIBUTE_PRICE_MOD}</td> + <td>{ATTRIBUTE_WEIGHT_PREFIX}</td> + <td>{ATTRIBUTE_WEIGHT_MOD}</td> + <td>{ATTRIBUTE_LINKS}</td> + </tr> + <!-- END attributes --> + </table> + <!-- BEGIN none --><p>{NONE}</p><!-- END none --> + </fieldset> {SUBMIT} {END_FORM} --- NEW FILE: edit_attribute.tpl --- {START_FORM} <fieldset> <legend><strong>{INFO_LABEL}</strong></legend> <p>{VALUE_ID} <strong>{VALUE_ID_LABEL}</strong></p> <p>{PRICE_PREFIX} {PRICE_MOD} {PRICE_MOD_LABEL}</p> <p>{WEIGHT_PREFIX} {WEIGHT_MOD} {WEIGHT_MOD_LABEL}</p> </fieldset> {SUBMIT} {END_FORM} |
From: Verdon V. <ve...@us...> - 2009-03-03 15:21:26
|
Update of /cvsroot/phpwebsite-comm/modules/elections/locale/en_US/LC_MESSAGES In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7353/locale/en_US/LC_MESSAGES Modified Files: elections.po Log Message: final tweaks for 2.0.1 Index: elections.po =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/locale/en_US/LC_MESSAGES/elections.po,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** elections.po 19 Feb 2009 21:39:05 -0000 1.1 --- elections.po 3 Mar 2009 15:21:15 -0000 1.2 *************** *** 25,29 **** "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2009-02-19 13:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" --- 25,29 ---- "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2009-03-03 10:19-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" *************** *** 349,353 **** msgstr "" ! msgid "Public voting is not allowed for this election" msgstr "" --- 349,353 ---- msgstr "" ! msgid "Public voting is not allowed for this ballot. You must log in first." msgstr "" *************** *** 450,457 **** msgstr "" ! msgid "Voting has closed for this election" msgstr "" ! msgid "Voting has not opened yet for this election" msgstr "" --- 450,457 ---- msgstr "" ! msgid "Voting has closed for this ballot." msgstr "" ! msgid "Voting has not opened yet for this ballot." msgstr "" *************** *** 468,475 **** msgstr "" ! msgid "You are not a member of an authorized voting group for this election" msgstr "" ! msgid "You have already voted in this election" msgstr "" --- 468,475 ---- msgstr "" ! msgid "You are not a member of an authorized voting group for this ballot." msgstr "" ! msgid "You have already voted in this ballot." msgstr "" |
From: Verdon V. <ve...@us...> - 2009-03-03 15:18:41
|
Update of /cvsroot/phpwebsite-comm/modules/elections/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6393/templates Modified Files: view_ballot.tpl Log Message: final tweaks for 2.0.1 Index: view_ballot.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/templates/view_ballot.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** view_ballot.tpl 2 Mar 2009 19:59:11 -0000 1.2 --- view_ballot.tpl 3 Mar 2009 15:18:26 -0000 1.3 *************** *** 22,26 **** </div> <!-- END candidates --> ! <div align="right">{VOTE_BUTTON}</div> <!-- BEGIN opening --><b>{OPENING_TEXT}:</b> {OPENING}<br /><!-- END opening --> <!-- BEGIN closing --><b>{CLOSING_TEXT}:</b> {CLOSING}<br /><!-- END closing --> --- 22,26 ---- </div> <!-- END candidates --> ! <div align="right"><!-- BEGIN vote_button -->{VOTE_BUTTON}<!-- END vote_button --><!-- BEGIN submit -->{SUBMIT}<!-- END submit --></div> <!-- BEGIN opening --><b>{OPENING_TEXT}:</b> {OPENING}<br /><!-- END opening --> <!-- BEGIN closing --><b>{CLOSING_TEXT}:</b> {CLOSING}<br /><!-- END closing --> |
From: Verdon V. <ve...@us...> - 2009-03-03 15:18:37
|
Update of /cvsroot/phpwebsite-comm/modules/elections/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6393/docs Modified Files: ChangeLog TODO Log Message: final tweaks for 2.0.1 Index: TODO =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/docs/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TODO 19 Feb 2009 21:30:10 -0000 1.1 --- TODO 3 Mar 2009 15:18:26 -0000 1.2 *************** *** 1,8 **** ! what about deleting related pics from FC when deleting candidate? ! ! think about if I should be checking canvote for each candidate or if I should just once for the ballot ! i.e. will I ever need to know at a candidate level when not looking at a ballot ! ! further test ALL can vote case tests think about including custom fields in results export, is it possible, is it needed --- 1,3 ---- ! what about deleting related pics from FC when deleting candidate, should I think about including custom fields in results export, is it possible, is it needed *************** *** 10,13 **** messages not returning when purging logs ! do js tests around js calls and provide non-js options ! (in view/post ballot) --- 5,7 ---- messages not returning when purging logs ! should I use keys with candidates, currently I am not Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/docs/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ChangeLog 2 Mar 2009 19:59:11 -0000 1.10 --- ChangeLog 3 Mar 2009 15:18:26 -0000 1.11 *************** *** 8,11 **** + Fixed saving image/file with candidate and ballot + Added image/file to views for ballots and candidates ! --- 8,15 ---- + Fixed saving image/file with candidate and ballot + Added image/file to views for ballots and candidates ! + Some tweaks to language ! + Added javascriptEnabled() checks around js checking in cast ! ballot form and provided non-js alternatives ! + Some optimizing of code ! + Some code tidy up |
From: Verdon V. <ve...@us...> - 2009-03-03 15:18:37
|
Update of /cvsroot/phpwebsite-comm/modules/elections/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6393/class Modified Files: ELEC_Ballot.php ELEC_Candidate.php ELEC_Forms.php Election.php Log Message: final tweaks for 2.0.1 Index: ELEC_Candidate.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Candidate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ELEC_Candidate.php 2 Mar 2009 19:59:11 -0000 1.2 --- ELEC_Candidate.php 3 Mar 2009 15:18:26 -0000 1.3 *************** *** 360,364 **** ! public function viewTpl() { $tpl = $this->getCustoms(); --- 360,364 ---- ! public function viewTpl($votebox=false) { $tpl = $this->getCustoms(); *************** *** 371,375 **** $tpl['CANDIDATE_THUMBNAIL'] = null; } ! $tpl['VOTE_BOX'] = $this->getVoteBox(); return $tpl; --- 371,377 ---- $tpl['CANDIDATE_THUMBNAIL'] = null; } ! if ($votebox) { ! $tpl['VOTE_BOX'] = $this->getVoteBox(); ! } return $tpl; *************** *** 377,392 **** - /* not used - public function viewTplVote() - { - $tpl['CANDIDATE_TITLE'] = $this->viewLink(); - $tpl['DESCRIPTION'] = $this->getDescription(true); - $tpl['LINKS'] = $this->candidateLinks(); - $tpl['VOTE_BOX'] = $this->getVoteBox(); - - return $tpl; - } - */ - public function save() { --- 379,382 ---- *************** *** 461,465 **** PHPWS_Core::initModClass('elections', 'ELEC_Ballot.php'); $ballot = new Elections_Ballot($this->ballot_id); - // echo $ballot->can_vote(); if (isset($_REQUEST['Candidate_Vote'][$this->id])) { $match = $_REQUEST['Candidate_Vote'][$this->id]; --- 451,454 ---- *************** *** 467,481 **** $match = null; } ! if ($ballot->can_vote() == '1') { ! if ($ballot->ranking) { ! $tpl = null; $tpl .= '<input type="button" name="-" onclick=\'javascript: subtractQty("Candidate_Vote['.$this->id.']");\' value="-" />'; ! $tpl .= '<input type="text" name="Candidate_Vote['.$this->id.']" id="Candidate_Vote['.$this->id.']" size="3" value="'.$match.'" />'; $tpl .= '<input type="button" name="+" onclick=\'javascript: document.getElementById("Candidate_Vote['.$this->id.']").value++;\' value="+" />'; - } else { - $tpl = PHPWS_Form::formCheckBox("Candidate_Vote[".$this->id."]", 1, $match, $this->id); } } else { ! $tpl = null; } --- 456,471 ---- $match = null; } ! ! if ($ballot->ranking) { ! $tpl = null; ! if (javascriptEnabled()) { $tpl .= '<input type="button" name="-" onclick=\'javascript: subtractQty("Candidate_Vote['.$this->id.']");\' value="-" />'; ! } ! $tpl .= '<input type="text" name="Candidate_Vote['.$this->id.']" id="Candidate_Vote['.$this->id.']" size="3" value="'.$match.'" />'; ! if (javascriptEnabled()) { $tpl .= '<input type="button" name="+" onclick=\'javascript: document.getElementById("Candidate_Vote['.$this->id.']").value++;\' value="+" />'; } } else { ! $tpl = PHPWS_Form::formCheckBox("Candidate_Vote[".$this->id."]", 1, $match, $this->id); } Index: ELEC_Ballot.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Ballot.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ELEC_Ballot.php 2 Mar 2009 19:59:11 -0000 1.2 --- ELEC_Ballot.php 3 Mar 2009 15:18:26 -0000 1.3 *************** *** 291,298 **** } ! if ($this->can_vote() == '1') { ! javascript('modules/elections/utilities'); ! // javascript('modules/elections/checkvotes'); $form = new PHPWS_Form('elections_vote'); --- 291,301 ---- } + $voteable = $this->can_vote(); ! if ($voteable == '1') { ! if (javascriptEnabled()) { ! javascript('modules/elections/utilities'); ! // javascript('modules/elections/checkvotes'); ! } $form = new PHPWS_Form('elections_vote'); *************** *** 300,304 **** $form->addHidden('uop', 'post_vote'); $form->addHidden('ballot_id', $this->id); ! // $form->addSubmit(dgettext('elections', 'Vote')); $tpl = $form->getTemplate(); --- 303,309 ---- $form->addHidden('uop', 'post_vote'); $form->addHidden('ballot_id', $this->id); ! if (!javascriptEnabled()) { ! $form->addSubmit(dgettext('elections', 'Vote')); ! } $tpl = $form->getTemplate(); *************** *** 308,313 **** $type = 'check'; } ! $submit_vars = array("MIN"=>$this->minchoice, 'MAX'=>$this->maxchoice, 'SUBMIT_LABEL'=>dgettext('elections', 'Vote'), 'TYPE'=>$type); ! $tpl['VOTE_BUTTON'] = javascript('modules/elections/checkvotes', $submit_vars); $tpl['MSG'] = '<b>' . dgettext('elections', 'Voting is open for this election.') . '</b>'; if ($this->maxchoice > 1) { --- 313,320 ---- $type = 'check'; } ! if (javascriptEnabled()) { ! $submit_vars = array("MIN"=>$this->minchoice, 'MAX'=>$this->maxchoice, 'SUBMIT_LABEL'=>dgettext('elections', 'Vote'), 'TYPE'=>$type); ! $tpl['VOTE_BUTTON'] = javascript('modules/elections/checkvotes', $submit_vars); ! } $tpl['MSG'] = '<b>' . dgettext('elections', 'Voting is open for this election.') . '</b>'; if ($this->maxchoice > 1) { *************** *** 317,321 **** } } else { ! $tpl['MSG'] = '<b>' . $this->can_vote() . '</b>'; } --- 324,328 ---- } } else { ! $tpl['MSG'] = '<b>' . $voteable . '</b>'; } *************** *** 394,402 **** if ($candidates) { foreach ($candidates as $candidate) { ! // if ($this->can_vote()) { ! // $tpl['candidates'][] = $candidate->viewTplVote(); ! // } else { $tpl['candidates'][] = $candidate->viewTpl(); ! // } } } else { --- 401,409 ---- if ($candidates) { foreach ($candidates as $candidate) { ! if ($voteable == '1') { ! $tpl['candidates'][] = $candidate->viewTpl(true); ! } else { $tpl['candidates'][] = $candidate->viewTpl(); ! } } } else { *************** *** 608,612 **** function can_vote() { - // old $now = date("Y-m-d H:i:s"); $now = mktime(); $msg = NULL; --- 615,618 ---- *************** *** 621,638 **** $msg = '1'; /* if it's not are they logged in */ - // } elseif (isset(Current_User::getId())) { } elseif (isset($_SESSION['User']->username)) { /* is there a group restriction */ if (isset($this->votegroups)){ $votegroups = explode(":", $this->votegroups); - // $votegroups_array = array_intersect($votegroups, $this->listGroupsID()); $votegroups_array = array_intersect($votegroups, $_SESSION['User']->_groups); // test print_r($votegroups_array); exit; /* if they're in the group */ - // old if(count($votegroups_array) > 0 or $_SESSION['OBJ_user']->isDeity()) { if(count($votegroups_array) > 0 or Current_User::isUnrestricted('elections')) { $msg = '1'; } else { ! $msg = dgettext('elections', 'You are not a member of an authorized voting group for this election'); } /* no group restriction */ --- 627,641 ---- $msg = '1'; /* if it's not are they logged in */ } elseif (isset($_SESSION['User']->username)) { /* is there a group restriction */ if (isset($this->votegroups)){ $votegroups = explode(":", $this->votegroups); $votegroups_array = array_intersect($votegroups, $_SESSION['User']->_groups); // test print_r($votegroups_array); exit; /* if they're in the group */ if(count($votegroups_array) > 0 or Current_User::isUnrestricted('elections')) { $msg = '1'; } else { ! $msg = dgettext('elections', 'You are not a member of an authorized voting group for this ballot.'); } /* no group restriction */ *************** *** 642,658 **** /* no public and not logged in */ } else { ! $msg = dgettext('elections', 'Public voting is not allowed for this election'); } /* they've already voted */ } else { ! $msg = dgettext('elections', 'You have already voted in this election'); } /* voting is closed */ } else { ! $msg = dgettext('elections', 'Voting has closed for this election'); } /* voting isn't open yet */ } else { ! $msg = dgettext('elections', 'Voting has not opened yet for this election'); } --- 645,661 ---- /* no public and not logged in */ } else { ! $msg = dgettext('elections', 'Public voting is not allowed for this ballot. You must log in first.'); } /* they've already voted */ } else { ! $msg = dgettext('elections', 'You have already voted in this ballot.'); } /* voting is closed */ } else { ! $msg = dgettext('elections', 'Voting has closed for this ballot.'); } /* voting isn't open yet */ } else { ! $msg = dgettext('elections', 'Voting has not opened yet for this ballot.'); } *************** *** 686,708 **** - /* not used, old example - function listGroupsID() - { - if (!(list($row) = $GLOBALS["core"]->sqlSelect("mod_users", "user_id", $_SESSION["OBJ_user"]->user_id))) - exit("Error listGroups: Unable to load user"); - - $groups = $row["groups"]; - - if ($groups) { - $groupList = explode(":", $groups); - } else { - $groupList = array(); - } - return $groupList; - } - */ - - - --- 689,692 ---- Index: ELEC_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Forms.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ELEC_Forms.php 2 Mar 2009 19:59:11 -0000 1.2 --- ELEC_Forms.php 3 Mar 2009 15:18:26 -0000 1.3 *************** *** 131,137 **** $pager = new DBPager('elections_candidates', 'Elections_Candidate'); $pager->setModule('elections'); ! if (!Current_User::isUnrestricted('elections')) { ! // $pager->addWhere('active', 1); ! } if ($ballot_id > 0) { $pager->addWhere('ballot_id', $ballot_id); --- 131,135 ---- $pager = new DBPager('elections_candidates', 'Elections_Candidate'); $pager->setModule('elections'); ! if ($ballot_id > 0) { $pager->addWhere('ballot_id', $ballot_id); *************** *** 315,319 **** $candidate = & $this->election->candidate; $ballot = & $this->election->ballot; ! //print_r($candidate); print_r($ballot); $form->addHidden('module', 'elections'); $form->addHidden('aop', 'post_candidate'); --- 313,317 ---- $candidate = & $this->election->candidate; $ballot = & $this->election->ballot; ! $form->addHidden('module', 'elections'); $form->addHidden('aop', 'post_candidate'); *************** *** 496,504 **** $form->addHidden('aop', 'edit_candidate'); - // PHPWS_Core::initModClass('elections', 'ELEC_Ballot.php'); - // $db = new PHPWS_DB('elections_ballots'); - // $db->addColumn('id'); - // $db->addColumn('title'); - // $result = $db->getObjects('Elections_Ballot'); $result = $this->getAllBallots(); --- 494,497 ---- *************** *** 641,651 **** $text = dgettext('elections', 'Purge voting log'); $extra = true; - // $js['QUESTION'] = 'Are you sure you want to delete these records?'; - // $js['ADDRESS'] = PHPWS_Text::linkAddress('elections', array('aop'=>'get_report', 'purge_votes'=>1), true); - // $js['LINK'] = 'Purge voting log'; - // $js['TITLE'] = 'Purge voting log'; - // $js['CLASS'] = 'confirm-link'; - // $js['type'] = 'button'; - // return Layout::getJavascript('confirm', $js); } else { $text = dgettext('elections', 'Submit'); --- 634,637 ---- *************** *** 655,659 **** if ($extra) { $question = dgettext('elections', 'Are you sure you wish to purge the selected logs'); - // $form->setExtra($type, 'onclick="confirmAction(\'' . $question . '\', this.form)"'); this.value='Saving...'; return performPrePostChecks(); $form->setExtra($type, 'onclick="this.value=\'' . $text . '\'; return confirmAction(\'' . $question . '\', this.form)"'); } --- 641,644 ---- Index: Election.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/Election.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Election.php 2 Mar 2009 19:59:11 -0000 1.8 --- Election.php 3 Mar 2009 15:18:26 -0000 1.9 *************** *** 482,488 **** public function postCandidate() { - //print_r($_POST); exit; $this->loadCandidate(); - //print_r($this->candidate); exit; if (empty($_POST['title'])) { --- 482,486 ---- |
From: Verdon V. <ve...@us...> - 2009-03-03 15:18:37
|
Update of /cvsroot/phpwebsite-comm/modules/elections/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6393/boost Modified Files: update.php Log Message: final tweaks for 2.0.1 Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/boost/update.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** update.php 2 Mar 2009 19:59:08 -0000 1.6 --- update.php 3 Mar 2009 15:18:23 -0000 1.7 *************** *** 43,46 **** --- 43,51 ---- + Fixed saving image/file with candidate and ballot + Added image/file to views for ballots and candidates + + Some tweaks to language + + Added javascriptEnabled() checks around js checking in cast + ballot form and provided non-js alternatives + + Some optimizing of code + + Some code tidy up </pre>'; |
From: Verdon V. <ve...@us...> - 2009-03-02 19:59:31
|
Update of /cvsroot/phpwebsite-comm/modules/elections/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10916/templates Modified Files: list_ballots.tpl view_ballot.tpl view_candidate.tpl Log Message: preparing 2.0.1 Index: view_candidate.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/templates/view_candidate.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** view_candidate.tpl 19 Feb 2009 20:32:02 -0000 1.2 --- view_candidate.tpl 2 Mar 2009 19:59:11 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- <div align="right"{CANDIDATE_LINKS}</div> <strong>{TITLE}</strong> + <!-- BEGIN file --><div style="float: right; margin: 0 0 .2em .5em;">{FILE}</div><!-- END file --> <!-- BEGIN description --><p>{DESCRIPTION}</p><!-- END description --> <!-- BEGIN custom1 --><div><strong>{CUSTOM1_LABEL}:</strong> {CUSTOM1}</div><!-- END custom1 --> Index: list_ballots.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/templates/list_ballots.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** list_ballots.tpl 19 Feb 2009 21:30:11 -0000 1.1 --- list_ballots.tpl 2 Mar 2009 19:59:11 -0000 1.2 *************** *** 18,22 **** </tr> <tr {TOGGLE}> ! <td colspan="6" class="smaller">{DESCRIPTION}</td> </tr> <!-- END listrows --> --- 18,22 ---- </tr> <tr {TOGGLE}> ! <td colspan="6" class="smaller"><!-- BEGIN thumbnail --><div style="float: left; margin: 0 .5em .2em 0;">{THUMBNAIL}</div><!-- END thumbnail -->{DESCRIPTION}</td> </tr> <!-- END listrows --> Index: view_ballot.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/templates/view_ballot.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** view_ballot.tpl 19 Feb 2009 20:35:36 -0000 1.1 --- view_ballot.tpl 2 Mar 2009 19:59:11 -0000 1.2 *************** *** 2,10 **** --- 2,13 ---- <div align="right">{BALLOT_LINKS}</div> <strong>{TITLE}</strong> + <!-- BEGIN file --><div style="float: right; margin: 0 0 .2em .5em;">{FILE}</div><!-- END file --> <!-- BEGIN description --><p>{DESCRIPTION}</p><!-- END description --> + <br style="clear: both;" /> <!-- BEGIN msg --><p>{MSG}</p><!-- END msg --> <!-- BEGIN candidates --> <div class="elections-candidate"> <fieldset><legend>{CANDIDATE_TITLE}</legend> + <!-- BEGIN candidate_thumbnail --><div style="float: right; margin: 0 0 .2em .5em;">{CANDIDATE_THUMBNAIL}</div><!-- END candidate_thumbnail --> <p>{DESCRIPTION}</p> <!-- BEGIN custom1 --><div><strong>{CUSTOM1_LABEL}:</strong> {CUSTOM1}</div><!-- END custom1 --> *************** *** 12,16 **** <!-- BEGIN custom3 --><div><strong>{CUSTOM3_LABEL}:</strong> {CUSTOM3}</div><!-- END custom3 --> <!-- BEGIN custom4 --><div><strong>{CUSTOM4_LABEL}:</strong> {CUSTOM4}</div><!-- END custom4 --> ! <p> <!-- BEGIN vote_box --><div style="float: right;">{VOTE_BOX}</div><!-- END vote_box --> {LINKS} --- 15,19 ---- <!-- BEGIN custom3 --><div><strong>{CUSTOM3_LABEL}:</strong> {CUSTOM3}</div><!-- END custom3 --> <!-- BEGIN custom4 --><div><strong>{CUSTOM4_LABEL}:</strong> {CUSTOM4}</div><!-- END custom4 --> ! <p style="clear: both;"> <!-- BEGIN vote_box --><div style="float: right;">{VOTE_BOX}</div><!-- END vote_box --> {LINKS} |
From: Verdon V. <ve...@us...> - 2009-03-02 19:59:27
|
Update of /cvsroot/phpwebsite-comm/modules/elections/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10916/docs Modified Files: ChangeLog Log Message: preparing 2.0.1 Index: ChangeLog =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/docs/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog 19 Feb 2009 20:32:01 -0000 1.9 --- ChangeLog 2 Mar 2009 19:59:11 -0000 1.10 *************** *** 1,3 **** ! Version 0.0.1 -- Feb 2009 ------------------------------------------------------------------ + Initial rough-in of mod --- 1,11 ---- ! Version 2.0.0 -- Feb 2009 ------------------------------------------------------------------ + Initial rough-in of mod + + Version 2.0.1 -- Mar 2009 + ------------------------------------------------------------------ + + Fixed duplicate error when editing candidates + + Fixed saving image/file with candidate and ballot + + Added image/file to views for ballots and candidates + + |
From: Verdon V. <ve...@us...> - 2009-03-02 19:59:27
|
Update of /cvsroot/phpwebsite-comm/modules/elections/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10916/class Modified Files: ELEC_Ballot.php ELEC_Candidate.php ELEC_Forms.php Election.php Log Message: preparing 2.0.1 Index: ELEC_Candidate.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Candidate.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ELEC_Candidate.php 19 Feb 2009 21:30:10 -0000 1.1 --- ELEC_Candidate.php 2 Mar 2009 19:59:11 -0000 1.2 *************** *** 154,158 **** } ! public function getImage() { if (!$this->image_id) { --- 154,158 ---- } ! public function getFile() { if (!$this->image_id) { *************** *** 162,165 **** --- 162,192 ---- } + public function getThumbnail($link=false) + { + if (empty($this->image_id)) { + return null; + } + + PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); + $file = Cabinet::getFile($this->image_id); + + if ($file->isImage(true)) { + $file->allowImageLink(false); + if ($link) { + return sprintf('<a href="%s">%s</a>', $this->viewLink(true), $file->getThumbnail()); + } else { + return $file->getThumbnail(); + } + } elseif ($file->isMedia() && $file->_source->isVideo()) { + if ($link) { + return sprintf('<a href="%s">%s</a>', $this->viewLink(), $file->getThumbnail()); + } else { + return $file->getThumbnail(); + } + } else { + return $file->getTag(); + } + } + public function getVotes() { *************** *** 260,263 **** --- 287,291 ---- $tpl['TITLE'] = $this->getTitle(true); $tpl['DESCRIPTION'] = PHPWS_Text::parseTag($this->getDescription(true)); + $tpl['FILE'] = $this->getFile(); *************** *** 310,313 **** --- 338,342 ---- { $vars['candidate_id'] = $this->id; + $vars['ballot_id'] = $this->ballot_id; if (Current_User::isUnrestricted('elections')) { *************** *** 337,340 **** --- 366,374 ---- $tpl['DESCRIPTION'] = $this->getDescription(true); $tpl['LINKS'] = $this->candidateLinks(false); + if ($this->image_id) { + $tpl['CANDIDATE_THUMBNAIL'] = $this->getThumbnail(true); + } else { + $tpl['CANDIDATE_THUMBNAIL'] = null; + } $tpl['VOTE_BOX'] = $this->getVoteBox(); Index: ELEC_Ballot.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Ballot.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ELEC_Ballot.php 19 Feb 2009 21:30:10 -0000 1.1 --- ELEC_Ballot.php 2 Mar 2009 19:59:11 -0000 1.2 *************** *** 172,176 **** } ! public function getImage() { if (!$this->image_id) { --- 172,176 ---- } ! public function getFile() { if (!$this->image_id) { *************** *** 180,183 **** --- 180,210 ---- } + public function getThumbnail($link=false) + { + if (empty($this->image_id)) { + return null; + } + + PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); + $file = Cabinet::getFile($this->image_id); + + if ($file->isImage(true)) { + $file->allowImageLink(false); + if ($link) { + return sprintf('<a href="%s">%s</a>', $this->viewLink(true), $file->getThumbnail()); + } else { + return $file->getThumbnail(); + } + } elseif ($file->isMedia() && $file->_source->isVideo()) { + if ($link) { + return sprintf('<a href="%s">%s</a>', $this->viewLink(), $file->getThumbnail()); + } else { + return $file->getThumbnail(); + } + } else { + return $file->getTag(); + } + } + public function getOpening($type=ELEC_DATE_FORMAT) { *************** *** 298,301 **** --- 325,329 ---- $tpl['TITLE'] = $this->getTitle(true); $tpl['DESCRIPTION'] = PHPWS_Text::parseTag($this->getDescription(true)); + $tpl['FILE'] = $this->getFile(); if (!empty($this->opening)) { *************** *** 486,489 **** --- 514,522 ---- $tpl['TITLE'] = $this->viewLink(); $tpl['DESCRIPTION'] = $this->getListDescription(120); + if ($this->image_id) { + $tpl['THUMBNAIL'] = $this->getThumbnail(true); + } else { + $tpl['THUMBNAIL'] = null; + } // $tpl['OPENS'] = $this->getOpening('%H:%M %a, %b %d, %y'); // $tpl['CLOSES'] = $this->getClosing('%H:%M %a, %b %d, %y'); Index: ELEC_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/ELEC_Forms.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ELEC_Forms.php 19 Feb 2009 21:30:10 -0000 1.1 --- ELEC_Forms.php 2 Mar 2009 19:59:11 -0000 1.2 *************** *** 224,228 **** PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); ! $manager = Cabinet::fileManager('media_id', $ballot->image_id); $manager->imageOnly(); $manager->maxImageWidth(PHPWS_Settings::get('elections', 'max_width')); --- 224,228 ---- PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); ! $manager = Cabinet::fileManager('image_id', $ballot->image_id); $manager->imageOnly(); $manager->maxImageWidth(PHPWS_Settings::get('elections', 'max_width')); *************** *** 315,318 **** --- 315,319 ---- $candidate = & $this->election->candidate; $ballot = & $this->election->ballot; + //print_r($candidate); print_r($ballot); $form->addHidden('module', 'elections'); $form->addHidden('aop', 'post_candidate'); *************** *** 320,324 **** if ($candidate->id) { $this->election->title = sprintf(dgettext('elections', 'Update %s candidate'), $ballot->title); ! $form->addHidden('id', $candidate->id); $form->addSubmit(dgettext('elections', 'Update')); } else { --- 321,325 ---- if ($candidate->id) { $this->election->title = sprintf(dgettext('elections', 'Update %s candidate'), $ballot->title); ! $form->addHidden('candidate_id', $candidate->id); $form->addSubmit(dgettext('elections', 'Update')); } else { *************** *** 337,341 **** PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); ! $manager = Cabinet::fileManager('media_id', $candidate->image_id); $manager->imageOnly(); $manager->maxImageWidth(PHPWS_Settings::get('elections', 'max_width')); --- 338,342 ---- PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); ! $manager = Cabinet::fileManager('image_id', $candidate->image_id); $manager->imageOnly(); $manager->maxImageWidth(PHPWS_Settings::get('elections', 'max_width')); Index: Election.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/class/Election.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Election.php 19 Feb 2009 20:32:00 -0000 1.7 --- Election.php 2 Mar 2009 19:59:11 -0000 1.8 *************** *** 411,414 **** --- 411,418 ---- } + if (isset($_POST['image_id'])) { + $this->ballot->setImage_id((int)$_POST['image_id']); + } + isset($_POST['pubview']) ? $this->ballot->setPubview(1) : *************** *** 478,482 **** --- 482,488 ---- public function postCandidate() { + //print_r($_POST); exit; $this->loadCandidate(); + //print_r($this->candidate); exit; if (empty($_POST['title'])) { |
From: Verdon V. <ve...@us...> - 2009-03-02 19:59:27
|
Update of /cvsroot/phpwebsite-comm/modules/elections/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10916/boost Modified Files: boost.php Added Files: update.php Log Message: preparing 2.0.1 Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/boost/boost.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** boost.php 19 Feb 2009 21:30:09 -0000 1.1 --- boost.php 2 Mar 2009 19:59:08 -0000 1.2 *************** *** 24,28 **** $proper_name = 'Elections'; ! $version = '2.0.0'; $import_sql = true; $version_http = 'http://verdon.ca/downloads/modules/elections/check.xml'; --- 24,28 ---- $proper_name = 'Elections'; ! $version = '2.0.1'; $import_sql = true; $version_http = 'http://verdon.ca/downloads/modules/elections/check.xml'; --- NEW FILE: update.php --- <?php /** * elections - phpwebsite module * * See docs/AUTHORS and docs/COPYRIGHT for relevant info. * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @version $Id: update.php,v 1.6 2009/03/02 19:59:08 verdonv Exp $ * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> */ function elections_update(&$content, $currentVersion) { $home_dir = PHPWS_Boost::getHomeDir(); switch ($currentVersion) { case version_compare($currentVersion, '2.0.1', '<'): $content[] = '<pre>'; $files = array('templates/view_candidate.tpl', 'templates/view_ballot.tpl', 'templates/list_ballots.tpl' ); electionsUpdateFiles($files, $content); $content[] = '2.0.1 changes ---------------- + Fixed duplicate error when editing candidates + Fixed saving image/file with candidate and ballot + Added image/file to views for ballots and candidates </pre>'; } // end switch return true; } function electionsUpdateFiles($files, &$content) { if (PHPWS_Boost::updateFiles($files, 'elections')) { $content[] = '--- Updated the following files:'; } else { $content[] = '--- Unable to update the following files:'; } $content[] = " " . implode("\n ", $files); } ?> |
From: Eloi G. <ada...@us...> - 2009-02-26 23:47:36
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16965 Modified Files: index_admin.php Log Message: Fixed Bug Report [ 2631456 ] - AM 4.21 permission bug Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index_admin.php 23 Nov 2008 06:06:13 -0000 1.27 --- index_admin.php 26 Feb 2009 23:45:52 -0000 1.28 *************** *** 1,405 **** ! <?php ! /** ! * This is the index admin-only file for the article module. ! * ! * @version $Id$ ! * ! * @author Eloi George <el...@NO...> ! * @module Article Manager ! */ ! if (!defined('PHPWS_SOURCE_DIR') || !Current_User::allow('article')) { [...1457 lines suppressed...] ! $message .= "<br /><br />\n". dgettext('article', 'The following Reviewer\'s note is attatched to this version:') ! . '<br />' . PHPWS_Text::parseOutput($status['msg']); ! return $article; } function log_event($message, $type = 'Notice') { *************** *** 756,760 **** $event = sprintf('%s@%s -- %s', $username, $ip, $message); PHPWS_Core::log(escapeshellcmd($event), 'event.log', $type); ! } ! ! ?> \ No newline at end of file --- 755,759 ---- $event = sprintf('%s@%s -- %s', $username, $ip, $message); PHPWS_Core::log(escapeshellcmd($event), 'event.log', $type); ! } ! ! ?> |
From: Eloi G. <ada...@us...> - 2009-02-26 23:47:36
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16965/docs Modified Files: Changes.txt Log Message: Fixed Bug Report [ 2631456 ] - AM 4.21 permission bug Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Changes.txt 24 Feb 2009 17:49:51 -0000 1.48 --- Changes.txt 26 Feb 2009 23:47:29 -0000 1.49 *************** *** 6,9 **** --- 6,10 ---- + Demo articles now display properly when USE_BREAKER is off + All tags are now stripped out of the summary text in the title link alt property. + + Fixed Bug Report [ 2631456 ] - AM 4.21 permission bug ======================== |
From: Eloi G. <ada...@us...> - 2009-02-26 23:47:35
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16965/class Modified Files: AM_EditForms.php AM_Actions.php AM_Data.php Article.php Log Message: Fixed Bug Report [ 2631456 ] - AM 4.21 permission bug Index: AM_EditForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_EditForms.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AM_EditForms.php 26 Jan 2009 03:13:15 -0000 1.13 --- AM_EditForms.php 26 Feb 2009 23:47:29 -0000 1.14 *************** *** 264,268 **** $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) $article_tags['SAVE_PUBLISH_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_approved]" value="'.dgettext('article', 'Save & Publish').'" />'; --- 264,268 ---- $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) $article_tags['SAVE_PUBLISH_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_approved]" value="'.dgettext('article', 'Save & Publish').'" />'; Index: AM_Data.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Data.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** AM_Data.php 21 Nov 2008 06:13:14 -0000 1.21 --- AM_Data.php 26 Feb 2009 23:47:29 -0000 1.22 *************** *** 148,152 **** , 'link' => 'index.php?module=article&op=main_menu'); ! if (Current_User::allow('article', 'approval')) { /* Count unapproved articles (custom) */ $version_db = new PHPWS_DB('article_version'); --- 148,152 ---- , 'link' => 'index.php?module=article&op=main_menu'); ! if (Current_User::allow('article', 'approve')) { /* Count unapproved articles (custom) */ $version_db = new PHPWS_DB('article_version'); Index: AM_Actions.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Actions.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AM_Actions.php 2 Feb 2009 04:42:36 -0000 1.17 --- AM_Actions.php 26 Feb 2009 23:47:29 -0000 1.18 *************** *** 67,71 **** $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) ?1:0; $new_article->version = -1; $new_article->language = $language; --- 67,71 ---- $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) ?1:0; $new_article->version = -1; $new_article->language = $language; Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Article.php 24 Feb 2009 17:49:47 -0000 1.62 --- Article.php 26 Feb 2009 23:47:29 -0000 1.63 *************** *** 119,123 **** $this->publication_date = time(); $this->template = PHPWS_Settings::get('article', 'default_article_template'); ! $this->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; --- 119,123 ---- $this->publication_date = time(); $this->template = PHPWS_Settings::get('article', 'default_article_template'); ! $this->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; |
From: Eloi G. <ada...@us...> - 2009-02-24 17:49:59
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23513/docs Modified Files: Changes.txt Log Message: All tags are now stripped out of the summary text in the title link alt property. Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Changes.txt 2 Feb 2009 03:25:30 -0000 1.47 --- Changes.txt 24 Feb 2009 17:49:51 -0000 1.48 *************** *** 5,8 **** --- 5,9 ---- ======================== + Demo articles now display properly when USE_BREAKER is off + + All tags are now stripped out of the summary text in the title link alt property. ======================== |
From: Eloi G. <ada...@us...> - 2009-02-24 17:49:59
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23513/class Modified Files: Article.php Log Message: All tags are now stripped out of the summary text in the title link alt property. Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Article.php 26 Jan 2009 03:14:07 -0000 1.61 --- Article.php 24 Feb 2009 17:49:47 -0000 1.62 *************** *** 646,650 **** $title = $this->title; if (empty($summary)) { ! $summary = $this->summary; } } --- 646,650 ---- $title = $this->title; if (empty($summary)) { ! $summary = PHPWS_Text::parseOutput($this->summary); } } |
From: Verdon V. <ve...@us...> - 2009-02-19 23:18:30
|
Update of /cvsroot/phpwebsite-comm/modules/elections/javascript/checkvotes In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21550/javascript/checkvotes Log Message: Directory /cvsroot/phpwebsite-comm/modules/elections/javascript/checkvotes added to the repository |
From: Verdon V. <ve...@us...> - 2009-02-19 23:18:26
|
Update of /cvsroot/phpwebsite-comm/modules/elections/javascript/utilities In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21827/javascript/utilities Added Files: default.php head.js Log Message: prep for 2.0.0 --- NEW FILE: default.php --- <?php /** * @version $Id: default.php,v 1.1 2009/02/19 21:41:50 verdonv Exp $ * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> */ $data['confirm_question'] = dgettext('elections', 'Are you sure you wish to purge the selected logs'); ?> --- NEW FILE: head.js --- <script type="text/javascript"> //<![CDATA[ function subtractQty(field){ if(document.getElementById(field).value - 1 < 0) return; else document.getElementById(field).value--; } function confirmAction(question, target) { if (question) { question = question; } else { var question = '{confirm_question}'; } if (confirm(question)) { target.submit(); } else { return false; } } //]]> </script> |
From: Verdon V. <ve...@us...> - 2009-02-19 23:17:59
|
Update of /cvsroot/phpwebsite-comm/modules/elections/javascript/utilities In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21578/javascript/utilities Log Message: Directory /cvsroot/phpwebsite-comm/modules/elections/javascript/utilities added to the repository |
From: Verdon V. <ve...@us...> - 2009-02-19 23:17:55
|
Update of /cvsroot/phpwebsite-comm/modules/elections/javascript/checkvotes In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21827/javascript/checkvotes Added Files: body.js default.php head.js Log Message: prep for 2.0.0 --- NEW FILE: body.js --- <input type="button" id="checkvotes" onclick="checkQty({MIN}, {MAX}, '{TYPE}', this.form);" style="display : inline" value="{SUBMIT_LABEL}" /> --- NEW FILE: default.php --- <?php /** * @version $Id: default.php,v 1.1 2009/02/19 21:41:49 verdonv Exp $ * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> */ $data['submit_label'] = dgettext('elections', 'Vote'); $data['min'] = 1; $data['max'] = 1; $data['qty'] = null; $data['type'] = 'check'; $data['text_min'] = dgettext('elections', 'You must make at least '); $data['text_min_2'] = dgettext('elections', ' choice(s).'); $data['text_max'] = dgettext('elections', 'You have made too many choices and must reduce your number by '); $data['text_max_2'] = dgettext('elections', ' to proceed.'); $data['text_ok'] = dgettext('elections', 'You have cast '); $data['text_ok_2'] = dgettext('elections', ' of '); $data['text_ok_3'] = dgettext('elections', ' possible votes. Click OK to post your vote(s) or cancel to make a change.'); ?> --- NEW FILE: head.js --- <script type="text/javascript"> //<![CDATA[ function checkQty(min, max, type, target) { var text_min = '{text_min}'; var text_min_2 = '{text_min_2}'; var text_max = '{text_max}'; var text_max_2 = '{text_max_2}'; var text_ok = '{text_ok}'; var text_ok_2 = '{text_ok_2}'; var text_ok_3 = '{text_ok_3}'; var question = null; if (type) { type = type; } else { var type = '{type}'; } if (type == 'check') { var qty = getTotalChecks(); } else { var qty = getTotalVotes(); } if (qty < min) { question = text_min + min.toString() + text_min_2; alert(question); } else if (qty > max) { var extra = max - qty; question = text_max + extra.toString() + text_max_2; alert(question); } else { question = text_ok + qty.toString() + text_ok_2 + max.toString() + text_ok_3; if (confirm(question)) { target.submit(); } } } function getTotalVotes() { oTextBoxes = new Array(); // to store the textbox objects oInputs = document.getElementsByTagName( 'input' ) // store collection of all <input/> elements for ( i = 0; i < oInputs.length; i++ ) { // loop through and find <input type="text"/> if ( oInputs[i].type == 'text' ) { oTextBoxes.push( oInputs[i] ); // found one - store it in the oTextBoxes array } } msg = "Found " + oTextBoxes.length + " text boxes"; var count = 0; var total = 0; for ( i = 0; i < oTextBoxes.length; i++ ) { // Loop through the stored textboxes and output the value msg += "\nTextbox #" + ( i + 1 ) + " value = " + oTextBoxes[i].value; if (oTextBoxes[i].value !="") { if (isNaN(oTextBoxes[i].value)) { var votes = 0; } else { count ++; var votes = Number(oTextBoxes[i].value); } } else { var votes = 0; } total = total + (votes * 1); } // alert( msg ); // alert (count + " textboxes were filled in " + total + " votes"); return total; } function getTotalChecks() { oCheckBoxes = new Array(); // to store the checkbox objects oInputs = document.getElementsByTagName( 'input' ) // store collection of all <input/> elements for ( i = 0; i < oInputs.length; i++ ) { // loop through and find <input type="checkbox"/> if ( oInputs[i].type == 'checkbox' ) { oCheckBoxes.push( oInputs[i] ); // found one - store it in the oCheckBoxes array } } msg = "Found " + oCheckBoxes.length + " check boxes"; var count = 0; for ( i = 0; i < oCheckBoxes.length; i++ ) { // Loop through the stored checkboxes and see if it's checked msg += "\nCheckbox #" + ( i + 1 ) + " checked = " + oCheckBoxes[i].checked; if (oCheckBoxes[i].checked) { count ++; } } // alert( msg ); // alert (count + " textboxes were checked"); return count; } //]]> </script> |
From: Verdon V. <ve...@us...> - 2009-02-19 23:17:44
|
Update of /cvsroot/phpwebsite-comm/modules/elections/locale In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21082/locale Log Message: Directory /cvsroot/phpwebsite-comm/modules/elections/locale added to the repository |
From: Verdon V. <ve...@us...> - 2009-02-19 23:17:40
|
Update of /cvsroot/phpwebsite-comm/modules/elections/locale/en_US In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21145/locale/en_US Log Message: Directory /cvsroot/phpwebsite-comm/modules/elections/locale/en_US added to the repository |
From: Verdon V. <ve...@us...> - 2009-02-19 23:17:32
|
Update of /cvsroot/phpwebsite-comm/modules/elections/locale/en_US/LC_MESSAGES In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21259/locale/en_US/LC_MESSAGES Added Files: elections.po Log Message: prep for 2.0.0 --- NEW FILE: elections.po --- # elections - phpwebsite module # # See docs/AUTHORS and docs/COPYRIGHT for relevant info. # # This program 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 2 of the License, or # (at your option) any later version. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # @version $Id: elections.po,v 1.1 2009/02/19 21:39:05 verdonv Exp $ # @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-02-19 13:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid " choice(s)." msgstr "" msgid " of " msgstr "" msgid "" " possible votes. Click OK to post your vote(s) or cancel to make a change." msgstr "" msgid " to proceed." msgstr "" #, php-format msgid "%s Ballots" msgstr "" #, php-format msgid "%s Candidates" msgstr "" #, php-format msgid "%s Voting Log" msgstr "" msgid "- All -" msgstr "" msgid "Add" msgstr "" msgid "Add Candidate" msgstr "" #, php-format msgid "Add candidate to %s" msgstr "" msgid "Allow public to view this ballot" msgstr "" msgid "Allow public to vote in this election" msgstr "" msgid "An error occurred when accessing this ballot's candidates." msgstr "" #, php-format msgid "Are you sure you want to delete the ballot %s?" msgstr "" #, php-format msgid "Are you sure you want to delete the candidate %s?" msgstr "" #, php-format msgid "" "Are you sure you want to delete the vote %s? This will not take back the " "votes, just remove this record from the log." msgstr "" msgid "Are you sure you wish to purge the selected logs" msgstr "" msgid "Available ballots" msgstr "" msgid "Ballot" msgstr "" msgid "Ballot ID" msgstr "" msgid "Ballot deleted." msgstr "" msgid "Ballot saved successfully." msgstr "" msgid "Browse all ballots" msgstr "" msgid "Candidate deleted." msgstr "" msgid "Candidate saved successfully." msgstr "" msgid "Candidates" msgstr "" #, php-format msgid "Check your %s then create a %s to begin" msgstr "" msgid "" "Choose ALL candidates, or by ballot. Nummber in parenthesis represents " "number of candidates in ballot." msgstr "" msgid "" "Choose ALL records, or by ballot. Nummber in parenthesis represents ballots " "cast." msgstr "" msgid "" "Choose ALL results, or by ballot. Nummber in parenthesis represents ballots " "cast." msgstr "" msgid "Click on \"New candidate\" to start." msgstr "" msgid "Closes" msgstr "" msgid "Closing date/time" msgstr "" msgid "Continue" msgstr "" msgid "Create" msgstr "" msgid "Create elections ballot" msgstr "" msgid "Custom Field 1 Label" msgstr "" msgid "Custom Field 2 Label" msgstr "" msgid "Custom Field 3 Label" msgstr "" msgid "Custom Field 4 Label" msgstr "" msgid "Custom Fields" msgstr "" msgid "Default open time of election (in days, 1-365)" msgstr "" msgid "Delete" msgstr "" msgid "Description" msgstr "" msgid "Details" msgstr "" msgid "Edit" msgstr "" msgid "Edit ballot" msgstr "" msgid "Edit candidate" msgstr "" msgid "Election settings saved." msgstr "" msgid "Elections" msgstr "" msgid "Elections tables dropped." msgstr "" msgid "Enable candidate ranking instead of simple selection" msgstr "" msgid "Enable elections" msgstr "" msgid "Enable elections sidebox" msgstr "" msgid "Enable images on candidate profiles" msgstr "" msgid "Error occurred when purging logs." msgstr "" msgid "Error occurred when registering vote." msgstr "" msgid "Error occurred when saving ballot." msgstr "" msgid "Error occurred when saving candidate." msgstr "" msgid "Export voting log" msgstr "" msgid "Export voting results" msgstr "" msgid "Fatal error: Cannot create candidate. Missing ballot id." msgstr "" msgid "General Settings" msgstr "" msgid "ID" msgstr "" msgid "IP Address" msgstr "" msgid "" "If you wish to restrict voting on this ballot to a particular group of " "members, choose the group(s) you wish to restrict access to. Press CTRL and " "Click to select multiple groups, press CTRL and Click again to deselect an " "option." msgstr "" #, php-format msgid "" "If you would like to help out with the ongoing development of elections, or " "other modules by Verdon Vaillancourt, %s click here to donate %s (opens in " "new browser window)." msgstr "" msgid "Important Information" msgstr "" msgid "Include is missing file id." msgstr "" msgid "List Ballots" msgstr "" msgid "List ballots" msgstr "" msgid "List candidates by ballot" msgstr "" msgid "List in side-box" msgstr "" msgid "List in sidebox (if sidebox is set to visible in Elections settings)." msgstr "" msgid "List voting log" msgstr "" msgid "List voting results" msgstr "" msgid "Logs successfully purged." msgstr "" msgid "Maximum # of selections a voter may mark on this ballot" msgstr "" msgid "Maximum choices allowed" msgstr "" msgid "Maximum image height (50-600)" msgstr "" msgid "Maximum image width (50-600)" msgstr "" msgid "Minimum # of selections a voter may mark on this ballot" msgstr "" msgid "Minimum choices allowed" msgstr "" msgid "Module title" msgstr "" msgid "Name" msgstr "" msgid "New Ballot" msgstr "" msgid "New Candidate" msgstr "" msgid "New candidate step one" msgstr "" msgid "No" msgstr "" msgid "No ballots created." msgstr "" msgid "No groups configured." msgstr "" msgid "Opening date/time" msgstr "" msgid "Opens" msgstr "" msgid "Profile" msgstr "" msgid "Public may view" msgstr "" msgid "Public may vote" msgstr "" msgid "Public voting is not allowed for this election" msgstr "" msgid "Purge voting log" msgstr "" msgid "Read me" msgstr "" msgid "Reports" msgstr "" msgid "Results" msgstr "" msgid "Save settings" msgstr "" msgid "Select ballot" msgstr "" msgid "Settings" msgstr "" msgid "Show sidebox on home page only" msgstr "" msgid "Sidebox text" msgstr "" msgid "Sorry, the readme file does not exist." msgstr "" msgid "" "Sorry, there are no ballots available. You will have to create a ballot " "first." msgstr "" msgid "Submit" msgstr "" msgid "" "Thank you for your interest. However, all elections are currently closed." msgstr "" msgid "This ballot is not available to the general public." msgstr "" msgid "This is a restricted area." msgstr "" msgid "Title" msgstr "" msgid "Update" msgstr "" #, php-format msgid "Update %s candidate" msgstr "" msgid "Update elections ballot" msgstr "" msgid "Username" msgstr "" msgid "" "Using these will add fields to the candidate template for this election." msgstr "" #, php-format msgid "" "VOTING ERROR: You are only allowed to make %s selections. Please try again." msgstr "" #, php-format msgid "VOTING ERROR: You must make at least %s selection(s). Please try again." msgstr "" msgid "Vote" msgstr "" msgid "Vote Date" msgstr "" msgid "Vote date" msgstr "" msgid "Vote registered successfully." msgstr "" msgid "Votes" msgstr "" msgid "Voting Groups" msgstr "" msgid "Voting closes" msgstr "" msgid "Voting has closed for this election" msgstr "" msgid "Voting has not opened yet for this election" msgstr "" msgid "Voting is open for this election." msgstr "" msgid "Voting log" msgstr "" msgid "Voting opens" msgstr "" msgid "Yes" msgstr "" msgid "You are not a member of an authorized voting group for this election" msgstr "" msgid "You have already voted in this election" msgstr "" msgid "You have cast " msgstr "" msgid "You have made too many choices and must reduce your number by " msgstr "" #, php-format msgid "You may cast %s vote on this ballot." msgstr "" #, php-format msgid "You may cast from %s to %s votes on this ballot." msgstr "" msgid "You must give this ballot a description." msgstr "" msgid "You must give this ballot a title." msgstr "" msgid "You must give this candidate a description." msgstr "" msgid "You must give this candidate a title." msgstr "" msgid "You must make at least " msgstr "" #, php-format msgid "Your vote has been cast for candidate %s" msgstr "" |