Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 16,101 through 16,125 (of 32,503 total)
  • Author
    Search Results
  • #108146
    Lynq
    Participant

    It does depend on the theme of course, but I will try my best. Also please remember that this involves editing the core and is not recommended (but I can’t see another way to achieve this?).

    If you set the show_freshness_link to true and then add a freshness before of <td> and freshness_after of </td> this will add an extra td tag inside the template.

    You will then need to add an extra <th> to the table heading, or it will break your table and you will have blank spaces inside the forum list.

    If you are using a non table layout, then you just need to give it a class and deal with it in css like the reply count and post count data.

    Inside loop-single-forum.php I changed my bbp_list_forums arguments to accept the changes inside the core function, for example…

    array( 'show_freshness_link' => true, 'freshness_author_before' => '<div class="author-box">', 'freshness_author_after' => '</div>')

    You can then change the freshness_author_before and the freshness_author_after values to change the html.

    Good luck!

    #113754
    @mercime
    Moderator

    bbPress 2.0.2 is compatible with WP 3.3.2 AND BuddyPress 1.5.5

    Since you’re using BuddyPress, check out https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    #113738
    stoeffel-media
    Participant

    <?php echo bbp_user_profile_edit_url(); ?> isnt working, no output at all.

    Any other suggestions? Cant be that difficult? Maybe someone from bbpress support can help?! :-)

    #108145
    Lemius
    Member

    Lynq: Thanks for sharing that. Incase there’s others like me who can play with the css and the html but don’t know knees from elbows about the php, can you maybe give a little advice on what would need to be customized in the theme to accommodate the changes you’ve made there?

    I can’t readily tell what that code would effect. It’d be really appreciated.

    tvector
    Member

    Hi John,

    I have this same issue. See my other topic here for a better explanation.

    WP Menu does not stay active when navigating forums

    Basically, the WP Menu that is linked to the forum is fine until you start to enter subforums and topics.

    Same goes if you use a bbpress shortcode in a page and link it to a WP Menu item.

    #113737
    Lynq
    Participant

    That should echo it out for you as well I think.

    If it doesn’t then you can just use echo in front of it. Might be a good idea to get to grips with a bit of PHP if you are looking at anymore customization.

    It is fairly easy to move things around and echo different bits out.

    echo bbp_user_profile_edit_url();

    That is it

    #113560
    Lynq
    Participant

    Inside your theme folder for bbpress.

    /wp-content/plugins/bbpress/bbp-themes/<YOUR_THEME>

    #113749
    Lynq
    Participant

    These will do the majority of your forum, in fact, I think they might do all of them? Check it out and see what you get.

    if (get_post_type() == 'forum')
    if (get_post_type() == 'topic')
    if (get_post_type() == 'reply')

    if((get_post_type() == 'forum') or (get_post_type() == 'topic') or (get_post_type() == 'reply')) {
    get_header(‘page’);
    } else {
    get_header();
    }

    Give it a try.

    #44994
    Eric McNiece
    Member

    I’m debugging a site right now and trying to get the “trash” link to show up for Subscribers as well as admins. This is a fresh install of WP 3.3.2, URE and bbPress 2.0.2. Despite checking the “delete_replies” box in User Role Editor, the link still does not show up for Subscribers!

    Digging deeper: line 1370 of bbp-reply-template.php shows this:

    if ( !current_user_can( 'delete_reply', $r ) && !empty( $r ) )

    unset( $r );

    … which is good – checks for permission, and if the user doesn’t have ‘delete_reply’ on $r node then it unsets the delete link.

    So why does the URE checkbox not enable this link? Looking at an unserialized string of user capabilities for the current Subscriber role shows this:

    ...

    'subscriber' =>

    array (

    'name' => 'Subscriber',

    'capabilities' =>

    array (

    'assign_topic_tags' => 1,

    'delete_replies' => 1,

    'delete_topics' => 1,

    'edit_replies' => 1,

    'level_0' => 1,

    'publish_replies' => 1,

    'publish_topics' => 1,

    'read' => 1,

    ),

    ),

    ...

    and we see here that the capability showing is ‘delete_replies’, NOT ‘delete_reply’!!

    So all that needs to be done to fix this is adding another capability in URE that lists as ‘delete_reply’ instead of ‘delete_replies’. Easy fix!

    Here’s the disclaimer: there are a ton of plugins installed right now, so I’m not even sure ‘delete_replies’ permission is part of bbPress. If bbPress indeed does not add its own delete permission, then this is NOT a bug – just an interesting quirk!

    #113559
    Nate
    Participant

    @Lynq … which folder?

    Thanks!

    #113736
    stoeffel-media
    Participant

    I am not very good in php, how do I display this link? Do you have a code for me with echo function?, thx!

    #113735
    Lynq
    Participant

    I found this in the template files.

    <?php bbp_user_profile_edit_url(); ?>

    #109992
    sxalexander
    Member

    This is a bit late, but I think there’s another way to solve this.

    I think the most WordPress-y way to accomplish this is to add the following to your theme’s /functions.php:

    add_post_type_support('forum', array('thumbnail'));

    This will add the featured image metabox to all forums. See here for more details:

    https://codex.wordpress.org/Function_Reference/add_post_type_support

    #44972
    stoeffel-media
    Participant

    Hello everyone.

    I already searched for my problem but couldnt find any working solution for my bbpress 2.0.2.

    Since there is no direct link for users to change their profile (not good), therefore I am searching to generate a link to put in a header or so.

    I only found solutions for older bbpress installations with user id (number) but in the new bbpress it looks like you need userNAMES.

    Can somebody paste me a working php code to display a profile-link? Thx!

    StephAO
    Member

    My question is should i put your code here:

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    or there:

    wp-content/themes/genesis/functions.php

    ?

    Is there a special spot in the file ?

    Thanks

    StephAO
    Member

    Hi Jaredatch,

    I tried to add the code in

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    But the message still appearing.

    “Ce forum contient 5 sujets et 8 réponses, et a été mis à jour par”

    (it s in french).

    I added the code like that:

    add_filter( ‘bbp_get_single_forum_description’, ‘ja_return_blank’ ) );

    add_filter( ‘bbp_get_single_topic_description’, ‘ja_return_blank’ ) );

    function ja_return_blank() {

    ja_return ”;

    }

    ?>

    Just before the ?>

    I’m using Genesis WordPress Theme.

    I also tried to add the code there:

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    Same problem a white page.

    #110907
    Lynq
    Participant

    So all you need to do at the moment is have something like:

    a custom page metabox for the post which saves the forum id after it has been created by the Posts 2 Posts plugin.

    Then in your single.php file you can use the bbPress functions to retrieve the relevant topics for the forum id assigned to that post.

    if ( bbp_has_topics( array( 'post_parent' => $postmeta["forum_id"] ) ) )
    bbp_get_template_part( 'bbpress/loop', 'topics' );

    Lynq
    Participant

    Oh right ok.

    You may want to use something like:

    if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => true, 'order' => 'DESC', 'posts_per_page' => 5 ) ) )
    bbp_get_template_part( 'bbpress/loop', 'topics' );

    #113148
    Lynq
    Participant

    Hi Scheena,

    I did it with the following piece of code:

    <div id="recent-topics-block">
    <?php
    if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) )
    bbp_get_template_part( 'bbpress/loop', 'latest-topics' );
    ?>
    </div>

    #113729
    Lynq
    Participant

    You would probably have to look into either, building your own plugin to create the widget (Which you could do quickly by replicating the bbPress widget code) or customize the bbPress widget.

    This could also be achieved with css, by having a fixed height and width and then adding overflow hidden, but you would have a little difficulty with the … part.

    Good luck!

    Lynq
    Participant

    Using

    bbp_list_forums( array ('forum_id' => '') );

    will return a list of the forums, you just need to specify it with a forum ID. Which you might be able to get from your post meta data?

    kennymcnett
    Member

    This seems simple, but I can’t for the life of me find it documented (I’m probably just missing it). Any help from the community would be much appreciated.

    How do I show a forum using php, without using do_shortcode(); ?

    Also, how can I start a new loop to fetch a specific forum’s contents? I think it’s with BB_Query, but I can’t figure out the syntax.

    Thanks in advance,

    Kenny

    #110901
    eternal noob
    Participant

    @Gautam

    1. When creating a post or page I create a relation to a topic-tag, and then use that topic-tag as a “forum” and linking/fetching it on thepost or page itself. Is that what you are saying ? So how could I create a relation from post/page to topic-tag when posting ? Could there be a way to enable topic-tags for the standard post-type perhaps so a meta-box would occur beneath the standard post tag ? Or should I just create another custom taxonomy ?

    It is a very good solution, Gautam. Beautiful and simple. Thank you.

    @jaredatch

    https://wordpress.org/support/topic/plugin-bbpress-topics-for-posts-forum-for-post-in-stead-of-topic/

    Yes, I know. Thanks.

    @Lynq

    That is an alternative solution, but as pointed out not what I am looking for.

    @To the thread

    Just to make it clear – I dont want an entire bbpress-installation for every post or page. But some kind of automation, so I would not have to insert a forum manually by shortcode. It is just another way of commenting more focused like in the bottom of amazon.com when you are iewing a book for example.

    It is not a big problem as such. But it is obvious to replace the wordpress-comment system which is totally hopeless and lacking for a blogging platform. It is amazing that wordpress doesnt have any creative thoughts on commenting. WordPress should have invented disqus – not disqus. Disqus is really useful – but disqus takes control from you. P2 has some, sure.

    Thanks for any input,

    Jacob

    #110897
    eternal noob
    Participant

    Hi, Gautam.

    Could you write a couple of more lines – Im not sure I understand. But actually, That would a bit like hypercomments – If one could only make topics as comments and then the topics up for discussion would be fetched back by shortcode. Are you thinking about the way wordpress supportforums are working now ?

    Thanks.

    #99550
    kennymcnett
    Member

    Litso, would you mind posting your code? This sounds like what I need to do, but I don’t know how to change the $obj->request like you mentioned works.

Viewing 25 results - 16,101 through 16,125 (of 32,503 total)
Skip to toolbar