Topic-icon Change order of social buttons in K2 item

Active Subscriptions:

None
9 years 1 month ago #52404 by kappadev
Hi,

i need to change the order of social buttons inside a K2 item page. I need first the Facebook Like then share, twitter etc
Alex told me a way in the past to change the order of some code inside /plugins/content/jfbccontent/jfbccontent.php but now this code doesn't exist anymore in the latest JFBConnect version so i can't apply the old fix.

Could you tell me please what line of code and where i have to change it in this last version 6.3.0?

Thx
The topic has been locked.
Support Specialist
9 years 1 month ago #52408 by mel
Looking at your post history, this looks the thread you're referring to:
www.sourcecoast.com/forums/jfbconnect/jf...ntent-plugin-k2-like

In the newest version of the content plugin around line 212, here's the existing code:
if(!empty( $likeHTML ) || !empty( $likeExtraHTML ))
{
   $btnHTML .= '<div style="position: relative; top:0px; left:0px; z-index: 99;" class="scsocialbuttons '.$buttonStyle.'">';
   $btnHTML .= $likeExtraHTML;
   $btnHTML .= $likeHTML;
   $btnHTML .= '</div><div style="clear:both"></div>';
}

Try changing it to switch the like button and other buttons like in Alex's previous suggestion:
if(!empty( $likeHTML ) || !empty( $likeExtraHTML ))
{
   $btnHTML .= '<div style="position: relative; top:0px; left:0px; z-index: 99;" class="scsocialbuttons '.$buttonStyle.'">';
   $btnHTML .= $likeHTML;
   $btnHTML .= $likeExtraHTML;
   $btnHTML .= '</div><div style="clear:both"></div>';
}

Note, this is untested, so let us know if that doesn't work.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 1 month ago #52411 by kappadev
Thanks a lot, i did what you suggested and it works perfect!!!

Thank you very much
The topic has been locked.
Support Specialist
9 years 1 month ago #52416 by mel
Great, glad that fixed you up.

-Melissa
The topic has been locked.