Adding comments to group photos

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

SyntaxError: syntax error
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E
ReferenceError: BxDolCmts is not defined
 
The 1st screen shot is WITHOUT the comments block added.

The 2nd screen shot is WITH the comments block added.

It's obvious the comment block adds something I am missing.

Thanks!

Screenshot_1.png · 20.1K · 264 views
Screenshot_2.png · 54.7K · 284 views
http://www.mytikibar.com
Quote · 5 Aug 2013

Wel, I've got this part working for the most part.

The big problem I have now is tinyMCE is not being invoked.

In my console log I get the following error.

http://mysite.com/undefined/tiny_mce_gzip.php?js=true&diskcache=true&core=true&suffix=&themes=advanced&plugins=inlinepopups%2Cemotions%2Cadvimage%2Cembed%2C&languages=en

 

Notice the undefined instead of plugins.

Any idea WHY this is happening?

If I go to the groups normal comment page, I get the normal tinyMCE editor displayed in all it's glory.

 

http://www.mytikibar.com
Quote · 6 Aug 2013

Which TinyMCE are you using?  The default one or the newer 4.? versions?

Ultra Newb reporting for duty.
Quote · 6 Aug 2013

My guess is that undefined is from the php code trying to resolve the bit for the URL.  The results of the code execution returned undefined and so that got inserted in the URL.

Geeks, making the world a better place
Quote · 6 Aug 2013

I'm using 7.0.9  so the old tinymce for now.

http://www.mytikibar.com
Quote · 7 Aug 2013

Geek_girl, I know that.  LOL

I am just trying to figure out WHERE that gets added in the code.

What is weird, is if I add the comment block, it works fine.

If I just use the code, it doesn't.  :(

Perhaps filling the block with the function getHtmlData is the wrong way to do this.

http://www.mytikibar.com
Quote · 7 Aug 2013

Anybody?

If I can get this worked out I have an opportunity to expand my membership base as someone on "the facebook" had their group banned from pictures that are FAR from NSFW.

So, I could REALLY use some help here.

http://www.mytikibar.com
Quote · 8 Aug 2013

Nobody knows the answer?

I have a GREAT opportunity to expand my membership if I can ONLY get comments on group photos.

I really could use the help here.

Thanks!

http://www.mytikibar.com
Quote · 8 Aug 2013

I hope someone comes in to help as well because I would like to incorporate this on my site as well.

Thanks for all the work you have put into this and thanks for sharing it to the community.

Geeks, making the world a better place
Quote · 9 Aug 2013

yeah, that and animated GIF support!  LOL

http://www.mytikibar.com
Quote · 9 Aug 2013

 

yeah, that and animated GIF support!  LOL

At least animated avatars LOL (too bad HL is not as active, I loved his rant on animated gifs :-) ).  I am going to tear into the avatar module and add the animated gif resizing and such and knock that one out.  I posted the php code for resizing animated gifs twice now hoping one of the mod developers would add it.  Yes, it would be a freebie to the community since it would be adding open source code to the module but look at some of the really nice free modules in the market.  Actually, Boonex could knock this out in short order without using open source code.

Geeks, making the world a better place
Quote · 9 Aug 2013

Playing with the photo module at one time, I managed to get it to allow animated gifs.

I just never could get it to display it in all it's glory except when viewing original.

I think if you get the photo module to allow animated gifs 1st, the avatar module will fall into place.

I will DEFINITELY help you test the avatar module when you need a beta tester!

http://www.mytikibar.com
Quote · 10 Aug 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.