Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,851 through 4,875 (of 32,481 total)
  • Author
    Search Results
  • #187121
    Mike Costanzo
    Participant

    Hi there!

    I’m importing forums from Rainmaker into WordPress 4.8.2 and BBPress 2.5.14. On first glance, it looks like all has done well; a quick glance at a sample Forum, for example, tells me:

    “This forum contains 74 topics and 698 replies.”

    However, my Topics and Replies are not being “found” when a Forum is clicked on:

    “Oh bother! No topics were found here!”

    This appears to be because the post_parent in wp_posts for all these Topics and Replies is set to “0” in the database. And what’s worse, the “Repair” tools like “Recalculate the parent topic for each post” or “Recalculate the parent forum for each post” do not fix the problem; post_parent remains at value 0.

    The only way I have found to populate a Topic with the correct post_parent value is to open that topic in the Editor and click Publish. But since I have hundreds of Topics and thousands of Replies, manually saving all these Posts is hardly a workable solution.

    Does anyone know of a better way to solve this problem that doesn’t involve nearly infinite man-hours of drudgery and toil?

    Thanks in advance for any help you might be able to give. Long live BBPress!

    #187120
    heppusiel
    Participant

    I just try latest version of BBPress, and this problem exist. Is there any fix coming? Codes above didn’t work for me.

    #187118
    Robin W
    Moderator

    @lovechard if you’d like some code around JJJ’s filtering suggestions, contact me via my website

    http://www.rewweb.co.uk

    #187110
    Bharat Karavadra
    Participant

    Hello,

    I have had to add a space after the https:// to avoid the screen appearing

    If you look at Peter Recks’ posts here:
    https:// http://www.karavadra.net/forums/topic/header-image-formatting/

    There are quotes with text ‘Reconsidering Study, Qualifications & Experience’ with a link to here:
    1) https:// http://www.karavadra.net/reconsidering-study-qualifications-experience/

    However, Peter has only put in a link in his post which is not to the link 1 above but to here:
    2) https:// romancecalling.xyz/?page_id=35

    When I look at the link in admin it appears correctly as link 2

    Why is the link being changed from the 2nd to the 1st on the user side and the title of the page being added?

    And more importantly how do I get it to appear as it as posted, namely link 2.

    Note: no a hrefs or any other shortcodes for links are being used — only the URLs 1 and 2.

    Thank you,

    Bharat

    #187092

    Also, is it not possible to write one query that deletes content from two tables (wp_posts and postmeta)?

    Correct; it is not possible. Each deletion from each table needs its own query. It’s not possible to know which meta-data IDs to delete without SELECTing which post IDs before deleting them.

    #187059

    You won’t be able to do this with just 1 query, because you’ll also want to delete the associated meta-data; that will take at least another query with the post IDs of the topics you’re trying to delete. If you’re using any type of caching, those caches should be purged also, which usually requires PHP or a cache-key reset.

    There are a few alternatives.

    * Admin > Tools > Forums > Reset will let you erase all bbPress content completely. It may timeout depending on your server configuration, but it will eventually get through it.
    * Use WP-CLI: http://wp-cli.org
    * Export the DB, do the data delete on a more capable server (or locally) then re-import it back in. This obviously is the more technical solution, but works really well in a pinch.

    #187057

    In reply to: New replies first

    seth23
    Participant

    This code worked for me. Is there any way to put an option on the topics pages for people to choose if they want the thread to go oldest to newest or newest to oldest?

    #187044

    I understand the need for this, but this is coming from bbPress so there is only so much we can do. bbPress has no way to to blanket unsubscribe someone from all of their forums/thread email subscriptions. If bbpress had a way to unsubscribe globally, then we could look into it but going topic by topic, which is how they have it setup does not work. Simply put bbPress doesn’t have the utilities to make it reasonably possible

    The bbp_topic_subscription_user_ids filter can be used to remove users from the array of users to be notified about new replies to topics.

    The bbp_forum_subscription_user_ids filter can be used to remove users from the array of users to be notified about new topics in a forum.

    On the Memberpress side, or in a separate add-on, they can filter those arrays, remove “inactive” members from those emails, and problem solved.

    I’d also argue that you actually don’t want to blanket unsubscribe anyone from anything, because if they ever re-subscribe, they’ll want to get all of their previous history back; right? If you purged all those subscriptions when their membership expires, that would kinda stink for them.

    #187042

    In reply to: bbpress performance

    Fabian
    Participant

    1) It is true and I’ll show you some more precise benchmarks on this for a concrete example. Take the filter bbp_map_meta_caps, it’s within a filter recursion, where the filter fires it self again. The recursively fires 4 times with bbpress only. Now if another plugins does the same, it could get up to 16. Plugin run times include each other through the filter api. In worst case you can’t just add them to each other, they bias by some non-linear function that is definitely not O(n).
    Your point is true, that you can’t blame a plugin for being slower in conjuntion to others. But, you as a developer, should avoid that other plugins can slowdown your own plugin, by minimal intrusion into the WordPress plugin API. And bbPress does not have this minimal intrusion. Of course it is a big software product, but there is high potential to conditionally hook into WP only on pages it needs to.

    2) No its not completely irrelevant. I wasnt clear enouh here, I’m not referring to file count, but yeah -how you said- file size or LLOC. Were not talking about vulcanizing scripts. You’re right, the PHP interpreter got very fast and it should not matter, but consider:

    a) Only the inclusion of bbpress main file makes PHP allocate about 600 KB. Thats a lot, considering 0 output bytes. And this happens on every request, every REST.

    b) Think about who runs a WordPress site, not people that have a dedicated high performance server. Usually its a webspace in a VM. These systems can power hundreds of sites, so the webserver does not just read 500 files at the same time, but lets say 10000. This lowers the chance to find the same PHP code in some cache between subsequent requests. The code size per request starts to matter here.

    b) It is a style thing, I dont want my programs to load 1MB code without using it. And yeah, there are many plugins that just follow WordPress style to include everything, but this does not mean it is a good style to follow. Unfortunately, there is no well known code metric that covers this. WP was created in darker times of PHP, without autoloaders. Why do we have them now? I dont get it why so few plugins properly use them, it takes a day to refactor your plugin and another to test.

    bbPress is not doing bad. It could just be more minimal if the forum is just a smaller part of your website. I dont expect 25 plugins to allocate 0 memory, but I expect 25 plugins not to clog my dashboard and frontpage, where I do not want them to load. I want them to do what they are supposed to do on specific pages within the front- and backend.
    Its true that woocomerce is the worst.
    I could optimize it though. It only loads on the shop frontpage, on the checkout page, on product pages, specific ajax actions and REST endpoints. The cart can be XHR, or one can keep on loading the plugin once a cookie is set. This technique makes the wp-admin dashboard fast too.

    (I’ll back with the benchmarks)

    #187028
    Kutakizukari
    Participant
    .bbpress ARTICLE
    {
    	width: auto;
    }
    #187027
    MakarkinPRO
    Participant

    If I’m on the right way. Does anybody have help with the code in functions.php
    its should like:

    1) Change user role from Subcriber to PaidSubscriber if status is “Active” https://www.screencast.com/t/oAFwrSQVjMy for specific user.

    2) Change user role from PaidSubscriber to Subcriberif status is “Decline”, but if he have not any other orders which is “Active”. Becouse user may buy a 1 month subscription, and the continue it before 5 days before last one is end.

    Ok? anybody may help? )

    #187020

    In reply to: bbpress performance

    Milan Petrovic
    Participant

    1. That is simply not true. I developed many plugins for bbPress, and I always do extensive benchmarking of bbPress and various plugins, and if you have 25 plugins or if you have 5 plugins, bbPress has the same impact on WP regardless. If two websites add 0.1 seconds slowdown, you can’t blame one of the plugins for what other is doing.

    2. That is completely irrelevant to loading performance. It is possible to merge all files any plugin has into one huge file. A number of files don’t have too much impact on the loading, and it is even recommended to have a lot of smaller files to help with the code organization, improve loading of what is needed when it is needed (for the most part). WordPress loads about 200 files on average for each page request, and even more on the admin side, and I have seen plugins that load 100 or more files. Size of files have more impact on performance, then the number of files. And with modern servers using SSD discs and a lot of memory, files loading is negligible.

    The biggest impact of performance of any plugin has to work with the database in any way (getting posts, filtering). And yes, bbPress up to version 2.5 was not best optimized, and it was on the slower side when dealing with large topics or large forums. Version 2.6 (currently in Beta/RC stage), has significant performance improvements related to database operations, loading posts and processing them.

    PHP has Opcache, and other performance related tools for a reason: PHP is not compiled, it is interpreted, and that is always a slower method for doing things, and PHP needs help to make things faster. It is a good thing to have and use Opcache or Memcached. For instance, my website without Opcache uses 60MB for PHP process on average, with Opcache that goes down to 12MB. WordPress without Opcache uses about 20MB on its own, bbPress adds about 5MB, WooCommerce adds closer to 10MB, BuddyPress around 6-7MB. Huge and complex plugins always need memory to work, you can’t expect to run 25 plugins and keep memory to a zero. That is why we have systems to optimize PHP, we have cache plugins.

    Once the bbPress 2.6 is released, I will do a new benchmark to compare 2.5 to 2.6 and see how much gains are there when using bbPress with a forum having a large number of topics and replies. But, from current testing I am doing with 2.6, it is much faster than last 2.5.

    Milan

    #187006
    Robin W
    Moderator

    can I just confirm that this happens then with both the bbpress shortcode [bbp-lost-pass] AND with the wp-admin lost password ?

    #186972
    janallsopp
    Participant

    Hi, I’ve set up the lost password page with shortcode [bbp-lost-pass] but when users click on ‘forgot password’ and fill in the form they aren’t receiving an email with link to create new password.

    Using BBPress Version 2.5.14 and BBP Private Groups Version 3.5.9. Using WordPress 4.8.1. The website is private so I can’t share.

    Thanks in advance.
    J

    pmatteudi
    Participant

    Hi there,

    I’m writing because I have trouble to understand how templates are managed in BBPress (and wordpress I guess :)).
    I’d like to have a specific template on the main forum page (the one displaying the different forums). And another template for the page displaying the different topics.

    Currently in the wordpress page where I pasted the short code [bbp-forum-index], I call the template bbpress.php, which is presented in the bbpress codex (See example at the end of the topic).

    But how can I create a specific template for my forum index (listing all my forums), for instance “forum-display.php”. And another template, listing my topics (for instance “topic-display.php”).

    Maybe my file bbpress.php is not appropriate to do so ? or need to be customized a bit ?

    NB : I’m using twenty twelve theme

    I hope my question is clear,
    Thank you for your help,
    Pierre

    <?php
     
    /*
    Template Name: index-forum
    */
     
    get_header(); ?>
      
    <div id="primary" class="site-content">
     
    		<div id="content-forum" role="main">
    	 
    	 
    		<?php
    		/*
    		Start the Loop
    		*/
    		
    		while ( have_posts() ) : the_post(); ?>
    		 
    		 
    		<?php
    		/*
    		This is the start of the page and also the insertion of the post classes.
    		 
    		Post classes are very handy to style your forums.
    		*/
    		?>
    		 
    			<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<?php
    			/*
    			This is the title wrapped in a header tag
    			and a class to better style the title for your theme
    			*/
    			?>
    		 
    			<header class="entry-header">
    			 
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    			 
    			</header>
    			 
    			 
    			<?php
    			/*
    			This is the content wrapped in a div
    			and class to better style the content
    			*/
    			?>
    		 
    			<div class="entry-content">
    			<?php the_content(); ?>
    			</div>
    			 
    			<!-- .entry-content -->
    			 	 
    			</article>
    			 
    			<!-- #post -->
    			<?php endwhile; // end of the loop. ?>
    		 
    		</div>
    	 	<!-- #content -->
    	 	
    	 	<div class="login-sidebar"><?php dynamic_sidebar('forum_login_zone');?></div>
    
    </div> 
    	<!-- #primary -->
      
    <?php
    /*
    This is code to display the sidebar and the footer.
    Remove the sidebar code to get full-width forums.
    This would also need CSS to make it actually full width.
    */
    ?>
    		 
    <?php get_footer(); ?>
    #186939
    acpscommunications
    Participant

    Still looking for a solution on how to use a forum name shortcode with our email to subscribers

    #186928
    Robin W
    Moderator

    ok, so you create a page and use shortcodes to achieve this

    Shortcodes

    eg

    [bbp-topic-index]
    [bbp-forum-index]

    #186927
    Robin W
    Moderator

    ok, so you create a page and use shortcodes to achieve this

    Shortcodes

    eg

    [bbp-topic-index]
    [bbp-forum-index]

    #186923
    Kona Macphee
    Participant

    Hi guys,

    More than two years ago I posted the following bug report:

    Ajax validation issue for user auto-complete

    A ticket was opened for this bug here:
    https://bbpress.trac.wordpress.org/ticket/2864

    The issue was marked as fixed and the bug closed; however, the bug is not actually fixed and is still present in the most recent release.

    Here are the original details:

    Context:

    On the “Edit Topic” screen, there’s an “Author Information” box including an ID field. When you begin to type text into this box, the admin-ajax action “bbp_suggest_user” should auto-suggest potentially matching users.

    Issue:
    The user autosuggest is not returning any users, just “-1”. Having dug into the code, the step that’s failing is wp_verify_nonce() in check_ajax_referrer(), which is invoked on line 745 of bbPress file includes/admin/admin.php. The nonce is making it into wp_verify_nonce, but is not matching any expected/acceptable value – so wp_verify_nonce falls out the bottom with a failure.

    If I remove the check_ajax_referrer step, the Edit Topic user auto-suggestion works perfectly so it’s definitely the nonce validation step that’s the problem.

    Current context in which I’m still seeing the bug is WP 4.8.1 Multisite, bbPress 2.5.14, PHP 7.0.22. (I’ve been seeing the bug for over 2 years though, including with PHP 5.x).

    Would be really grateful if this bug could be fixed in the next release, because I’m having to manually patch every release at the moment (I have a user whose job relies on this function working properly.)

    Thanks!

    #186922
    Vishnja1
    Participant

    Hello! I have the same situation.
    There isn’t a problem to add link to user profile navigation. But the problem is to ‘register’ that page in such way, that it contents would render properly under ‘base_url/forums/users/someuser/your-custom-page/’ url. bbPress allows to see other user’s profile info too.
    I also couldn’t not find any guide how to do this or find it in plugin code. But if that page will be private (only for one user, like ‘Edit profile’ which disappears on others user acc pages) there is a workaround.
    You can create page template, copy ‘single-user.php’ contents to it and create page for this template in admin. Then add a link in profile page. Also you should add filters to ‘bbp_get_user_id’ and ‘bbp_get_displayed_user_field’ to make everything work correctly on that page. (I can provide code if you’re interested).

    #186909
    Robin W
    Moderator

    I’d ask them if memberpress is integrated with bbpress

    did you ask them the question above?

    ie is their plugin is integrated with bbpress and should be doing this, but it isn’t in your case, or if they haven’t integrated with bbpress, in which case it is not really up to bbpress to make sure there software works with paid plugins, so you would need someone to write the code that hooks to the memberpress cancellation to cancel the user subscriptions.

    PS I’m kinda interested that cancelling membership leaves the user still set up and able to access your site? Do they still show in dashboard>users?

    oh, and what version of bbpress are you using?

    #186907

    In reply to: PHP Fatal Error

    Vinod Dalvi
    Participant

    Sorry to hear of the problem you are having.

    It is working fine on my test site without any issue.

    Could you please try fixing the issue as described in the following pages?

    https://codex.wordpress.org/Common_WordPress_Errors#Maximum_execution_time_exceeded
    http://kb.wpbeaverbuilder.com/article/37-how-to-increase-the-wordpress-allowed-memory-size
    http://www.wpbeginner.com/wp-tutorials/fix-wordpress-memory-exhausted-error-increase-php-memory/

    You can also try using the below upcoming version 2.6 of bbPress.

    https://downloads.wordpress.org/plugin/bbpress.2.6-rc-3.zip

    #186906
    Vinod Dalvi
    Participant

    @lovechard Please understand that the bbPress provides functionality to users to subscribe/unsubscribe to topics from topics page but memberpress is restricting them to access topic page so they don’t have access to the page to unsubscribe to the topics.

    Here memberpress is changing the bbPress default process so in this case on cancelling the membership the memberpress should also unsubscribe users from all topics.

    The code in the following plugin will help memberpress to develop this functionality.

    https://github.com/tharsheblows/mjj-bbp-subscription

    #186900
    Stephen Edgar
    Keymaster

    Hmmmm….

    Could you try logging into https://codex.bbpress.org/wp-login.php before opening the email link, see if that works please?

    #186891
    clearscope
    Participant

    We have encountered a bug whereby when multiple forums are placed on a page, using the [bbp-single-forum id=##] shortcode, the HTML buttons do not appear for all but the 1st forum. The class=”quicktags-toolbar” div still appears in the source code, but it is empty (the HTML input buttons do not appear within the source HTML).

    This issue has been confirmed on multiple installs, with all plugins disabled and using the default WP theme.

    Here is a screenshot example: https://imgur.com/rqPiXa6

Viewing 25 results - 4,851 through 4,875 (of 32,481 total)
Skip to toolbar