Advertisement:

Author Topic: Like Posts  (Read 334824 times)

Offline jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1060 on: March 22, 2020, 03:35:57 PM »
I understand. How to edit the php code? Would you be able to create a guide? Probably many people would like to change the position of this link.

The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1061 on: March 23, 2020, 01:50:55 PM »
To remove the Like stats link from the menu bar, I need to remove this code?

Sources/LikePosts/LikePosts.php

Code: [Select]
self::$LikePostsUtils->checkJsonEncodeDecode();
}

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;
}
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1062 on: March 23, 2020, 02:17:35 PM »
After global $scripturl, $txt, $user_info, $modSettings;


Add
Code: [Select]
return;
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1063 on: March 23, 2020, 02:33:03 PM »
Properly?

Code: [Select]
global $scripturl, $txt, $user_info, $modSettings; return;
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1064 on: March 23, 2020, 03:01:06 PM »
proper would be on it's own line
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1065 on: March 23, 2020, 03:47:49 PM »
Do you mean this way?

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

return;

Full code:

Code: [Select]
self::$LikePostsUtils->checkJsonEncodeDecode();
}

public static function addMenuItems(&$menu_buttons) {
global $scripturl, $txt, $user_info, $modSettings;

return;

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;
}
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1066 on: March 23, 2020, 04:02:41 PM »
yes
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1067 on: March 24, 2020, 05:38:12 AM »
Okay. And I added a link to the Like stats in the right place on the menu bar using the Ultimate Menu modification. Big thanks to live627 for creating this modification.

I would like to know why the word "liked" that appears in the popup notification window is not in the LikePosts.english.php file? I create a translation into my language and unfortunately the word remained in English.

Username liked Re: Some topic
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1068 on: March 24, 2020, 09:23:58 AM »
Hmm the liked text is hardcoded it looks like scripts\LikePosts\LikePosts.js line 407 and 421

scripts\LikePosts\LikePosts.min.js
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1069 on: March 24, 2020, 09:58:04 AM »
It's so a bit strange in this mod, the whole mod can be translated except for one word. ::)

The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1070 on: March 24, 2020, 10:04:09 AM »
Yes it is but I didn't make it orginally.
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1071 on: March 24, 2020, 01:48:48 PM »
I understand. I wonder how SMF 2.1 will be released, this version 2.1 has its own like system and will all those likes from Like Posts modification be imported to the like system in SMF 2.1?
« Last Edit: March 24, 2020, 02:01:40 PM by jsx »
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,150
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1072 on: March 24, 2020, 02:14:51 PM »
Maybe would have to build it. Or someone might have made a script already to import it.
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 jsx

  • Full Member
  • ***
  • Posts: 438
  • Gender: Male
Re: Like Posts
« Reply #1073 on: March 24, 2020, 02:22:55 PM »
It would be cool if there was such a possibility. :)
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!