Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,251 through 2,275 (of 32,461 total)
  • Author
    Search Results
  • #215152
    haddlyapis
    Participant

    Hi there,
    I want to import 150 users to my forum and subscribe them to a new “test” forum topic in order to check if the email notification is working (it stops after sending 100 emails).
    In order to do this, I use the plugin “import and export users and customers” to import a list of made-up users (username and email are all that is needed for columns in CSV file).
    Then I create a new “test” forum.
    Now I want to subscribe them all to this forum topic programmatically via MySQL.
    The issue is, I have looked at the SQL table and the only data that I can find on user subscriptions is the wp_usermeta where meta_key = 'wp__bbp_forum_subscriptions'. The meta_value shows the ID of the forum that users are subscribed to.
    The issue is that it seems to be no longer working. Is it a meta_value that BBpress no longer uses? If so, which one is used?
    If I take a random subscribed user (ID=17248) and check what they are subscribed to, the following query works: select * from wp_usermeta where meta_key = 'wp__bbp_forum_subscriptions' and user_id = 17248;. I can then see a list in the meta_value table of what they are subscribed to. But if I then (using the BBp Toolkit plugin) alter their subscriptions and e.g. unsubscribe them from a topic, go back to the DB and do the same query, it shows the same forum subscription IDs, even though there should be one less.
    Could you point me in the right direction of which table to query to alter the forum topic ids of a user please?

    #215140
    Robin W
    Moderator

    no code that works is clumsy !!

    #215136
    visuallycurious
    Participant

    Hey guys,

    I installed Bbpress on one of my multisites and i have used a plugin to allow users to register tto resgister rather than allowing registrations at the network level.

    I have used the bbpress shortcodes for the registration page and the login page however when i test registering as a new user it redirects me to a local-signup page which i assume is happening due to it being a multisite? Is there any way to have only one form that meeds to be filled in? Do i need a user and registration plugin?

    The main issue i have is that qhen i do complete the registration process thw new user reveives no email…

    I then added a plugin for Smtp, configured it and it works in itself but not diffrrence to the bbpress registration process.

    Not sure how to fix the issue, i also tried allowing users to register at a network level but made no difference?

    Do i need to add somethinking like the Ultimate user registrations plugin or wp forms? Will that make a difference?

    Im ising using latest version of wp and bbpress on my site…

    #215135
    athep
    Participant

    I finally got it to work clumsily

    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
    	<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    		<?php $subs[] = bbp_get_forum_id(); ?>
    	<?php endwhile; ?>
    	<?php $forumid = implode(', ', $subs); ?>
    	<?php echo do_shortcode('[bbp-display-topic-index template ="short" forum="' . $forumid . '"]'); ?>
    <?php endif; ?>
    #215132
    athep
    Participant

    @robin-w I visited your website and noticed all the amazing work you’ve done, thank you.

    What I’ve been trying to do all along was to get your shortcode [bbp-display-topic-index show='5' forum ='10,11,12'] to php so that the forums could be the IDs of the forums the user is subscribed to.. so an array

    I’ve been trying to get it to work to no avail, [bbp-display-topic-index show='5' forum ='$forum_id'] or the likes return nill or with all the topics from all the forums, not just the subscribed ones

    #215116
    Robin W
    Moderator

    ate you still running the threaded replies plugin I did a few days ago? that’s designed to work with threaded replies turned on, no idea what it does if you turn threaded replies off and leave it active.

    Both it and the code above hook to the same link.

    #215115
    kriskl
    Participant

    Hi Robin,

    Sorry to re-open this.

    the latest topics pagination works great! thanks to the code above,

    BUT when I turned off threaded replies. the normal pagination in topics is strange..

    here is what I mean

    https://opentuition.com/forums/

    the page numbers it shows are : 1, 2, 4
    instead of 1, 2, 3, 4, or 1,2, 4

    and when I go to some topic

    and click on page 3
    it shows like this:

    1, 1, 2, 3

    here is the example

    https://opentuition.com/topic/obu-period-40-results-post-your-comments-instant-poll/page/3/

    is there anything that can be done? do you think?

    thanks
    Kris

    #215096
    athep
    Participant

    Correction, I am getting the bbp_forum_title() that we passed but not <?php bbp_get_template_part( 'loop', 'single-topic' ); ?> that I was initially trying to filter.. No worries tho, one step closer

    #215095
    athep
    Participant

    @robin-w thank you for all the help, after a bit of tinkering I changed bbp_get_user_forum_subscriptions to bbp_get_user_topic_subscriptions and it worked flawlessly, thank you so much

    #215094
    athep
    Participant

    It’s still returning null, no output whatsoever. I even print_r($subs) inside the while loop and nothing shows up, I’m using the latest versions of bbpress and wordpress, the theme is a blank starter theme with only bbpress plugin activated

    #215093
    Robin W
    Moderator

    The $subs = explode(',' , $subs); turns the string in the database to an array.

    Can you confirm for the user selected that they have active subs?

    #215092
    athep
    Participant

    I have included $subs = explode(',' , $subs); and it’s returning nothing, it has no error or any output..

    The other error was Warning: in_array() expects parameter 2 to be array, bool given in ..../content-main.php on line 21

    Line 21 is <?php if (in_array($forum_id, $subs)) { ?>

    #215091
    Robin W
    Moderator
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
    <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?>
    <?php $subs = explode(',', $subs);
      <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
      <?php $forum_id = $bbp->forum_query->post->ID; ?>
    	<?php if (in_array($forum_id, $subs)) { ?>
        <p><?php bbp_forum_title(); ?></p>
    	<?php } ?>
      <?php endwhile; ?>
    <?php endif; ?>
    #215090
    Robin W
    Moderator

    hold on you haven’t got the line

    <?php $subs = explode(',', $subs);

    #215088
    athep
    Participant

    Same error indicating this line <?php if (in_array($forum_id, $subs)) { ?>

    #215087
    Robin W
    Moderator

    try

    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
    <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?>
      <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
      <?php $forum_id = $bbp->forum_query->post->ID; ?>
    	<?php if (in_array($forum_id, $subs)) { ?>
        <p><?php bbp_forum_title(); ?></p>
    	<?php } ?>
      <?php endwhile; ?>
    <?php endif; ?>
    #215086
    athep
    Participant
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
    <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?>
      <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
      <?php $forum_id = bbp_get_forum_id( $forum_id ); ?>
    	<?php if (in_array($forum_id, $subs)) { ?>
        <p><?php bbp_forum_title(); ?></p>
    	<?php } ?>
      <?php endwhile; ?>
    <?php endif; ?>
    #215085
    Robin W
    Moderator

    can you post your corrected code

    #215084
    athep
    Participant

    There were a few syntax errors I fixed with your code, and the error message ends with the files location stating that the error comes from the line ‘<?php if (in_array($forum_id, $subs)) { ?>’

    Your second snippet returns null, nothing, maybe bbp_forum_title() won’t work in this context?

    #215081
    athep
    Participant

    Hello Robin, thank you for your reply. I got this error Warning: in_array() expects parameter 2 to be array, bool given in... I’d appreciate helping me figure it out if possible

    #215079
    Robin W
    Moderator

    untested but something like

    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
    <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?>
      <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
      <?php $forum_id = bbp_get_forum_id( $forum_id ); ?>
    	<?php if (in_array($forum_id, $subs)) { ?>
        <p><?php bbp_forum_title(); ?></p>
    	etc.
    	<php } ?>
      <?php endwhile; ?>
    <?php endif; ?>
    #215072
    athep
    Participant

    Hello everyone,

    I have this loop in my custom theme that lists the forums a user is subscribed to

    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
      <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
        <p><?php bbp_forum_title(); ?></p>
      <?php endwhile; ?>
    <?php endif; ?>

    I’m not sure if it is the most efficient technique but it is working fine.

    Now I’m trying to retrieve the topics under those forums, if I’m subscribed to forum a and not b, how can I retrieve all the topics of only forum a?

    #215071
    xavierissac94
    Participant

    Hi is there is any way to show success message like. “New topic submission succesfully”, once topic is submited. I am using ‘[bbp-topic-form]‘ shortcode to display topic form. But i want to display message once topic is submitted suceesfully.

    Is there is any way to acheive this

    #215059
    purityboy83
    Participant

    Hi

    I have a lot of plugins installed on my site.

    Let me know if you have anything to check more

    Best Regards,
    Hyunho

    ================

    301 Redirects

    Activity Log

    Advanced Access Manager

    Advanced Editor Tools (previously TinyMCE Advanced)

    Advanced TinyMCE Configuration

    All In One SEO Pack

    Automatic Copyright Year

    Awesome Weather Widget

    bbp style pack

    bbp User Ranking

    bbPress

    bbPress – Private Replies

    bbPress forum utility pack

    bbPress Permalinks with ID

    bbPress Profile Link Shortcode

    bbpress Simple View Counts

    bbPress Toolkit

    Classic Editor

    Favicon by RealFaviconGenerator

    GD bbPress Attachments

    GD bbPress Tools

    Hide Admin Bar From Front End

    Hide My WP Ghost Lite

    Image Upload for BBPress

    Link Widget Title

    Log Out Shortcode

    MangBoard WP

    Members

    Nav Menu Roles

    Pages In Widgets

    Post/Page specific custom CSS

    Search & Replace

    Shortcode in Menus

    Shortcode Widget

    SiteOrigin CSS

    Smush

    Stylist

    Timeline Express

    User Registration

    Wordfence Security

    WP 2FA – Two-factor authentication for WordPress

    WP OPcache

    WP RSS Aggregator

    WP Statistics

    WP-Optimize – Clean, Compress, Cache

    WPForce Logout

    broken link check

    buddyPress

    ================

    #215058
    Robin W
    Moderator

    and then same shortcode on every topic page, and above or below the reply form ?

Viewing 25 results - 2,251 through 2,275 (of 32,461 total)
Skip to toolbar