News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Like Posts

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

Previous topic - Next topic

gorbi

I am using mod like posts ver. 2.0.5 by Joker. How to upgrade to this mod while maintaining the number of likes?

vbgamer45

Uninstalling shouldn't remove the links. Unless you check the option to remove associated data
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

kilk

Epic mod vbgamer! Love it! Still using it!
Elddem The MMORPG - https://www.elddem.com | Denarius (D) Cryptocurrrency - https://www.denarius.io | BlockForums - Cryptocurrency Community Forums - https://www.blockforums.org

GL700Wing

#1083
Quote from: vbgamer45 on January 14, 2020, 06:17:42 PMHmm looks like this mod uses hooks should add it after the logout button

sources/likeposts/LikePosts.php

    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)
        );
    }

The  'Like stats'  menu button is being inserted as the first menu button because of a minor bug in the placement code - in order to insert the 'Like stats' button before the 'Logout' button the initial value of $initPos needs to be '-1'.

In the file ./Sources/LikePosts/LikePosts.php
Find:
        // insert before logout
        $initPos = 0;

Replace With:
        // insert before logout
        $initPos = -1;
Life doesn't have to be perfect to be wonderful ...

Sectomy

Hi,

i have the Sunrise Theme and theres a little Problem with the Notification List in die "Menue"... is there any way to remove those Notification Entries in that menue ?
"show Like information"

Welicak94

Hi, vbgamer45.

I have upgraded my SMF site and I had "Like Posts" mod installed. I do know that after upgrading, modifications are "removed". But, when I do install this mod again, I have two "Like" buttons sitting one to another. I believe I have doubled codes right now, but can you tell me which file I should edit and what part of code exactly?
Before installing it again, I do already have one "Like" button, but it does not work. When I click on it, nothing happens.

Thank you in advance.

vbgamer45

This mod for the menu buttons does not edit files...Uses hooks which means it calls code at runtime without file edits.
Try to uninstall the mod again and see if it disappears.

If not you will have to manually remove the hooks with this mod https://custom.simplemachines.org/mods/index.php?mod=3285
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

Welicak94

Thank you for you reply, sir.

I had done both advices, but unfortunately, I'm still facing problems.
After failed uninstalling and re-installing, I tried a mod you linked.

I did deleted all the hooks naming "LikePosts", after that - this text appeared after the post:
"Class 'LikePosts' not found" .
Installing after all of the deleted hooks, got back old problem - two buttons sitting to one another.

Maybe I'm missing some hook which need to be deleted?

vbgamer45

Unfortunately with hooks not easy to fix will require going into the smf_settings table and removing entries.
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

Welicak94

Sorry for troubling you.
I believe you thought about MySQL table.
These are all rows containing "like" word in the "smf_settings" table.
Should I delete all of them?

Arantor

No, if you have duplicate installations, you need to find the settings marked integrate_ and change those.

Welicak94


dan3

Currently running Like Posts 2.0.5 and SMF 2.0.14

When I click on remove duplicate likes it used to run the task and do that. But recently it started just freezing up and requiring the whole forum to be rebooted from AWS.

Any ideas? Will upgrading to Like Posts 2.2 fix anything?

vbgamer45

How many likes on your forum.  Freezing do you mean like long run time on the sql statements? Or page just goes white?
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

LWillisjr

I just found this mod and very interested in it. I just installed on my site which is running SMF version 2.0.17
I installed the mod, and it shows up in the admin panel. I enabled it for a couple of boards as a test but I don't see the "Like" button appearing anywhere. What am I missing? Anyone else have this working on 2.0.17?

DreadPirateRoberts

Quote from: LWillisjr on August 12, 2020, 09:29:32 PM
I just found this mod and very interested in it. I just installed on my site which is running SMF version 2.0.17
I installed the mod, and it shows up in the admin panel. I enabled it for a couple of boards as a test but I don't see the "Like" button appearing anywhere. What am I missing? Anyone else have this working on 2.0.17?
yes its working on my site currently.  Try going on your board setting and enable like posts button
Welcome to Agora Road's Macintosh Cafe || A retro design vaporwave community forum! Enjoy your stay!

shawnb61

I have the same minor issue GL700Wing reported above.  The stats button is to the left of the Home button.

Took a minor tweak to fix. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

s10dulkar

hi mate like pretty url some issue with this plugin also getting error shown in image after installing and activating like posts mod

s10dulkar

Quote from: s10dulkar on December 09, 2020, 06:35:11 AM
hi mate like pretty url some issue with this plugin also getting error shown in image after installing and activating like posts mod

I am able to see like button on my posts but not clickable

vbgamer45

For the function not as string can you check your forum's error log and see if it says a line number.
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: