Everytime I think I have dolphin under control, it throws me for a loop.
I am trying to add a comment block for photos in the groups module.
I have added the proper database entries to
sys_objects_cmts
I added the proper tables
bx_groups_images_cmts
bx_groups_images_track
I cleared the cache.
I have the following code in BxGroupsModule
function actionGetPhotoCmts($iId=0){
bx_groups_import('Cmts');
$o = new BxGroupsCmts ('bx_groups_images', $iId);
if (!$o->isEnabled()) return '';
echo $o->getCommentsFirst();
}
And I am calling it with this in entry_view_block_images_html
<div>
<div id="__prefix__images_title_curr" class="bx_sys_block_images_title_curr">
__title__
</div>
<div id="__prefix__images_curr" class="bx_sys_block_images_curr" >
<img title="__title__" alt="___title__" src="__image_url__" />
<input type="hidden" name="image_id" value="__base_id__">
<div id="groupsPhotoRate" class="groupsPhotoRate" ></div>
</div>
<div id="__prefix__images_icons" class="bx_sys_block_images_icons">
<bx_repeat:images_icons>
<div class="sys_icon"><img alt="__image_url__" title="__title__" src="__icon_url__" />
<input type="hidden" value="__id__" name="image_id">
</div>
</bx_repeat:images_icons>
<div class="clear_both"></div>
<div id="groupsPhotoCmt" class="groupsPhotoCmt" ></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
bx_center_content ('#__prefix__images_icons', '.sys_icon');
$('#__prefix__images_icons > .sys_icon > img').bind('click', function () {
var e = $(this);
$('#__prefix__images_title_curr').html(e.attr('title'));
$('#__prefix__images_curr>img').attr('src', e.attr('alt'));
$('#__prefix__images_curr>img').attr('title', e.attr('title')).attr('alt', e.attr('title'));
iThisId = $(this).parent().find('input[type=hidden]').val();
$('.bx_sys_block_images_curr').find('input[type=hidden]').val(iThisId);
iId = $(this).parent().find('input[type=hidden]').val();
getHtmlData('groupsPhotoRate','__baseUrl__GetPhotoVotes/'+iId);
getHtmlData('groupsPhotoCmt','__baseUrl__GetPhotoCmts/'+iId);
});
});
getHtmlData('groupsPhotoRate','__baseUrl__GetPhotoVotes/'+__base_id__);
getHtmlData('groupsPhotoCmt','__baseUrl__GetPhotoCmts/'+__base_id__);
</script>
</div>
Notice, I have photo rates, that works just fine.
IF I include the comments block for groups, this works, if I DON'T include the comments block, it fails miserably.
I manually added a comment with the proper ID's for the photo and the comments display, but I get the following errors in the console in firebug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E |