Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,901 through 9,925 (of 32,519 total)
  • Author
    Search Results
  • #156044
    attuoz
    Participant

    hello, thanks for the reply. i activated bbpFauxData. now i can’t find where to put the example code. it just says “Once you install and activate this plugin, you can do:”

    #156037
    Stephen Edgar
    Keymaster

    For example, here, there is NO documentation at all for import options:

    https://codex.bbpress.org/import-forums/

    This has been added for the next release.

    a) It would be useful if there was an explanation as to what difference ‘Rows Limit’ and ‘Delay Time’ actually make to the importer. For example, after a search on this forum, I read that one user upped the Rows limit to 10000 and this helped him with a successful import that had previously hung. Why should this be? @netweb suggests 0.1 as a good Delay Time – why? Also, is there a minimum or range of values that are acceptable? For example, would 0.01 an acceptable value and would it make any difference?

    The default values are what we think will work for “most users” without causing any issues, if your MySQL instance can handle more frequent and larger queries than the defaults then these values can be changed to reflect that. Many of the of shared hosting packages have limits on how many and how large these database queries can take place per hour, this is why it is relatively low by default.

    If you have an incredibly fast MySQL instance you could set the time between queries (delay) to 0.01ms, I’d suggest not though, this allows MySQL to have some “time up it’s sleeve” for any other tasks it may also be needing, you’d hardly notice the difference between 0.1 and .0.01, you do (or at least I do) notice this on large imports when it is set to 1.0.

    b) If ‘Start Over’ is not selected, will the importer always try and re-start where it left off if it was previously stopped? How does it know? Does it trawl through all matches and not replicate them until it gets to data that it hasn’t imported?

    Yes, the importer will continue from where it left off, we store this is the wp_options database table.

    i) Once what is finished? If it hung again then it didn’t finish? Bit confused by this.

    I’ll try to get to update these troubleshooting steps to make this a bit clearer.

    ii) If one stops and starts the import, why should it continue where it left off? Why should it not hang immediately? Does it continue with the next batch of rows or does it continue with the table row in which it was stopped?

    As per above, at each step during import we update this data in the options table so if the import stops when started again it can resume from where it left off.

    And yes, it continues with the next batch of rows from where it left off.

    iii) If one stops import, logs out, refreshes the page, etc. will import start where it left off?

    Yes

    iv) Please define ‘hangs’. If the wheel is spinning during, for example, ‘Converting Replies (480000 – 480999) does this mean it is still working albeit slowly?

    The ‘wheel’ is always spinning as each step of the importer progresses, if for example it took ~3 seconds to convert the “Converting Replies (470000 – 470999)” replies, you’d find each batch would typically be taking a similar 3 seconds, once you see per your example “Converting Replies (480000 – 480999)” if that has been stuck on that batch for 30 seconds, a minute, 20 minutes that is pretty much a case of the import has stalled.

    #155877
    gavintyte
    Participant

    Hello (especially Stephen!)

    Firstly, I must say that I am very grateful that there is a free importer at all! It’s a very valuable addition to bbPress. However, it would be useful if the published bbPress import documentation was just a little clearer and less confusing. Clearer documentation might save people time trawling for responses or firing off questions that are time consuming to answer.

    For example, here, there is NO documentation at all for import options:

    https://codex.bbpress.org/import-forums/

    a) It would be useful if there was an explanation as to what difference ‘Rows Limit’ and ‘Delay Time’ actually make to the importer. For example, after a search on this forum, I read that one user upped the Rows limit to 10000 and this helped him with a successful import that had previously hung. Why should this be? @netweb suggests 0.1 as a good Delay Time – why? Also, is there a minimum or range of values that are acceptable? For example, would 0.01 an acceptable value and would it make any difference?

    b) If ‘Start Over’ is not selected, will the importer always try and re-start where it left off if it was previously stopped? How does it know? Does it trawl through all matches and not replicate them until it gets to data that it hasn’t imported?

    In the troubleshooting guide here:

    https://codex.bbpress.org/import-forums/import-troubleshooting/

    c) I don’t understand the debug information:

    • Once the import hangs, click stop, take a note of where it was up to, e.g. Converting 11,299 – 11,300
    • Click start again and the import will continue from where it left off
    • If it hangs again, take note of where it was up to again
    • Once finished make a fresh copy of the source database
    • <
      /ul>

      i) Once what is finished? If it hung again then it didn’t finish? Bit confused by this.

      ii) If one stops and starts the import, why should it continue where it left off? Why should it not hang immediately? Does it continue with the next batch of rows or does it continue with the table row in which it was stopped?

      iii) If one stops import, logs out, refreshes the page, etc. will import start where it left off?

      iv) Please define ‘hangs’. If the wheel is spinning during, for example, ‘Converting Replies (480000 – 480999) does this mean it is still working albeit slowly?

      Many Thanks

      Gavz

    j0n4h
    Participant

    Hey again,

    Running into some trouble customizing my bbpress forums via the bbpress.css file in the my child theme. I’m unsure if the pathway is incorrect, or maybe the intro to the file itself is incorrectly formatted. I do, however, know I was able to enqueue the custom loop-forums.php correctly with the functions.php properly pathwayed.

    So, the pathway to the bbpress.css file is default>css>bbpress.css
    In my childtheme, I have the bbpress.css file located avada-childtheme>css>bbpress.css

    However, whenever I add code into the bbpress.css file after the

    `/*
    Theme Name: Avada-childtheme
    Theme URI: Your website if you don’t intend to publish a separate site just for your theme
    Description: A brief description of your child theme
    Author: Jonah Hollis
    Author URI: http://www.animusesports.com/
    Template: Avada
    Version: 1.0.0
    Tags: whatever tags you might want to use for your child theme
    */

    /* =Theme customization starts here
    ————————————————————– */
    it corrupts the bbpress forums and breaks them. When I delete the file, the bbpress forums resume normal functionality. For the purposes of example, I’ll leave them broken.

    Any help is appreciated. Thanks!

    http://www.animusesports.com/forums/

    WordPress 4.0.1
    bbPress 2.5.4-5380

    #155968
    Robin W
    Moderator

    Presume you have been through

    Codex

    and

    Step by step guide to setting up a bbPress forum – Part 1

    bbpress is not great on mamp or wamp, is this what you mean by localhost.

    #155989
    Master
    Participant
    #155987
    Master
    Participant

    I create page and add [bbp-topic-form] look http://www.oklop.me/kreiraj-temu/

    But on form not display editor like this

    After add code in functions.php

    function bbp_enable_visual_editor( $args = array() ) {
    $args[‘tinymce’] = true;
    return $args;
    }
    add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );

    Only work on forum page, and editor not work on edit post.

    #155982
    Jake Hall
    Participant

    Hi guys,

    I am trying to achieve this (a mockup through Google Dev tools) however I am unable to find where I can actually edit the code behind this, it seems to be hard coded behind a bbpress function – which I personally think is silly if I have to rewrite it just to make it how I want it…

    How I want it

    I am gunning to make my installation of bbPress hierarchical in display, however currently it only displays the “Freshness” of the forum.

    Can anyone point me into the right direction here?

    EDIT: I wasn’t super clear, what I meant to say was – I would like to instead of having “15 hours and 30 minutes ago” with the username, the topic title. I can achieve the rest

    Thanks

    #155978
    chollyjung
    Participant

    I see css code in reply have display:none.
    How can I fix?

    #155976
    cyclesha
    Participant

    I guess the best way to illustrate this is:

    I installed, activated, etc. Forums. In the back end all seems to be well. In the front end I have nothing other than a 404 Error message. The Forums page on the menu came from bbPress and is not a page I created, published and added to the menu. Since bbPress added it to the menu the problem seems to be like this: You have a piece of paper with text in your left hand and a title in your right hand. How do you get the paper with text to appear under the title in your right hand?

    Is this a code issue, a permalink issue or what? Given my extreme lack of expertise I really need someone to give me step by step instruction.

    Please check the front end yourself:

    cycleshanty.com and click on Forums

    WP version 4.1

    Thanks in advance.

    #155971
    cyclesha
    Participant

    I tried using the short codes and they work on the backend.

    My problem is now getting rid of the 404 error on my front end. From the back end all seemswell.

    Lets focus on that error message. How do we eliminate it so when a person clicks forums the get forums?

    #155969
    melanie bund
    Participant

    Hi my forum appears in a part of the site that has a generic login. So what i need is that users have to type in email and name in order to post – is this possible? is there a shortcode for this or do i have to add something to the bbpress.php?
    thank you in advance
    Melanie

    #155960
    Bob1nz
    Participant

    Thanks for your reply @robin-w
    I tried that but it assigns the user the default role in bbpress.

    I gave a dummy user the admin role in wordpress and what I want is for the user to be automatically given the admin role in bbpress as well.
    Using the code you supplied it leaves the user with the default role.

    How can I assign non-standard bbpress roles with custom capabilities to non standard wordpress roles also with custom capabilities using the map so this is performed dynamically?

    #155951
    Robin W
    Moderator

    @tajender

    You’d need to modify

    wp-content/bbpress/templats/default/bbpress/form-reply.php

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/bbpress/templats/default/bbpress/form-reply.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/%your-theme-name%/bbpress/loop-single-reply.php
    bbPress will now use this template instead of the original

    you should really do this inside a child theme

    Functions files and child themes – explained !

    but if you do it in your main theme, keep a copy of what youb have done as updates are likely to overwrite

    The you would need to modify line 20

    <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
    

    to put in a check to see if it’s current user

    It’s too near xmas, and I have too much else on to write and test the code but it will involve bbp_get_currect_user and the topic author $user_id

    #155945
    Bob1nz
    Participant

    Next one is on the shortcodes you mentioned. https://codex.wordpress.org/Shortcode
    The bbpress codes work in a similar fashion to wordpress’s shortcodes and there are a few examples on that page as to how they work.
    While they are useful I’m not entirely convinced you need them at this stage.

    They can be used to put features of the forums on other pages that are not your main forums such as login, one category of your forums, tag clouds etc. You can use the [bbp-forum-index] on a page if you have created one but I’m pretty sure you shouldn’t need to unless that what you want.

    I believe that plugin would still be fine with your current version of WP and bbP.

    Had to split the reply as I don’t seem to be able to post more than one link per reply

    #155944
    Bob1nz
    Participant

    Ok no worries.

    Im going to give you some links to look at as they have some potentially useful info.

    First one is for the permalinks https://codex.wordpress.org/Using_Permalinks
    I normally have these setup with post name checked in the settings but you are free to choose your own.
    It also makes it easier to find posts and topics etc with “pretty” names in your url bar. My websites forums for example are at myurl/forums <– easy peasy. I never setup a page for bbpress and this worked out fine.

    #155942
    sharongraylac
    Participant

    I’VE GOT IT!!!!! 🙂

    This is what I did to create a title for my bbpress pages (when I had disabled my title-wrapper), in case it helps anyone else.

    I first called the title in, by adding the following code to my bbpress.php file (formerly page.php):

    <?php the_title();?>

    Then I wrapped it in a div like so:

    <div id= bbpressTitle>
    <?php the_title();?></div>

    Then I created CSS, based on this new class:

    #bbpressTitle {
    font-size: 32px;
    font-family: Roboto Slab;
    Font-weight: 200;
    display: block;
    color: #70908F;
    }

    And it actually worked. Please take this with a grain of salt… I’m an acupuncturist, not a coder. 😉

    Thanks again for all of your help, Bob1nz!

    Goodnight,
    Sharon

    #155939
    cyclesha
    Participant

    First, I believe I do have permalinks enabled, however, I’m such a novice I don’t know where to look.

    4.1 isn’t much different than 4.0.1 and 4.0 wasn’t much different than 4.0.1. I’ve had all of them and everything else worked. Oh well, I research it further.

    I definitely want forums. I just need to clear (approve) topics before they appear and approve replies as well. Other so called motorcycle websites have real problems with their forums and and have found themselves deleting a lot of what users put in. It’s all about approval.

    I found bbPress shortcodes: https://codex.bbpress.org/shortcodes/ Would any of these help? and where would I put them?

    Between the two of us we’ll get this straightened out.

    #155929
    cyclesha
    Participant

    I also found the bbPress short codes: https://codex.bbpress.org/shortcodes/ . Would any of these help and where do I put them?

    #155923
    Hephaestus_Xii
    Participant

    Hi, I would like to know how to change the “forum” link in the breadcrumbs to link to another page I built the forums using the shortcodes and the “forum” link in the breadcrumbs takes me to the default forum page.

    I would like it to go to the page I created.

    #155920
    WilRC
    Participant

    Fixed, to everyone who it will be useful:

    / Verify the reply ID
    		$topic_id = bbp_get_topic_id($widget_query->post->ID);
    		$forum_id = bbp_get_reply_topic_id($topic_id); 
    		$reply_id   = bbp_get_reply_id( $widget_query->post->ID );
    		$topic_count       = bbp_get_forum_reply_count( $forum_id, false, true );
    		$total_reply_count = bbp_get_topic_reply_count($forum_id);
    
    					$reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.$total_reply_count.')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';
    
    #155916
    sharongraylac
    Participant

    Ah, thanks for pointing that out, Bob1nz. I removed the code from a Custom CSS file, but didn’t realize it was in my style.css.

    Is there another way to add a custom title to the forum without removing this CSS?

    The reason it’s there is to avoid a different (bigger) problem between my theme and Woocommerce pages. In general, I’d rather not have titles at all- Just the forum and topics.

    Please let me know if you think I’m making a grave mistake though…

    Thanks!
    Sharon

    #155914
    Bob1nz
    Participant

    ok so I have made some small progress

    add_filter('bbp_get_user_role_map','custom_bbp_get_user_role_map');
    function custom_bbp_get_user_role_map($role_map){
        $role_map['admin'] = bbp_get_admin_role();
        $role_map['guest'] = bbp_get_guest_role();
        return $role_map;
    }

    Works if I use the built in bbpress roles eg where is says bbp_get_admin_role(); have bbp_get_keymaster_role(); , bbp_get_moderator_role(); , bbp_get_admin_role(); bbp_get_participant_role();.

    I seem to be stuck on getting the custom roles that I have created in bbpress to be picked up in the map.

    The error I get is Fatal error: Call to undefined function bbp_get_admin_role() in [pathtomyfunctions.php] on line 550 which is $role_map[‘admin’] = bbp_get_admin_role();

    #155911
    Skisma
    Participant

    @robin-w Ahh ok I see, so basically they are only used for actual pages. That’s what I didn’t get before, I was wondering how I’d accomplish that using the shortcode for a widget. Now I understand this isn’t possible and shortcodes are only used for pages. Thanks man!

    #155910
    WilRC
    Participant

    Help!
    I’m trying to get replycounts after the the latest posttitle. (widget)
    e.g:
    Avatar – Name – date – title – (number of replies)
    I can’t get it working. This is sofar I have now:

    $forum_id = bbp_get_topic_forum_id($topic_id); 
    		$topic_id = bbp_get_topic_id($widget_query->post->ID);
    		$reply_id   = bbp_get_reply_id( $widget_query->post->ID );
    
    					$reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.bbp_get_topic_post_count($forum_id, $topic_id, $total_count).')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';
    

    This is a snippet form the BBP latest post widget. It counts replies but not for separatly the latest post. It gives wrong results and those countresults are different on what page you’re visting. (index, forum, topicpage ect.)
    Could somebody put me in the wright direction?

    Many thanks in advance.

Viewing 25 results - 9,901 through 9,925 (of 32,519 total)
Skip to toolbar