Advertisement:

Author Topic: Like Posts  (Read 332058 times)

Offline Rob Lightbody

  • Charter Member
  • Jr. Member
  • *
  • Posts: 168
  • Gender: Male
  • Rob Lightbody, QE2 Story Forum administrator
    • The QE2 Story
Re: Like Posts
« Reply #1040 on: January 14, 2020, 03:09:10 PM »
...
Installed OK - but now I have the "Like Posts" button on my menu bar as the first thing - before Home - affects all users - and is very confusing!  (I instinctively click the first button on the menu bar when i want to go home!).
...

Is anyone able to help with this please?  Screenshot attached to explain.

Thank you very much!

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,838
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1041 on: January 14, 2020, 03:44:25 PM »
Do you want to remove from menu completely? Or change position?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Rob Lightbody

  • Charter Member
  • Jr. Member
  • *
  • Posts: 168
  • Gender: Male
  • Rob Lightbody, QE2 Story Forum administrator
    • The QE2 Story
Re: Like Posts
« Reply #1042 on: January 14, 2020, 05:47:36 PM »
Do you want to remove from menu completely? Or change position?

Move it's position, anywhere but first place!!

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,838
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1043 on: January 14, 2020, 06:17:42 PM »
Hmm looks like this mod uses hooks should add it after the logout button

sources/likeposts/LikePosts.php

Code: [Select]
public static function addMenuItems(&$menu_buttons) {
global $scripturl, $txt, $user_info, $modSettings;

if (empty($modSettings['lp_mod_enable']) || empty($modSettings['lp_stats_enable']) ||
!self::$LikePostsUtils->isAllowedTo(array('lp_guests_can_view_likes_stats', 'lp_can_view_likes_stats'))) {
return false;
}

// insert before logout
$initPos = 0;
reset($menu_buttons);
while (($key = key($menu_buttons) && $val = current($menu_buttons)) && $key != 'logout')
$initPos++;

$menu_buttons = array_merge(
array_slice($menu_buttons, 0, $initPos),
array(
'like_post_stats' => array(
'title' => $txt['lp_stats'],
'href' => $scripturl . '?action=likepostsstats',
'show' => true,
'sub_buttons'=> ''
),
),
array_slice($menu_buttons, $initPos, count($menu_buttons) - $initPos)
);
}
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro