XF 2.2 Reaction in old addon

Robert9

Well-known member
The Link Directory has still Likes instead of Reactions.
So i try to change that.
I have chanded/added the thread rection fields to the table.
I have copied all methods from RM resourceitem and resourceupdate; checked everything twice.
I have tried to add the template code.
I have added content_type

But

I still have no reactions on the page.
Are there aby docs for reactions, please?
 
I have reduced xfrm_resource_view to this code to compare it to my template

Code:
{{ dump ($description) }}

    <div class="block-container">
        <div class="block-body lbContainer js-resourceBody"
            data-xf-init="lightbox"
            data-lb-id="resource-{$resource.resource_id}"
            data-lb-caption-desc="{{ $resource.User ? $resource.User.username : $resource.username }} &middot; {{ date_time($resource.resource_date) }}">
            
            <div class="resourceBody">
                <article class="resourceBody-main js-lbContainer">
                
                    <xf:if contentcheck="true">
                        <div class="actionBar">
                            <xf:contentcheck>
                                <xf:if contentcheck="true">
                                    <div class="actionBar-set actionBar-set--external">
                                    <xf:contentcheck>
                                        <xf:react content="{$description}" link="resources/update/react" list="< .js-resourceBody | .js-reactionsList" />
                                    </xf:contentcheck>
                                    </div>
                                </xf:if>
                            </xf:contentcheck>
                        </div>
                    </xf:if>

                    <div class="reactionsBar js-reactionsList {{ $description.reactions ? 'is-active' : '' }}">
                        <xf:reactions content="{$description}" link="resources/update/reactions" />
                    </div>

                </article>
            </div>
        </div>
    </div>


Then i have reduced my template nd_link_view to

Code:
{{ dump ($link) }}

    <div class="block-container">
        <div class="block-body lbContainer js-linkBody"
            data-xf-init="lightbox"
            data-lb-id="nd_link-{$link.link_id}"
            data-lb-caption-desc="{{ $link.User ? $link.User.username : $link.username }} &middot; {{ date_time($link.insert_date) }}">
            
            <div class="linkBody">
                <article class="linkBody-main js-lbContainer">
                    
                    <xf:if contentcheck="true">
                        <div class="actionBar">
                            <xf:contentcheck>
                                <xf:if contentcheck="true">
                                    <div class="actionBar-set actionBar-set--external">
                                        <xf:contentcheck>   
                                            <xf:react content="{$link}" link="news-directory/react" list="< .js-linkBody | .js-reactionsList" />
                                        </xf:contentcheck>
                                    </div>
                                </xf:if>
                            </xf:contentcheck>
                        </div>
                    </xf:if>
                    <div class="linkBar js-reactionsList {{ $link.reactions ? 'is-active' : '' }}">
                        <xf:reactions content="{$link}" link="news-directory/reactions" />
                    </div>
                </article>
            </div>
        </div>
    </div>


The Resource_view has rections, my template not.
If i compare the dumps, it seems that everything is there in both.
Now i have no more ideas. :(
Any idea what else i can check, plase?
 
Top Bottom