Hi,
Im having problems with intergrating G2 with mxBB - I am upgrading an existing intergration, but some of the API calls have changed since and im having issues.
The main problem seems to be with user creation.
Quote:
Error type: Php Warning
Message: Missing argument 2 for addmapentry()
This function seems to be the problem
function _g2addexternalMapEntry($externalId, $entityId, $entityType )
{
global $db, $failures, $fullpath, $map_debug;
$is_ok = true;
if (is_int($entityType))
{
$entityType = $entityType == MAP_MXBB_USER ? 'GalleryUser' : 'GalleryGroup';
}
require_once ($fullpath."/".'modules/core/classes/ExternalIdMap.class');
$ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId));
if ($ret->isError())
{
$failures[] = $externalId;
$is_ok = false;
}
$map_debug .= $is_ok ? '<br>externalMapEntry inserted successfully' : '<br>ERROR: externalMapEntry not inserted';
return $is_ok;
}
I have gathered that all references to if ($ret->isError())
should now be $ret()
but its this line thats the issue
$ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId));
AS ExternalIdMap :: addMapEntry no longer exists what do I use in its place as $ret = GalleryCoreApi :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId));
didnt work.....
Many thanks for any help
Posts: 5
anyone?....
Posts: 32509
see:
- http://codex.gallery2.org/Gallery2:API_Changes_From_2.0_To_2.1#GalleryEmbedApi
- instead of ExternalIdMap::addMapEntry, please use GalleryCoreApi::addMapEntry http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html#methodaddMapEntry
or use GalleryEmbed::addExternalIdMapEntry http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryEmbed.html#addExternalIdMapEntry
--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage