Question related to: Role to Group Synchronisation https://prnt.sc/oAjCyl5xTH01

If I change a user's role in Wordpress, should this plugin automatically change the forum user group?

If this is the case, then nothing happens. After changing the user's role on the site, nothing happens on the forum.

Also, is there any way to remove target _blank from forum posts?

    Anomalien After changing the user's role on the site, nothing happens on the forum

    Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum. Do the other features work correctly?

    If you have SSH access you could try running php flarum kilowhat-wordpress:sync:users <wordpress user id> (replace <wordpress user id> with the integer ID) in the Flarum folder to force a user synchronisation and see if anything happens.

    Anomalien Also, is there any way to remove target _blank from forum posts?

    You mean the link back to the WordPress post in the preview? I currently don't have any setting for that, but I could add something with an update.

      clarkwinkelmann

      Hi all, I successfully updated two Flarum installations with WP integration to the new 2.01 extension.

      Given that I generally find the "update instructions" less than clear, I thought I'd provide the details of what I did to complete this:

      1) you should first follow the information Clark linked to at https://flarum.org/dashboard/subscriptions
      2) I had to log in with my Extiverse email info to get to an account page to go there
      3) I then followed the steps of the Instructions BUTTON to create a new token for the subscription
      4) I then used my hoster CPanel / Terminal program to get to the folder of the Flarum install
      5) I then ran the composer command with the super long token after copying it there and pasting it as plain text
      6) I then ran normal Flarum update commands to update the whole installation
      7) this picked up Clark's new 2.01 version and higher Backoffice version automatically
      8) I then was able to log in as usual as an Admin and confirm the WPI update was successful, with the WPI panel again showing under the normal Admin tabs, and it confirmed that my SSO settings were working properly

      I think that was about it, and it is working as expected.

      Thought I'd share, and I continue to highly recommend ADDING a forum to a WordPress site with this WPI extension and Flarum itself!

        clarkwinkelmann You mean the link back to the WordPress post in the preview? I currently don't have any setting for that, but I could add something with an update.

        Yes. I think sometimes it's better to use without _target for "smoothness". This creates the illusion of the two systems as one.

        clarkwinkelmann Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum. Do the other features work correctly?

        Understood. But for some reason synchronization does not occur. I'll try to update manually from the consoles and then I'll write.

        One small bug: If you turn "Only allow WordPress login" on and off, forum registration will still be closed, but it must be opened.

        Btw, here's interesting solution for iframe height: https://iframe-resizer.com/introduction/

          Anomalien If you turn "Only allow WordPress login" on and off, forum registration will still be closed

          This is intentional. Because first off it's complicated to "remember" the value of the setting before the change, I would have to store that in the background, and make sure it's still valid even if the extension gets disabled and re-enabled later, or some other change. And since the sign up setting can still be changed anytime by the admin, I would also need to decide what to do if it was manually changed in the meantime. And second even if I went the trouble to do all this, I still don't want to unexpectedly re-open registrations if the forum owner doesn't expect it, so I would have to add a whole UI to ask the admin whether they wish to re-enable sign up.

          So to save all this work I decided to not implement sign up re-opening, leaving it for the admin to decide.

          But I kept the auto-close because there's no reason to keep it open when enabling the WP-only sign up, and if the step was skipped it would allow users to circumvent the protection they think they just enabled.

          Anomalien here's interesting solution for iframe height

          I am familiar with that library. It was in fact part of the plugin in one of the early betas. It was also part of the flarum/embed extension but I think it's not included anymore looking at the source code.

          But it doesn't work correctly with Flarum's discussion infinite scroll. If the iframe expands, it completely breaks the ability to load more pages. And if it somehow worked, then it would prevent reaching the footer of the WordPress site if a discussion has thousands of comments.

          I am researching solutions to make the iframe more seamlessly integrate with WordPress. Unfortunately it seems like we have to choose between infinite scroll and auto height, and keeping Flarum's built-in infinite scroll is the least work and least risky solution for now.

          I will probably add options for a paginated iframe view in the future, as well as maybe a "summary" view that only shows the top comments and the composer and forces you to open the Flarum page to browse through the full list.


          NetConfig it's unfortunate that the Extiverse-Flarum.org migration happened right about at the same time as my WPI V2 release, as this causes a number of extra steps to be needed 😅 I haven't re-written my upgrade guide since those are really 2 different things, and if you have multiple Extiverse premium extension you luckily only need to update the Extiverse repository once.

            Got it.

            clarkwinkelmann I will probably add options for a paginated iframe view in the future, as well as maybe a "summary" view that only shows the top comments and the composer and forces you to open the Flarum page to browse through the full list.

            Great ideas.

            clarkwinkelmann

            Thanks Clark - yeah, the timing of multiple "new" things happening at once made it more interesting.

            I would recommend to all users who are interested in the WordPress Integration or who are looking at these update things to ALWAYS start with a full regular update of the Flarum installation in your Terminal software on your hoster panel.

            It seems that starting there "gets you back on track and in a good place" from where you can then do the remaining steps that need to be completed, as applies in the situation.

            I am so used in WordPress of doing backups and updates weekly, on Saturday mornings for the sites I manage.

            With Flarum, it is more of an under the hood thing with the Terminal method.

            I am sticking to the Terminal and then composer update process, even though I have the Extension Manager active on the Admin Panel also.

            I have not had much luck in seeing that work correctly, essentially not wanting to update some extensions I think.

            So I see that more as informational than as an Update tool.

            Your mileage and situation may be different, but I like safe and consistent for these things.

            Big picture, I worked through the updates, am happy that the WordPress Integration settings are back on the normal Admin Panel which is more standard, and all is well.

            Thanks for all your hard work, Clark; it is appreciated by a happy WPI subscriber.

            10 days later

            clarkwinkelmann Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum

            I want to clarify that this works correctly.

            One small bug. If the forum is in a subfolder (domain.com/forum) and you write a comment from the WordPress comment section and click Preview, then the URL duplicates the subfolder: domain.com/forum/forum/wordpress-embed/7043-etc

            4 days later

            Hi. I would like to integrate a Wordpress website login system to Flarum and as far as I undertand this extension will do that. Before I pay for that I would like to ask if it will work in my case that I have sites on the same domain but both are subdomain. Ex: subdmain1.my-domain.com for Wordpress site and subdomain2.my-domain.com for Flarum site.

              ivangneiding yes that's perfect. You will be able to use any of the global login mechanism including cookie. The extension should even guess the cookie domain automatically on activation and set the settings to their correct value.

                clarkwinkelmann I have installed and configured it and it's working. Well done, nice extension!
                I just would like to ask you if it is possible to resize the Wordpress login popup? I am asking because we have a costumized login page and the fields are not totally visible as you can see in the print below. A little resize on this popup would work great.

                13 days later

                @ivangneiding

                Hi Ivan, I have the Flarum integration working very nicely on a site and can likely make a suggestion here.

                You need to use the Chrome Developer tools to figure out how to fix this, and then add a little custom CSS to your Wordpress theme that controls the display details of this popup.

                Steps:
                1) activate the popup
                2) put your cursor over a section in the pop-up, and right-click your mouse button
                3) look in the CSS details in the Developer tools area for "where you are in the CSS" details
                4) activate the pointer thing on the top-left of the Developer tools, so you can point at things in the pop-up and move around in the CSS file in the Dev panel
                5) do this towards the top of the pop-up so that the entire login pop-up is highlighted
                6) in my CSS< I now see a section that is labeled: #login

                The code there is:

                #login {
                width: 314px;
                padding: 5% 0 0;
                margin: auto;
                }

                You can adjust the width pixels by entering a number or by highlighting it and using the down-arrow to reduce the width, as it will lower the pixels number for you.

                When you have determined what width should work correctly, then add code that looks like this to your Custom CSS section in the WP theme, however that works for your theme:

                #login {
                width: 250px !important;
                }

                The !important designation will force this setting over the default width.

                After saving the Custom CSS with this update, check how it looks.

                Another option is to add a max-width: 250px; setting instead of changing the width number.

                I understand that to be an overall limit that works even if the width setting itself is higher.

                SECOND suggestion.

                You can also right-click and inspect the area of just the login fields themselves.

                You should then see a CSS area labeled as

                .login form

                followed by a section with parameters between a starting { and ending }.

                You can also play with these details in the Dev tools panel to see if you would want to fine-tune anything else there.

                One word of caution: you have to be careful with CSS overrides as things may end up working or looking differently on different screens, phone, tablet, desktop, different screen resolutions and magnification, browser zoom settings, etc.

                So generally speaking, it seems that fewer direct overrides are more prudent.

                Hope this helps for your situation.

                ONE more thing: Clark's forum integration with Wordpress is terrific indeed. I have suggested that he should see if he can get the plugin part published on Wordpress.org to get more visibility in the pure WP world.

                Have fun!

                BTW, it seems that you have not enabled the Only Allow Wordpress Login feature in the Admin panel for the WPI extension.

                I see a Flarum login pop-up first, on your site, and then the WP login pop-up when I click the Login with Wordpress button.

                I would look at enabling the Only Login with WP feature, so users go directly to the 2nd pop-up.

                I have customized mine also with a plugin that replaces the WP logo with my site's favicon.

                https://wordpress.org/plugins/change-login-logo/

                That way, the user login experience from the Flarum side is nice and clean.

                FYI

                21 days later

                @clarkwinkelmann Idea for a feature: when a new wordpress article is created I would love it if a new post would immediately appear on my flarum forum with a link to that article and perhaps a blurb or small section of the wordpress article... just an idea 😉

                  LostCat do you mean without using the comments integration?

                  When you use the comments integration there's a setting to optionally set the last reply date of new comment threads to the current time, which will essentially achieve what you describe, by pushing the new Flarum discussion to the top of the discussion list.

                  18 days later

                  Hi @clarkwinkelmann!
                  I was trying to purchase your plugin for my development build, but there is an issue with my email address verification on this website. Is there any other way I can make the purchase?

                  Thank you!

                    Giochan I cannot manually create or approve accounts on Flarum.org, but if you share your username or email address I can forward the question to the Flarum team. You can use the support email on my website if you want to share it privately.

                    Have you double checked your spam folder? If you were able to create an account on this forum there shouldn't be any issue creating a Flarum.org account, maybe there was a temporary issue.

                      luceos
                      The verification problem is resolved. Thank you very much Luceos!

                      One more thing, there is an interesting bug or behavior with the website:
                      If I scroll up to the first post of this thread and click on the "See and purchase on Extiverse" link, it will take me directly to the purchase page - https://flarum.org/extension/kilowhat/flarum-ext-wordpress with my account logged in. All good there and I can make the purchase.

                      But, if I scroll up to the first post of this thread and instead click on the "Check out the full documentation at https://kilowhat.net/flarum/extensions/wordpress" link and on the next page click on the "See and purchase on Flarum.org" link it will take me to the same purchase page as in the first case - https://flarum.org/extension/kilowhat/flarum-ext-wordpress but this time my account won't be logged in and it would be impossible to make the purchase even after logging in and repeating this pattern again.

                      Just something I thought you would like to know.
                      Cheers!

                      22 days later

                      I've purchased the subscription and experimented with the plugin/add-on settings, and I love it! I’ll be upgrading to an annual subscription soon!

                      The only issue I'm facing at the moment is that the comments section loads the entire Flarum forum page instead of just the comments snippet, as shown in the tutorials and this site. The WordPress builder I'm using doesn’t auto-load the comments, so I’ve opted to use the shortcode method [flarum_comments].

                      link to image