Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Social9 - Sharing buttons do not appear on first post

Like the title says, I've installed Social9 1.1 on Vanilla 2.3 and it works alright. The sharing buttons appear under every comment but not under the thread starter post (first post). Is this intended behavior? Can it be changed?

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    It looks like the plugin only targets the comments and not the Discussion

    public function DiscussionController_AfterComment_Handler($Sender){

    You could always try to add something like this as an added function, and copy all the stuff from the comments one into the new one ... like this and see if that works..

    public function DiscussionController_AfterDiscussion_Handler($Sender){
    
            $hsharing_theme = trim(C('Plugins.SocialShare.Horizontalsharingtheme'));
            $vsharing_theme = trim(C('Plugins.SocialShare.verticalsharingtheme'));
            if (C('Plugins.SocialShare.Enablesocialsharing') == true) {
                $vsharing_position = trim(C('Plugins.SocialShare.Verticalsharingposition'));
                if ($vsharing_position == 'topleft') {
                    $position1 = 'top';
                    $position2 = 'left';
                } elseif ($vsharing_position == 'topright') {
                    $position1 = 'top';
                    $position2 = 'right';
                } elseif ($vsharing_position == 'bottomleft') {
                    $position1 = 'bottom';
                    $position2 = 'left';
                } else {
                    $position1 = 'bottom';
                    $position2 = 'right';
                }
                $position = $position1 . ":0px;";
                $sharing_offset = (C('Plugins.SocialShare.Sharingoffset'));
                if (isset($sharing_offset) && trim($sharing_offset) != "" && is_numeric($sharing_offset)) {
                    $position = 'top:' . $sharing_offset . 'px;';
    
                }
                if (C('Plugins.SocialShare.Enablehorizontalsharing') == true) {
                    // if (GetValue('Type', $Sender->EventArguments) != 'Comment') {
                    if ($hsharing_theme == 'responsive' || $hsharing_theme == 'horizonSharing32' || $hsharing_theme == 'horizonSharing16' || $hsharing_theme == 'single-image-theme-large' || $hsharing_theme == 'single-image-theme-small') {
                        echo '<div><div class="os-share-widget-interface""></div></div>';
                    } else {
                        echo '<div><div class="os-counter-widget-interface"></div></div>';
                    }
                    // }
                }
                if (C('Plugins.SocialShare.Enableverticalsharing') == true) {
                    // if (GetValue('Type', $Sender->EventArguments) != 'Comment') {
                    if ($vsharing_theme == '16VerticlewithBox' || $vsharing_theme == '32VerticlewithBox') {
                        echo '<div><div class="os-vertical-share-widget-interface" style="position:fixed;' . $position . $position2 . ':0px;"></div></div>';
                    } else {
                        echo '<div><div class="os-vertical-counter-widget-interface" style="position:fixed;' . $position . $position2 . ':0px;"></div></div>';
                    }
                    //}
                }
            }
        }
    
  • Doesn't work. It won't let me initiate it from the dashboard

Sign In or Register to comment.