Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 15,076 through 15,100 (of 32,519 total)
  • Author
    Search Results
  • #120977
    dwbroad
    Participant

    Well, I’ve worked out why my page.php was not showing my template, the loop I was using was a really simple one, just


    the_title();
    the_content();

    When I replaced it with the loop from the twentyeleven them it worked! Phew.

    Still not worked out why my site was being bombarded by multiple IPs just from positing the link to an open forum on here… I think I stopped it by deleting the forum and the .htaccess file to stop the permalink from existing as even if it’s a 404 it can still be constantly requested. I think…

    #120974
    remike
    Participant

    Jared Atchison, thanks so much for the answer!

    I added your piece of code to my child theme CSS and unfortunately it didn’t change anything… 🙁
    I even added the “!important” note, with no success.

    Are you sure that is there reason or did I just paste it in a wrong place?

    #120964

    It’s because the blockquote has clear:both;.

    You need to add another style to override that, something like .bbpress blockquote { clear: none; }

    #120961
    remike
    Participant

    Can someone please help me out?

    The quoting function leaves me out with a huge margin before the quote! I first noticed it today and I have no idea what caused it!

    I added a fancy editor a couple days age pasting a code from topic.
    I also messed around with plugins GD bbPress Tools and bbPress2 BBCode trying to find the best solution for quoting.

    Somehow I have now a huge margin, I can’t edit it in css – don’t know what to do!

    It looks like this http://img152.imageshack.us/img152/1030/quoteproblem.png

    The link to my forum and an example topic with (notice that the quoting function worked fine a few days ago…)
    http://lowcygier.pl/temat/dolacz-do-naszej-grupy-na-steamgifts/?view=all#post-1877

    Please, I will appreciate any suggestions

    #120946
    Stephen Edgar
    Keymaster

    I have created a ticket in trac https://bbpress.trac.wordpress.org/ticket/2074
    If you could keep all bugs and/or feedback posted to this ticket (‘tracs’ everything in one place)

    This has only beeen tested using Simple Press 5.1.4

    To install download the SimplePress5.php file and upload it to bbPress in the folder /wp-content/plugins/includes/admin/converters/

    Basic instructions on using any of the import tools are here (will to get these updated soon)

    #120945
    Stephen Edgar
    Keymaster

    I have created a ticket in trac https://bbpress.trac.wordpress.org/ticket/2074
    If you could keep all bugs and/or feedback posted to this ticket (‘tracs’ everything in one place)

    This has only beeen tested using Simple Press 5.1.4

    To install download the SimplePress5.php file and upload it to bbPress in the folder /wp-content/plugins/includes/admin/converters/

    Basic instructions on using any of the import tools are here (will to get these updated soon)

    #120943
    Pierre-Luc Auclair
    Participant

    bbp_list_forums needs to be run inside a bbpress loop. Which you call with bbp_has_forums(), which creates a forum object. For example.


    bbp_set_query_name('load_stuff');

    if ( bbp_has_forums(array(
    'post_parent' => 0,
    'post_type' => bbp_get_forum_post_type(),
    'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
    'orderby' => 'menu_order',
    'order' => 'ASC'
    )) ) : ;

    bbp_get_template_part( 'loop', 'forums' );

    else : ;

    bbp_get_template_part( 'feedback', 'no-forums' );

    endif;

    bbp_reset_query_name();

    #120942
    redsavior
    Participant

    Ok, the only plugin I’ve updated recently was bbpress and since then, it’s stopped working. What would cause this? Right now, the forums will not load.

    Here’s the URL to them: http://www.tastyfresh.com/forums/

    That’s to a page that is calling the shortcode. Several actually. It may be possible that I have a conflict in there given that the page itself is made to have logged in and logged out views as well as multiple renders of the forums in tabs (All forums, login and recent topics specifically). It was functioning just fine until the 2.2.2 update.

    So, what are the potential issues that could cause this?

    sunnyt7
    Participant

    Sorry where does this code go?

    wp-content/themes/mytheme/functions.php?

    #120932
    freenet
    Participant

    hello, how to wirite .htaccess for bbpress
    my wordpress rule is
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress
    this rule url is : http://www.duba.pro/177.html
    ——————————————————
    But when i install the bbpress , a topic for chianese’s title is
    http://www.duba.pro/bbs/title/%e8%ae%ba%e5%9d%9b%e5%bc%80%e5%90%af%e6%ac%a2%e8%bf%8e%e5%8f%91%e5%b8%83%e8%ae%a8%e8%ae%ba%e5%92%8c%e5%8f%8d%e9%a6%88

    —————————————————–
    how to wirte the htaccess rule lick wordpress,thanks.

    Lynq
    Participant

    It looks like there is a filter you might be able to use to create a plugin

    function bbp_get_topic_caps() {
    return apply_filters( 'bbp_get_topic_caps', array (
    'edit_posts'          => 'edit_topics',
    'edit_others_posts'   => 'edit_others_topics',
    'publish_posts'       => 'publish_topics',
    'read_private_posts'  => 'read_private_topics',
    'read_hidden_posts'   => 'read_hidden_topics',
    'delete_posts'        => 'delete_topics',
    'delete_others_posts' => 'delete_others_topics'
    ) );
    }

    #120847
    Stephen Edgar
    Keymaster

    @HistoryHouse The codex document you linked to is for the old ‘legacy standalone’ version of bbPress, not the new plugin version.

    This is what you are looking for (I think) https://codex.bbpress.org/theme-compatibility/

    Michael
    Participant

    Hi — I’m using v2.2.2 and hooking into a few of the bbp_current_user_* permissions checks in template-tags.php, and I noticed what I think may be a bug. Or maybe it’s a feature. 😉

    The function bbp_current_user_can_publish_forums() applies a filter of ‘bbp_current_user_can_publish_forums’ on the last line of the function.

    I noticed that function bbp_current_user_can_publish_topics() applies the same filter of ‘bbp_current_user_can_publish_forums’ — is that what is intended?

    All of the other bbp_current_user_can_* functions have their own respective filters, so  bbp_current_user_can_publish_topics() looks like the odd man out.  Shouldn’t the last line in the function look like:

    // Allow access to be filtered
    return (bool) apply_filters( 'bbp_current_user_can_publish_topics', $retval );

    Michael

    #120837
    HistoryHouse
    Participant

    If someone could just guide me please (I’m returning to bbPress after a confused time with it pre-plugin days).

    Plug-in installed OK and it was easy (thanks!). The forum is using my blog page layout which has a widget controlling the right sidebar (my own theme design adapted from blankslate).
    http://www.historyhouse.co.uk/historynews/

    The test page works fine (apart from it’s too wide – but I can solve that.)

    Problem is I want it to have its own unique page template (not using the sidebar widget). Probably something like this template I created.
    http://www.historyhouse.co.uk/historynews/history-of-ashen-my-ancestors

    In my stumbling I thought a child theme may have been the answer so I looked the below page but the bbpress version number is not the same. Besides it didn’t seem to work for me.
    http://codex.bbpress.org/legacy/step-by-step-guide-to-creating-a-custom-bbpress-theme/

    So in a nut shell. How can I make it use the template in my second example?

    Thanks in advance and be gentle with me 😉

    royho
    Participant

    I ended up just doing it the old fashion way:


    $user = new WP_User( 1 );
    $user->add_role( 'bbp_keymaster' );

    #120827
    frenzis73
    Participant

    Widget and shortcode are not so “themable” like I would. WP_QUERY is right, but then I cannot use bbp_* in my file.

    What I want is use every BBP Functions inside my, eg, single.php: show author, show forums, show topic simple calling bbp_**

    How bbp_has_forums() works? It loads the functions ouside the BBP pages?

    Regards, Francesco.

    Stephen Edgar
    Keymaster
    Shane Gowland
    Participant

    You can use the shortcode in the PHP template files with the do_shortcode() function.

    echo do_shortcode('[bbp-topic-index]'); would do the trick.

    Of course; there is a performance overhead involved with making WordPress parse the shortcode before displaying the content. Using WP_Query and creating a custom loop would be the ideal method, but it’s also much trickier.

    #120794
    Halo Diehard
    Participant

    Well, I’ve created a page and am using the shortcode and it seems to bypass the issue. For anybody having this layout trouble, the shortcodes can be found here:

    https://codex.bbpress.org/shortcodes/

    #120790
    Michael
    Participant

    Hi John James — thanks for responding, much appreciated.

    Regarding get_the_ID() not working on an archive page, I understanding your point — there isn’t a page associated with it.

    The only issue I have is that the Forum Archive page is associated (“partnered” to use the documentation phrase) with a real page, and essentially it is just a regular page with embedded shortcodes.

    In my case, the partnered page has content and embedded shortcodes, and it has a real page ID (#1296 in my case).  That’s what I wanted to find so I can extract information specific to that partnered page.

    What am I doing with all this?  Well, the short story is that certain specific pages on my website have some special header images attached above the_content(), and I have created a custom Template in my child theme to handle it.  Information about the slug is extracted, which is used to lookup random images in a database of images.

    I’m trying to keep a consistent approach with all pages, hence the use of a custom Template that I set as a page attribute in the editor.

    None of this is fatal for my needs, but if a page is partnered with the Forum or Topic Archive pages, it seems like the selected Template for displaying those pages should come from the Template page attribute associated with it.  Hence the need for post ID of the partnered page.

    Cheers.

    Michael

    #120781
    plannerguy
    Participant

    @JJJ – need help in the same regard.

    I’m using amember and not s2member – and I need to block users from bbpress when their subscription becomes inactive (which means they are assigned a WP role of “amember expired” by amember).

    Will JJJ’s code or tzelding88’s code above achieve this? Will it sustain mapping so that when a user’s WP role changes, bbpress’s role changes as well?

    Many thanks.

    #120777
    padekan
    Participant

    Ok , so it’s a bit of physician heal thyself but here’s how I fixed in case other people are having the problem.

    I found this:

    https://codex.bbpress.org/theme-compatibility/

    which shows how to create a custom bbpress.css in 2.0 and later.  Then I changed line 62 to be:

    list-style-type:   inherit /* was ‘none’ */;

    (basically took out the none override for basic list elements).

    Seems like overkill to have a complete copy of bbpress.css just to change one line but I could not find another place to override it.  Tried playing around with trying a skeleton bbpress.css that @import’ed the default one but didn’t have much success with that.

    Anyways, issue has been resolved, thanks!

    regards, Paul

    #120775
    Shane Gowland
    Participant

    bbPress is now a plugin for WordPress. That means that it doesn’t run without an install of WordPress.

    As for the design; that’s entirely up to you. You can go with the default bbPress styles, use a WordPress theme that overrides them or apply your own CSS and make the forums totally original. I recommend having a good read of the bbPress 2.0+ documentation.

    #120771
    • Use a regular old WP_Query()
    • Use a widget
    • Use bbp_has_forums()
    • Use the shortcode mentioned above

    There are lots of examples, in the forums, on the codex, and in the bbPress code itself. Also, unclear what you mean by “latest forum.” Do you mean topics, or replies, or something else?

    #120770

    Modifying core files is never the way. There are plenty of filters in place to override any bit of functionality regarding bbPress’s theme compat,

    There are, as you’ve already found, numerous vectors depending on exactly what you want to accomplish. Each filter has an intended purpose, and solves a specific problem. The underlying code is identical to WordPress’s own template loader, until a template isn’t found (which is a majority of installations.) In that case, bbPress replaces the_content with template parts using page.php, or whatever is a match in the stack you found already.

    Also, don’t forget about the typical WordPress templates: archive-forum.php, and archive-topic.php, etc…

    To answer your question about why get_the_ID() doesn’t work on archive pages, why would it? It’s an archive, not a post/page. There is not ID to get.

    From your posts here, you’ve basically solved much of what’s already in the codex regarding how some of these things work; also, I’m fuzzy on what problem you’re trying to solve. What is the end goal you’re working towards? I can give you some advice on what I think will work best.

Viewing 25 results - 15,076 through 15,100 (of 32,519 total)
Skip to toolbar