spoolup Posted February 22, 2014 Share Posted February 22, 2014 Hi everyone, i recently purchased the jbjobs component for joomla and have been modifying the views to suit my needs. i've reached a dead end though. i have a php bit that needs to be combined with a table, but i have not managed to make it work. can someone please lend a hand? thanks <?php $db=JFactory::getDBO(); $q = "select * from #__jbjobs_employer where user_id=".$job->employer_id; $db->setQuery($q); $employer_record = $db->loadObject(); '<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>';echo ($employer_record->show_addr == 'y')? "".$employer_record->street_addr : JText::_('JBJOBS_NOT_DISPLAYED').'</tr> <tr> <td>'; echo ($employer_record->show_location == 'y')? "".$employer_record->city.', '.$employer_record->state : JText::_('JBJOBS_NOT_DISPLAYED').'</td> </tr> <tr> <td>'; echo ($employer_record->show_phone == 'y')? "".$employer_record->primary_phone : JText::_('JBJOBS_NOT_DISPLAYED').'</td> </tr> <tr> <td>'; echo ($employer_record->show_fax == 'y')? "".$employer_record->fax_number : JText::_('JBJOBS_NOT_DISPLAYED').'</td> </tr> <tr> <td>'; $u = JFactory::getUser($job->employer_id); echo ($employer_record->show_email == 'y')? "".$u->email : JText::_('JBJOBS_NOT_DISPLAYED');'</td> </td> </tr> </table>' ?> Link to comment https://forums.phpfreaks.com/topic/286402-require-help-with-php-and-table-combo/ Share on other sites More sharing options...
Augury Posted February 22, 2014 Share Posted February 22, 2014 Can you take the numbers off the code box? Select a different code type? Link to comment https://forums.phpfreaks.com/topic/286402-require-help-with-php-and-table-combo/#findComment-1470003 Share on other sites More sharing options...
Augury Posted February 22, 2014 Share Posted February 22, 2014 You've got to show us what the class is. I don't have it. Link to comment https://forums.phpfreaks.com/topic/286402-require-help-with-php-and-table-combo/#findComment-1470004 Share on other sites More sharing options...
Ch0cu3r Posted February 22, 2014 Share Posted February 22, 2014 Change your code to $db=JFactory::getDBO(); $q = "select * from #__jbjobs_employer where user_id=".$job->employer_id; $db->setQuery($q); $employer_record = $db->loadObject(); $u = JFactory::getUser($job->employer_id); echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>'.($employer_record->show_addr == 'y') ? $employer_record->street_addr : JText::_('JBJOBS_NOT_DISPLAYED')).'</tr> <tr> <td>'.(($employer_record->show_location == 'y')? $employer_record->city.', '.$employer_record->state : JText::_('JBJOBS_NOT_DISPLAYED')).'</td> </tr> <tr> <td>'.(($employer_record->show_phone == 'y')? $employer_record->primary_phone : JText::_('JBJOBS_NOT_DISPLAYED')).'</td> </tr> <tr> <td>'.(($employer_record->show_fax == 'y')? $employer_record->fax_number : JText::_('JBJOBS_NOT_DISPLAYED')).'</td> </tr> <tr> <td>'.(($employer_record->show_email == 'y')? $u->email : JText::_('JBJOBS_NOT_DISPLAYED')).'</td> </tr> </table>'; Link to comment https://forums.phpfreaks.com/topic/286402-require-help-with-php-and-table-combo/#findComment-1470022 Share on other sites More sharing options...
spoolup Posted February 22, 2014 Author Share Posted February 22, 2014 thanks Link to comment https://forums.phpfreaks.com/topic/286402-require-help-with-php-and-table-combo/#findComment-1470066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.