function _getJSOptions($fields) { $db = JFactory::getDBO(); $socialadshelper = new socialadshelper(); $jschk = $socialadshelper->jschk(); if (!empty($jschk)) { for ($i = 0; $i < count($fields); $i++) { $query = "SELECT id as id, options as options FROM #__community_fields WHERE id=" . $fields[$i]->mapping_fieldid; $db->setQuery($query); $mapping_options[] = $db->loadobjectlist(); } } //if if (!empty($mapping_options)) { return $mapping_options; } }
function _getJSFields() { //TODO: Use ignore field list from defines $socialadshelper = new socialadshelper(); $jschk = $socialadshelper->jschk(); if (!empty($jschk)) { $qry = "SELECT m.*, f.name AS field_label, f.fieldcode as mapping_fieldname, f.type, f.id AS id\n\t\t\t\t\t\tFROM #__community_fields AS f\n\t\t\t\t\t\tLEFT JOIN #__ad_fields_mapping AS m ON f.id = m.mapping_fieldid\n\t\t\t\t\t\tWHERE f.type <> 'group' AND f.published = 1\n\t\t\t\t\t\tORDER BY f.id\n\t\t\t\t\t\t"; $this->_db->setQuery($qry); return $this->_db->loadobjectList(); } //empty check }
function getUserData($int_typ, $adRetriever) { $socialadshelper = new socialadshelper(); if ($int_typ == 0) { $cbchk = $socialadshelper->cbchk(); if (!empty($cbchk)) { $ud = $adRetriever->getCBData(); return $ud; } //chk empty } elseif ($int_typ == 1) { $jschk = $socialadshelper->jschk(); if (!empty($jschk)) { $ud = $adRetriever->getJSData(); return $ud; } //chk empty } elseif ($int_typ == 3) { $eschk = $socialadshelper->eschk(); if (!empty($eschk)) { $ud = $adRetriever->getESData(); return $ud; } //chk empty } elseif ($int_typ == 2) { // check if intregration is set to None... return; } }