Changeset 141
- Timestamp:
- 10/12/08 23:12:46 (7 weeks ago)
- Files:
-
- 1 modified
-
trunk/pi1/class.tx_wseevents_pi1.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pi1/class.tx_wseevents_pi1.php
r137 r141 3 3 * Copyright notice 4 4 * 5 * (c) 2007 Michael Oehlhof <typo3@oehlhof.de>5 * (c) 2007-2008 Michael Oehlhof <typo3@oehlhof.de> 6 6 * All rights reserved 7 7 * … … 703 703 } 704 704 705 # Check for given width of event titles 706 $teaserwidth = $conf['listTimeslotView.']['teaserWidth']; 707 if (empty($teaserwidth)) { 708 $teaserwidth = 0; 709 } 710 705 711 # For debugging output used in development 706 712 $showdebug = $conf['listTimeslotView.']['debug']; … … 730 736 } 731 737 $template['titlerow'] = $this->cObj->getSubpart($template['total'], '###TITLEROW###'); 738 $template['select'] = $this->cObj->getSubpart($template['titlerow'], '###SELECT###'); 739 $template['titlecol'] = $this->cObj->getSubpart($template['titlerow'], '###TITLECOLUMN###'); 732 740 $template['evtsection'] = $this->cObj->getSubpart($template['total'], '###EVENTSELECT###'); 733 741 $template['evtselect'] = $this->cObj->getSubpart($template['evtsection'],'###SELECT###'); 734 742 $template['evtoption'] = $this->cObj->getSubpart($template['evtselect'], '###OPTIONNOTSELECTED###'); 735 743 $template['evtoptionsel'] = $this->cObj->getSubpart($template['evtselect'], '###OPTIONSELECTED###'); 736 $template['select'] = $this->cObj->getSubpart($template['titlerow'], '###SELECT###');737 744 $template['option'] = $this->cObj->getSubpart($template['select'], '###OPTIONNOTSELECTED###'); 738 745 $template['optionsel'] = $this->cObj->getSubpart($template['select'], '###OPTIONSELECTED###'); 739 $template['titlecol'] = $this->cObj->getSubpart($template['titlerow'], '###TITLECOLUMN###');740 746 $template['headerrow'] = $this->cObj->getSubpart($template['total'], '###HEADERROW###'); 741 747 $template['headercol'] = $this->cObj->getSubpart($template['headerrow'], '###HEADERCOLUMN###'); … … 951 957 if ($showdebugsql==1) { echo '<br>getSlot:'.$showevent.', '.$d.', '.$rooms[$r]['uid'].', '.$s.'<br>'; }; 952 958 $slot_id = $this->getSlot($showevent, $d, $rooms[$r]['uid'], $s, $showdebugsql); 953 if ( empty($slot_id) && !$allrooms) {959 if ($r==1 && empty($slot_id) && !$allrooms) { 954 960 // Check if a slot is assigned for all rooms 955 961 if ($showdebugsql==1) { echo 'getSlot:'.$showevent.', '.$d.', 0, '.$s.'<br>'; }; … … 984 990 $markerArray['###SLOTLINKNAME###'] = $sessionlinkname; 985 991 $markerArray['###SLOTSESSION###'] = $sessiondata['catnum']; 986 $markerArray['###SLOTTEASER###'] = $sessiondata['teaser']; 992 # Cut teaser if longer than max teaser width 993 if ($teaserwidth > 0) { 994 $markerArray['###SLOTTEASER###'] = substr($sessiondata['teaser'], 0, $teaserwidth).'...'; 995 } else { 996 $markerArray['###SLOTTEASER###'] = $sessiondata['teaser']; 997 } 998 # Get speaker list of session 999 $markerArray['###SLOTSPEAKER###'] = $this->getSpeakerNames($sessiondata['speaker']); 987 1000 } else { 988 1001 $markerArray = array(); … … 991 1004 $markerArray['###SLOTSESSION###'] = $this->pi_getLL('tx_wseevents_sessions.slot_notassigned'); 992 1005 $markerArray['###SLOTTEASER###'] = $this->pi_getLL('tx_wseevents_sessions.slot_notassigned'); 1006 $markerArray['###SLOTSPEAKER###'] = ''; 993 1007 } else { 994 1008 $markerArray['###SLOTNAME###'] = ''; 995 1009 $markerArray['###SLOTSESSION###'] = ''; 996 1010 $markerArray['###SLOTTEASER###'] = ''; 1011 $markerArray['###SLOTSPEAKER###'] = ''; 997 1012 } 998 1013 $markerArray['###SLOTCATEGORY###'] = 0; … … 1575 1590 $data = $this->pi_getRecord('static_countries',$this->internal['currentRow'][$fN]); 1576 1591 $iso = $data['cn_iso_3']; 1577 return $this->staticInfo->getStaticInfoName('COUNTRIES', $iso); 1592 return $this->staticInfo->getStaticInfoName('COUNTRIES', $iso);//.':'.$iso.':'.$this->staticInfo->getCurrentLanguage(); 1578 1593 break; 1579 1594 … … 1773 1788 $where = 'sys_language_uid=0 AND location='.$loc_id.$this->cObj->enableFields('tx_wseevents_rooms'); 1774 1789 $this->conf['pidList'] = $eventPid; 1775 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,name,comment,seats ', 'tx_wseevents_rooms', $where);1790 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,name,comment,seats,number', 'tx_wseevents_rooms', $where, 'number'); 1776 1791 $id = 1; 1777 1792 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { … … 1794 1809 function getSlot($event, $day, $room, $slot, $showdbgsql) { 1795 1810 $where = 'event='.$event.' AND eventday='.$day.' AND room='.$room.' AND begin='.$slot.$this->cObj->enableFields('tx_wseevents_timeslots'); 1796 $this->conf['pidList'] = $eventPid;1811 // $this->conf['pidList'] = $eventPid; 1797 1812 if ($showdbgsql==1) { echo 'getSlot where:'.$where.'<br>'; }; 1798 1813 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tx_wseevents_timeslots', $where); … … 1833 1848 $where = 'sys_language_uid=0'.$this->cObj->enableFields('tx_wseevents_sessions'); 1834 1849 $this->conf['pidList'] = $eventPid; 1835 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,name,category,number,teaser,timeslots ', 'tx_wseevents_sessions', $where);1850 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,name,category,number,teaser,timeslots,speaker', 'tx_wseevents_sessions', $where); 1836 1851 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { 1837 1852 // foreach(explode(',',$row['timeslots']) as $k){ … … 1851 1866 } 1852 1867 1868 1869 1870 1871 /** 1872 * Get speaker names for a list of speaker id's 1873 * 1874 * @param integer $speakerlist: list of speaker id's 1875 * @return string string with list of speakers 1876 */ 1877 function getSpeakerNames($speakerlist) { 1878 foreach(explode(',',$speakerlist) as $k){ 1879 $data = $this->pi_getRecord('tx_wseevents_speakers',$k); 1880 // Get the name and firstname 1881 if (!empty($data['firstname'])) { 1882 if (((isset($this->conf['lastnameFirst']))) && ($this->conf['lastnameFirst']==1)) { 1883 $speakername = $data['name'].', '.$data['firstname']; 1884 } else { 1885 $speakername = $data['firstname'].' '.$data['name']; 1886 } 1887 } else { 1888 $speakername = $data['name']; 1889 } 1890 if (isset($content)) { 1891 $content .= $this->internal['speakerdelimiter'].$speakername; 1892 } else { 1893 $content = $speakername; 1894 } 1895 } 1896 if (empty($content)) { 1897 $content = $this->pi_getLL('tx_wseevents_sessions.nospeakers','[no speaker assigned]'); 1898 } 1899 return $content; 1900 } 1901 1853 1902 } 1854 1903
