News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Like Posts

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

Previous topic - Next topic

Dr Web

#1160
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

KarFırtınası

hello, I have applied everything but the like button does not appear in the message?

Steve

Applied everything meaning what? You set the general settings, went through the permission settings and the board settings?
DO NOT pm me for support!

shadav

also is it only your posts or are there other member posts? I haven't used this mod but I have a feeling that the like button is probably coded to not show to you on your own posts unless someone has liked it

so check another members post to see if it shows up there

also are you using a custom theme? if so when you installed the mod, did you click to install it onto the custom themes? does it show up on the default theme?

Steve

Quote from: shadav on December 20, 2021, 02:29:27 PMI haven't used this mod but I have a feeling that the like button is probably coded to not show to you on your own posts unless someone has liked it
I do use it and you are correct.
DO NOT pm me for support!

Jacky.vdv

Where can I change the button image.

Steve

#1173
Themes/default/css/LikePosts.css

This is my change to the Like/Unlike buttons:

.like_link {
background: #0682aa;
padding: 1px 5px;
color: #fff !important;
position: relative;
        border: 1px solid #0682aa;
        border-radius: 5px;
}

.unlike_link {
background: #0682aa;
padding: 1px 5px;
color: #fff !important;
position: relative;
        border: 1px solid #0682aa;
        border-radius: 5px;
}
DO NOT pm me for support!

RFD

Quote from: Steve on December 26, 2021, 08:41:13 AMThemes/default/css/LikePosts.css

This is my change to the Like/Unlike buttons:

.like_link {
background: #0682aa;
padding: 1px 5px;
color: #fff !important;
position: relative;
        border: 1px solid #0682aa;
        border-radius: 5px;
}

.unlike_link {
background: #0682aa;
padding: 1px 5px;
color: #fff !important;
position: relative;
        border: 1px solid #0682aa;
        border-radius: 5px;
}

Wanting to change the buttons, I applied your mod to one of my forums and it worked just fine.

When adding it to another forum, the mod would not take.  As long as there was a LikePosts.css file it would always default to the originally coded red buttons.  Weird.  In fact, if I had the modded LikePosts.css file and renamed the original as LikePostsOLD.css, the buttons still reverted to original red ones.  This is for the default theme, of course.

These are all 2.0.xx SMF releases.

Steve

You cleared your browser cache after making the change on the one that still showed the original button?
DO NOT pm me for support!

RFD

Quote from: Steve on January 06, 2022, 07:46:01 AMYou cleared your browser cache after making the change on the one that still showed the original button?

Yup, forgot about that - cleared cache and all is well.  Thanx!

Could an image, such as thumbs up/down be used instead of text?

GF2022

One question about LikePost and 2.0.19.

I upgraded to 2.0.19 manually, file by file: LikePost is working fine except for the function that show the list of users that liked a post.

Any solution for this?
If I unistall LikePost and re-install it in 2.0.19 will it work? Will I loose the old likes?


vbgamer45

First time this was reported. Anything in the error log.
Data is kept on uninstall.
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

GF2022

Quote from: vbgamer45 on January 27, 2022, 11:50:44 AMFirst time this was reported. Anything in the error log.
Data is kept on uninstall.
No error logged
Looks like it is a javascript problem

Advertisement: