Like Posts

Started by vbgamer45, June 29, 2013, 09:29:03 AM

Previous topic - Next topic

gorbi

instead of Ukrainian Russian

gorbi

global $txt;

//front end strings strings
$txt['lp_string_you_liked'] = 'You liked this';
$txt['lp_string_you'] = 'You &';
$txt['lp_string_other_people_liked'] = '%1$d other person liked this';
$txt['lp_string_other_multiple_people_liked'] = '%1$d other people liked this';
$txt['lp_string_people_liked'] = '%1$d person liked this';
$txt['lp_string_multiple_people_liked'] = '%1$d people liked this';

$txt['lp_like'] = 'Like';
$txt['lp_unlike'] = 'Unlike';
$txt['lp_total_likes'] = 'Лайков';
$txt['like_show_notifications'] = 'Повідомлення про нові лайки';

shadav

I don't know but according to my translator the last two lines are ukrainian
however the rest is in english and needs to be translated

gorbi

Yes, two last line ukrainian, but displayed in Russian. This is problem

Fat Rat

Hello, this mod is failing for me using the Whitebox theme, any help much appreciated.

vbgamer45

You will need to make that change manually to the index.template.php of the theme.

Look at the default theme and where it edits and try to make the same on that theme.
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

Fat Rat

Thanks for the prompt response. Where/how can I see the required changes?

vbgamer45

You can upload package to https://www.smfhacks.com/smf-package-parser.html and get the theme edits.
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

Fat Rat

Thanks again, the only change that the parser calls out has been added by the installation. I have all of the options to set permissions for the Like Posts mod just not the button in the posts.

Shades.

I'm confused on the instructions here on how to remove the link in top menu: https://www.simplemachines.org/community/index.php?topic=506743.msg4049814#msg4049814. Could someone break it down for me?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

vbgamer45

It's part of a hooks file requires editing the LikesPost code


File: Sources/LikePosts/LikePosts.php


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


Add after

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

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

jsx

@vbgamer45

On my forum the Board tab contains the following information:

Lorem ipsum has received 162 like(s) so far

The board contains 226 different topics, out which 48 topics are liked. Furthermore, these topic contains 2308 different posts, out of which 48 posts are liked so far. Few of the liked topics from it

So this board contains 226 topics and 48 topics are liked in this board. There are 2308 posts in this board:



So it seems that there is a mistake here:

Furthermore, these topic contains 2308 different posts

should be:

Furthermore, these board contains 2308 different posts

What do you think?

jsx

I noticed that in Likes statistics in the Topic tab, the counting of likes does not work correctly.

Here is the information that the most popular topic received 17 likes:

The most popular topic has received 17 like(s) so far

Indeed, there are 16 likes in this topic, not 17.

So in the modification management in the Recount Like Stats tab I ran 3 tasks and unfortunately the Topic tab in the statistics still shows information about 17 likes of the topic.

jeepwrangler2k

The mod keeps failing on my default theme


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jeepwrangler2k

Quote from: Kindred on May 10, 2021, 08:55:24 AM
https://wiki.simplemachines.org/smf/Error_in_mod_installation

Is there any other way to fix this other than..?

You can still try to install the mod, but you will have to make changes manually to the "failed" files.

I'm not very savvy at working manually with forum files and would most likely mess it up.

jeepwrangler2k

#1137
Does anyone know where in this file I would put a <add after> and </add after> in the index.template.php ?

When I click on the add after - test failed I see the following:

but this code does not appear to be in the index.template.php file instead it's showing me code from the Modification.xml instead - so which file needs updating?

FILE: https://undergroundmusiccompanion.com/index.php?action=admin;area=packages;sa=showoperations;operation_key=41;package=LikePosts2.2.zip;filename=installer/Modification.xml

Code: (Find)

<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

[b]Code: (Add After)[/b]

if(!empty($modSettings['lp_mod_enable'])&&
!empty($modSettings['lp_show_like_on_boards']) &&
LikePosts::$LikePostsUtils->isBoardIncluded($context['current_board'])) {

$context['like_posts']['single_topic_data'] = LikePosts::$LikePostsUtils->isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] &&
LikePosts::$LikePostsUtils->isAllowedTo('lp_can_like_posts')) {

echo '
<a class="', $context['like_posts']['single_topic_data']['already_liked'] ? 'like_link' : 'unlike_link', '" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeHandler.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LikePosts::$LikePostsUtils->isAllowedTo(array('lp_can_view_likes', 'lp_guest_can_view_likes_in_boards'))) {
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.likeHandler.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';
}

echo '
</div>';
}



Please use the code tags when posting code. ~ Steve

jsx

Quote from: jsx on March 24, 2020, 01:48:48 PMI 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?

Quote from: vbgamer45 on March 24, 2020, 02:14:51 PMMaybe would have to build it. Or someone might have made a script already to import it.

@vbgamer45

Have you thought about creating a tool that allows to import likes to SMF 2.1 from the Like Posts mod?

vbgamer45

Haven't thought about.
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

Advertisement: