Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,876 through 9,900 (of 32,511 total)
  • Author
    Search Results
  • #156101
    Jake Hall
    Participant

    Can I just say, whilst bbPress is a great SSO solution for those wanting to hook up their WordPress with a forum, it is very difficult to get it going how you like it. There is virtually no decent documentation going over anything except the basics.

    I am trying to achieve something relatively simple, however have had to resort to editing the actual plugin itself in an attempt to get it working how I’d like it to be.

    What I am trying to do, is edit the freshness part of bbPress. What do I mean by that? Well, I am trying to edit the following:

    null

    So what I wanted it to do, was display the actual Topic Title. It makes sense, because as default – what has updated? What thread was last updated without having to drill into the forum?

    I also found it bizarre that the title was added within the title tag of the freshness, really? Can we just have some sort of option to allow us to change how things are layed out, or at least create some documentation on how to actually change this without editing the bbPress plugin files (which is what I have had to resort to…)

    My question is, how can I change what is displayed there? Surely there’s a better way around it that doesn’t involve hacking my way through the plugin files.

    Which bbPress file actually changes this? Like I say, absolutely no documentation on what each file does – it is just guesswork………………

    If I am missing something I apologise, but after looking for countless hours I just decided to edit the plugin source to achieve half of what I wanted – still doesn’t help as I would like to change the location of the author picture and time edited and I am not editing the plugin for those.

    Am I being stupid?

    If anyone would like the most recent topic name within the forum to display on the index, you can edit the Plugin source code directly like so:

    if ( !empty( $time_since ) && !empty( $link_url ) )
    			$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $time_since ) . '</a>';
    		else
    			$anchor = esc_html__( 'No Topics', 'bbpress' );
    
    		return apply_filters( 'bbp_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );

    Find that chunk of code within bbpress/includes/forums/template.php and change to the following:

    if ( !empty( $time_since ) && !empty( $link_url ) )
    			$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '</a>';
    		else
    			$anchor = esc_html__( 'No Topics', 'bbpress' );
    
    		return apply_filters( 'bbp_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );

    All we have done here is changed the $time_since to $title. Now you need to re-add the $time_since variable in there somewhere, which is a pain because you may not want it right after the thread title (like myself…)

    #156089

    Topic: Avatar padding issue

    in forum Themes
    Divine_Apex
    Participant

    Hello! I am new to bbpress. I have just made a new site for my clan and I decided to try out WordPress for the first time. Anyway, I’m going to try and keep this short for you guys. So, I have uploaded a theme and right off the bat there was an issue with the padding between the user’s avatar and username display.

    Example:

    View post on imgur.com

    I have plenty of experience with CSS and I’ve been looking through my FTP files to figure out where this issue is occurring but I can’t seem to find it. I would love to get some direction, or possibly a code to add somewhere in my CSS to fix this. Thanks!

    #156085

    In reply to: No spacing in posts.

    Yolle
    Participant

    Hi!

    Thank you for the quick reply. It still does not work. I hope I am applying the correction right – I put the code into bbpress.css and then disabled my CDN and caching so it wouldn’t interfere.

    The link to one of the posts is: http://www.lolabuland.com/forums/topic/madde-lucy-bc-6-month-sweden-participant/#post-24022 (post 24022). The forum is for subscribed users only however. Can you please let me know your email so I can send you the login info? Thanks.

    #156083

    In reply to: No spacing in posts.

    Robkk
    Moderator

    @yolle

    try adding !important to the end.

    like this

    #bbpress-forums .bbp-topic-content p,
    #bbpress-forums .bbp-reply-content p {
    margin-bottom:10px!important;

    if it still doesnt work post a link to a topic or reply post that should have line breaks.

    #156081
    IbrahimC
    Participant

    Hi all!

    I’ve just completed setting up my forums using the shortcode method (implementing shortcode of forum index on a page). I did this because whenever I tried to access the forum index, I would get a blank page.
    Now that I’m finished the development of the forum, I want to use the original index.

    At the moment, thegamingrpt.com/forums works fine thanks to the shortcode. However, thegamingrpt.com/tgrforums only loads a blank page. I used the ‘tgrforums’ root so that I could implement the shortcode on a page called ‘Forums’.

    Basically, I want the original back because my breadcrumb is showing the original forum root and because my theme has a dedicated sidebar to bbPress.

    Hope all this makes sense.
    Thanks.

    #156080

    In reply to: No spacing in posts.

    Yolle
    Participant

    I have the exact same problem.
    Has anybody found a working solution?
    I tried this code :

    #bbpress-forums .bbp-topic-content p,
    #bbpress-forums .bbp-reply-content p {
    margin-bottom:10px;

    but it doesn’t work.
    Thanks

    #156078
    Robkk
    Moderator

    yes you can.

    its used on bbpress.org , its not in button format but yeah

    first you create a new page called New Topic

    put the shortcode [bbp-topic-form] into that page.

    now to create a button , im just going to show you how to create a link with a background so it basically is a button.

    put the text widget in your sidebar

    and put this html in it.

    <a class="bbp-new-topic-button" href="http://yoursite.com/new-topic" "title="Create A New Topic">Create A New Topic</a>

    and put this CSS wherever you can put custom CSS

    a custom css plugin
    jetpack custom css module
    in the bbpress.css file that you could copy to your child theme.
    in your child themes CSS stylesheet

    a.bbp-new-topic-button {
      color: #fff;
      font-size: 24px;
      background: #222;
      padding: 10px 20px;
      border: solid #222 2px;
      text-decoration: none;
    }
    
    a.bbp-new-topic-button:hover {
      color: #222;
      background: #fff;
    }
    #156077
    Robkk
    Moderator

    @attuoz

    i think you can put that sample code in your functions.php in a child theme or functionality plugin.

    #156073
    Robin W
    Moderator

    try my plugin

    bbp additional shortcodes

    I think it will fit what you request

    #156070
    bog1
    Participant

    Hi,

    i am searching for a plugin which restrict user registrations.

    I only want users to be able to register when they provide a valid “code” in the registration form.

    Is this possible?

    regards
    Yavuz

    #156069
    dejudicibus
    Participant

    At the bottom left of a post:

    Stai vedendo rticolo (di 1 totali)

    instead of

    Stai vedendo 1 articolo (di 1 totali)

    #156067
    attuoz
    Participant

    Hi. I tried other 2 methods. They add only a few topics, which is not enough. Can do the same in 10 minutes.

    bbpFauxData should work. I just don’t know where to use the php code.

    ini_set( 'max_execution_time', 30000 );
    ini_set( 'memory_limit', '1024M' );
    
    $bfd = new bbpFauxData();
    
    const USERS   = 50;
    const FORUMS  = 5;
    const TOPICS  = 100;
    const REPLIES = 1000;
    
    for ( $i = 0; $i < USERS; $i++ ) {
        $bfd->generate_user();
    }
    
    for ( $i = 0; $i < FORUMS; $i++ ) {
        $bfd->generate_forum();
    }
    
    for ( $i = 0; $i < TOPICS; $i++ ) {
        $bfd->generate_topic();
    }
    
    for ( $i = 0; $i < REPLIES; $i++ ) {
        $bfd->generate_reply();
    }
    #156065
    yarashicr
    Participant

    I am very new to BBPress deployment. One of my client wants me to fetch Topics or discussions of a particular forum or all forums with in a category and display it on the homepage. The only way I can add it on the home page of my site in the current wordpress theme I use is through a custom widget (“text widget”). Can any one help me with the php code to do the same. Also help me on what I need to do inorder to fetch all topics under a particular category, irrespective of the forums to which they belong.

    Is there a plugin to do the same or an external widget which I need to install in the form of a plugin.?

    If I am not wrong, I assume that the following is the structure of a BBpress forum.
    Category >> Forum (Sub Category) >> Topics (Discussion)
    Eg: Software >> Apple >> A simple topic or discussion on iPhone.

    #156063

    In reply to: Help for roles

    Robkk
    Moderator

    use the gd bbpress attachments plugin to allow users to upload images.

    the users use html when they are using the visual editor too if you activated that it just outputs the html tags in an iframe in real time.

    there being two tabs is not really a big deal, but create me a subscriber account and i can see if i can hide it with some CSS.

    i need a subscriber account because i cant see the topic/reply form unless i login to your site.

    ok role see if this article helps

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    #156062

    In reply to: Edit reply page

    Robkk
    Moderator
    #156056
    Robkk
    Moderator

    try this code from this link

    https://gist.github.com/ntwb/7864894

    and rename the ones you want

    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    
    function ntwb_bbpress_custom_role_names() {
    	return array(
    
    		// Keymaster
    		bbp_get_keymaster_role() => array(
    			'name'         => 'My Custom Keymaster Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    
    		// Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'My Custom Moderator Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    
    		// Participant
    		bbp_get_participant_role() => array(
    			'name'         => 'My Custom Participant Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    
    		// Spectator
    		bbp_get_spectator_role() => array(
    			'name'         => 'My Custom Spectator Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    		),
    
    		// Blocked
    		bbp_get_blocked_role() => array(
    			'name'         => 'My Custom Blocked Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    		)
    	);
    }
    #156052
    Robkk
    Moderator

    We have installed the latest bbPress + latest WP on our site. Also we have Disqus if this matter.

    yeah Disqus not really

    We read that bbPress is integrated with ‘Discussion’ settings from WP installation.

    well it does but only the comment blacklist and comment moderation , not anything else yet.

    more info on this link.

    (codex.bbpress.org/moderation-and-blacklisting/)

    No answer here? Perhaps a plugin?

    sorry its the holidays in the U.S. , we are spending time with families.

    there is a plugin though!

    https://wordpress.org/plugins/bbpressmoderation/

    #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

Viewing 25 results - 9,876 through 9,900 (of 32,511 total)
Skip to toolbar