Barry (@barryhughes-1)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 61 total)

  • Barry
    Participant

    @barryhughes-1

    Is there a way to remove the widget and just have a page for folks to go to instead?

    A potentially quick and easy solution would be to create a page and embed the widget within it. To help with that, you might use this plugin or some other similar one:

    Widget Shortcode

    (I haven’t used it, and can’t vouch for it…and probably there are also block plugins that do much the same.)


    Barry
    Participant

    @barryhughes-1

    Gotcha!

    Well (and I’m admittedly writing this without ever having worked with GamiPress, but I did just take a quick peek at their code) it certainly seems like something you could do.

    The gamipress_award_points_to_user action (a hook that your code can ‘listen’ for) would let you detect the award of points and you could then examine how many points they have etc and, based on that, take a further step such as changing their forum permissions.

    Definitely seems achievable 🙂


    Barry
    Participant

    @barryhughes-1

    I have zero knowledge of GamiPress…but let’s park that part of the question for a moment 🙂

    Like WordPress itself, bbPress supplies a plethora of hooks that will let you write code that listens for various events—such a new topics being created or replies being added—at which point your code can scan for keywords and interact in various ways. I’m not sure exactly what you’re picturing, but having the bot add replies of its own or perhaps even trigger currency transfers in the context of GamiPress are all possibilities.

    How easy this would be I guess really depends on what sort of tasks you want your bot to perform and what conditions you wish to be met before it performs them, but certainly bbPress/WordPress by themselves provide a nice foundation to build on top of.


    Barry
    Participant

    @barryhughes-1

    …Though, with that said, it looks like the aforementioned plugin hasn’t been updated in 8 years, so, perhaps it won’t be possible to get assistance from the authors at this point. Still, verifying if that is the cause of these issues is probably worthwhile.


    Barry
    Participant

    @barryhughes-1

    Hey there @wproyal,

    Do you happen to be using the GetShopped Support Forums plugin? The reason I ask is I see hooks or functions in the error message you shared as follows:

    bbps_lock_to_author

    bbps_get_all_premium_topic_ids

    The bbps_* prefix is used by the plugin I mentioned (though it’s entirely possible it is also used by other plugins). So, a good starting point toward resolving this could be to temporarily deactivate that plugin, if you can, and see if things clear up.

    If that does fix things and you still need this plugin, perhaps a good immediate step would be thinking about what recently changed to introduce the problem (an update either to it or to bbPress itself? A change in some custom code someplace? A settings change?) and then think about ways to roll back.

    Of course, you could also reach out to the author/support team for the GetShopped plugin and see if they can offer help with this 🙂


    Barry
    Participant

    @barryhughes-1

    Hmm, so are you just using WooCommerce Subscriptions or are you using something else to manage the restriction of content (such as WooCommerce Memberships)?

    The more detail you can provide about how you’ve configured things and what you’re using, the better the chance of receiving some solid help (though, like Robin noted, for ‘commercial’ plugins you may get more help and get it faster if you use the support channels they provide, as not everyone here will have used or will have ready access to commercial products) 🙂


    Barry
    Participant

    @barryhughes-1

    Hi @wout77!

    So running in a clean environment with no other plugins, etc, I don’t actually see the same thing.

    The login widget provided by bbPress is really just a simple (but customizable) wrapper around WordPress’s regular login process. Though you may not realize it, the username and password fields are simply passed to wp-login.php (and the reason you may not notice this is that a redirect is performed to take the successfully logged in user back to whatever page they started on).

    With that in mind…my hunch is that this is not a problem with bbPress, but rather with another plugin (or perhaps even your theme).

    If you are unsure what’s causing this and there are no obvious sources of the problem (such as a Captcha plugin), it could be worth doing a round of selective deactivation of other plugins and/or your theme to try and find out what’s causing this. Make sense?


    Barry
    Participant

    @barryhughes-1

    I imagine somewhere in these forums there must be an example of code that will help with this, though my own initial search let me down. Even so, it’s certainly possible to do and here is a minimal example of the sort of code you could use:

    https://gist.github.com/barryhughes/1d52e7562e5d2e6f5121981a4babdd36

    To meet your individual needs it may need refinement or adjustment (every site is different, there could be factors for you, locally, that I don’t know about). It’s just a starting point.

    For those who might be tempted to use this but are unfamiliar with code in general, note that if you do copy this code to an existing file, such as your theme’s functions.php file, then you don’t need to copy the opening “<?php” tag—just place it somewhere after the existing tag in whichever file you are editing.

    In reply to: _oembed_ good or bad ?

    Barry
    Participant

    @barryhughes-1

    These are good questions but it might be this (the bbPress support forum) is the wrong place to ask them; if some of the entries you cited are coming from the menu editor, for example, and if the oembed meta is hanging around in relation to more than just forum posts, possibly it makes sense to take this to the WordPress forums?

    I’m only suggesting this because it would potentially widen the pool of people who can offer up ideas 🙂

    In reply to: _oembed_ good or bad ?

    Barry
    Participant

    @barryhughes-1

    Hmm, not sure.

    Do you know that the corresponding post has truly been deleted (as opposed to sitting in spam/trash, awaiting final clean up)?

    In reply to: I need help.

    Barry
    Participant

    @barryhughes-1

    OK, and are you in a position to take those testing steps a little further and deactivate everything except bbPress (and also switch to a default theme)?

    If you can do that, and things work, we then know the problem lies in one of your other plugins or with your theme and by reactivating them and testing you can probably figure out which one is the problem.

    You could even do this ‘in reverse’ if you want to avoid disruption on your live site. This service has a funny name, but poopy.life is really useful for this sort of thing. Start with a brand new WordPress install (it’s free, though it will only stay alive for 24hrs) and add bbPress but nothing else. Confirm it works as expected, and then start adding everything else that you have on your live site: see if you can figure out what exactly introduces the problem.

    In reply to: I need help.

    Barry
    Participant

    @barryhughes-1

    New forum posts, or new posts generally?

    What else is running on your site: for example, do you have anti-spam tools such as Akismet in place?

    Something that is often worthwhile is troubleshooting by deactivating all other plugins and switching to a default, unmodified theme: if you do this and things work as expected, it would indicate that the problem is being introduced by one of those other components (or by a combination of some of those components).


    Barry
    Participant

    @barryhughes-1

    Just to note, is_user_logged_in() ships as part of WordPress itself, there’s generally no need to redefine it from your own code (unless you are perhaps reimplementing the login system).


    Barry
    Participant

    @barryhughes-1


    Barry
    Participant

    @barryhughes-1

    Hmm, it’s possible there is some sort of conflict happening.

    It occasionally happens, for instance, that other plugins (or even your theme) generate additional admin menu entries at exactly the same position used by another plugin (in this case, bbPress). In such a case, one will ‘win’ and the other will not be visible. I don’t know that that is what is happening here, but it’s an example of the sort of conflict that is possible.

    Do you have a staging or testing site where you can deactivate all other plugins (except for bbPress) and switch to a default theme—do the admin menu items show up then?

    Alternatively, you could make use of the (humorously-named, but useful) poopy.life service to generate a brand new WordPress sandbox. It only stays alive for 24hrs, but that would possibly be enough time to see if you can install bbPress and use it successfully in a ‘clean’ environment. If you can, that would again indicate there is some kind of conflict on your live site.

    You could even troubleshoot ‘in reverse’ via this sandbox site, by incrementally adding your theme and other plugins and checking to see if any introduce this particular problem.


    Barry
    Participant

    @barryhughes-1

    Using 2.6-rc-7 (and testing against Twenty Seventeen) I don’t seem to experience the same problem: if I locate a copy of that same stylesheet within:

    themes/twentyseventeen/css/bbpress.css

    It is loaded as expected, instead of the default version.


    Barry
    Participant

    @barryhughes-1

    …Note, it does require PHP 7: your mileage may vary with older PHP runtimes.


    Barry
    Participant

    @barryhughes-1

    Interesting!

    Driven by curiosity, I put this plugin together. You could try installing and activating it: it should make it possible to use [topic-author] from both the new reply subject and body.

    It doesn’t do much else, though it could itself readily be extended (but perhaps the better course of action would be to see if the original author of bbPress Notify can make a change there or, if it is no longer receiving updates, fork it).

    At any rate, I hope this is helpful, if only as a starting point 🙂


    Barry
    Participant

    @barryhughes-1

    There are some different ways you might tackle this.

    https://gist.github.com/barryhughes/ae5ca5a4684f347e8ba81e88a6501801

    One is to use some code like I shared above, which could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.

    Alternatively, you could create a custom template override for loop-single-topic.php and make a change within the <p class="bbp-topic-meta"> section.

    If that’s of interest/if you think you might prefer the second approach, we could explore the code you’d need to add to make it happen 🙂

    In reply to: _oembed_ good or bad ?

    Barry
    Participant

    @barryhughes-1

    Hmm…well, I don’t think it’s anything nefarious.

    WordPress is testing to see if any URLs inside those posts point to content that can be embedded and—though in your case I’m guessing that mostly is not the case, because it sounds like the result is mostly {{unknown}}—it then caches the result of its tests for better efficiency.

    If you don’t need or want this, you can disable it. I haven’t needed to do this and so have not tried any of the following guides myself, but perhaps they’ll be useful to you:

    In reply to: My Ugly Website

    Barry
    Participant

    @barryhughes-1

    There are a few ways you might tackle this, but custom CSS is often a nice way to go, both because it’s “safer” than custom PHP and because you can easily tweak it to achieve a better fit. Plus, most themes make this really easy: simply navigate to Appearance ‣ Customize ‣ Additional CSS and add your code 🙂

    /* Remove the titlebar area on forum archive pages */
    .bbpress.forum-archive #page-titlebar {
      display: none;
    }
    
    /* Retain some whitespace for consistency with other pages */
    .bbpress.forum-archive #site-content {
      margin-top: 75px;
    }

    In this case, perhaps some rules like I’ve listed above could be a nice starting point?


    Barry
    Participant

    @barryhughes-1

    Nice, thanks for taking the time to share!


    Barry
    Participant

    @barryhughes-1

    Publishing a topic from the frontend works fine – BUT trace shows that $forum_id is set to zero.

    Ah yes, you’re right. That’s because “transition_post_status” fires before bbPress generates the meta data linking the topic (or reply) with its parent forum.

    So, during your callback, the information isn’t available (actually it is, you could grab the post parent value from the post object, but that’s not “the way”).

    Maybe try following Robin’s strategy 🙂


    Barry
    Participant

    @barryhughes-1

    Hi @antipole,

    Looking back at your original strategy, you only shared a fragment of your code – so it’s hard to be sure of this – but I’m wondering if the problem are the assumptions you are making about the type of $post your callback is receiving.

    https://gist.github.com/barryhughes/30bacb98b716ecaa864f0b6eaa7c051c

    Does a revised approach like the one I shared above work for you? It should give you the author ID (whether that is the author of the reply or the topic) and the forum ID. If you need to, you could add an extra test to confirm the status change reflects publication (vs a topic being set back to draft by an admin).


    Barry
    Participant

    @barryhughes-1

    The short and simple answer … is no 🙂

    bbPress is a plugin for WordPress and it requires many of the features and facilities that WordPress provides in order to function.

    What CMS are you using?

Viewing 25 replies - 1 through 25 (of 61 total)