function _getCBOptions($fields) { $db = JFactory::getDBO(); $cbchk = socialadshelper::cbchk(); if (!empty($cbchk)) { for ($i = 0; $i < count($fields); $i++) { $query = "SELECT fieldid as id, fieldtitle as options FROM #__comprofiler_field_values WHERE fieldid=" . $fields[$i]->mapping_fieldid; $db->setQuery($query); $mapping_options[] = $db->loadobjectlist(); } } //if if (!empty($mapping_options)) { return $mapping_options; } }
function _getCBFields() { //TODO: Use plugin id field list from defines $socialadshelper = new socialadshelper(); $cbchk = $socialadshelper->cbchk(); if (!empty($cbchk)) { $qry = "SELECT m.*, f.title AS field_label, f.name AS mapping_fieldname, f.type, f.fieldid AS id\n\t\t\t\t\t\tFROM #__comprofiler_fields AS f\n\t\t\t\t\t\tLEFT JOIN #__ad_fields_mapping AS m ON f.fieldid = m.mapping_fieldid\n\t\t\t\t\t\tWHERE f.published = 1 AND f.sys <> 1\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; } }