• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 07:15:02 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Like Posts

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

Previous topic - Next topic

Dr Web

October 19, 2021, 09:37:29 AM #1160 Last Edit: October 19, 2021, 09:52:14 AM by Dr Web
Yes, I checked the boxes to force the installation on Core Theme.

I cleaned the files cache and now I already see in my profile the likes i have and i gave. Then I logged out as Admin but still couldn't see any like button. However i already can see on my message under my avatar the Total likes. 

The other issue on the Admin panel remains.
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

Dr Web

Well, I uninstalled because even when I added the code on modifications.xml file manually, nothing happened.

After uninstall the Mod on my Admin panel, the files and folders stayed there in the server and I needed to delete them manually.

Something weird is happening with this Mod. It's good and I want to use it, but something is not working.
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

Dr Web

Well, I need this Mod so I am trying again to install it.

I installed and during the installation once again i forced to install in the core theme. There were also two files saying to add after, these ones:

On installer/Modification.xml file.

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

Add after:
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>';
            }

Find:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
Add after:
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
            echo '
                    <li><span class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</span></li>';
        }

I did this and still don't see any Like button. On the Admin panel I still see the buttons as links like I said on my first post here.

I cleaned the Files' cache, and my browser's cache and data. And still no like button.

Any help would be greatly appreciated.

I attach my installer/Modification.xml file, so you can see if all is well there.
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

vbgamer45

Did you check permissions for likes for  member groups? 
No likes button for other meember posts?
It has been a while since I had this installed i don't remember the settings.
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

Dr Web

I checked permissions for all member groups, including guests. Only the stats nobody can see so the menu button doesn't show up.
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

Dr Web

No idea how to solve my problem? Still no Like button and on the Admin panel I still see the buttons as links like I said on my first post here.
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

Dr Web

Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

vbgamer45

I probably won't have time for a weeks. to look into 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

Advertisement: