setQuery( $query ); $items = $db->loadObjectList(); // TO DO - check for other views than category edit /*$view = JFactory::getApplication()->input->get( 'view' ); $catId = -1; if ($view == 'phocagalleryc') { $id = $this->form->getValue('id'); // id of current category if ((int)$id > 0) { $catId = $id; } }*/ $fieldId = $this->element['fieldid'] ? $this->element['fieldid'] : ''; $link = 'index.php?option=com_phocagallery&view=phocagalleryfba&tmpl=component&field=jform_'.$fieldId.'&uid='; $js = 'document.getElementById(\'pglinktoalbum\').href = \''.$link.'\' + this.value'; array_unshift($items, HTMLHelper::_('select.option', '', '- '.Text::_('COM_PHOCAGALLERY_SELECT_FB_USER').' -', 'value', 'text')); return HTMLHelper::_('select.genericlist', $items, $this->name, 'class="form-control" onchange="'.$js.'"', 'value', 'text', $this->value, $this->id ); } } ?>