Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 16,126 through 16,150 (of 32,519 total)
  • Author
    Search Results
  • #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.

    #104650
    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.

    #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.

    #113709

    In reply to: 2 Bugs

    I haven’t experienced these bugs first hand, but my suggestion would be to try 2.1 when the beta comes out (very soon) and see if these issues resolve themselves :)

    #113715
    Lynq
    Participant

    Hi deathbybear,

    The only way I have found to make this happen is to edit the core code provided by bbpress.

    I am not sure if this is the right way to go, so if someone else can suggest another way then let me know.

    Here is what I have done. I replaced the bbp_list_forums function inside forum-template.php and then inside the loops-single-forum I changed the arguments to enable the last poster.

    function bbp_list_forums( $args = '' ) {

    // Define used variables
    $output = $sub_forums = $topic_count = $reply_count = $counts = '';
    $i = 0;
    $count = array();

    // Defaults and arguments
    $defaults = array (
    'before' => '<ul class="bbp-forums">',
    'after' => '</ul>',
    'link_before' => '<li class="bbp-forum">',
    'link_after' => '</li>',
    'count_before' => ' (',
    'count_after' => ')',
    'count_sep' => ', ',
    'separator' => ', ',
    'forum_id' => '',
    'show_topic_count' => true,
    'show_reply_count' => true,
    'freshness_before' => '<td class="last-posted-box">',
    'freshness_after' => '</td>',
    'show_freshness_link' => true,
    'freshness_author_before' => '<div class="author-box">',
    'freshness_author_after' => '</div>'
    );
    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    // Bail if there are no subforums
    if ( !bbp_get_forum_subforum_count( $forum_id ) )
    return;

    // Loop through forums and create a list
    if ( $sub_forums = bbp_forum_get_subforums( $forum_id ) ) {

    // Total count (for separator)
    $total_subs = count( $sub_forums );
    foreach ( $sub_forums as $sub_forum ) {
    $i++; // Separator count

    // Get forum details
    $count = array();
    $show_sep = $total_subs > $i ? $separator : '';
    $permalink = bbp_get_forum_permalink( $sub_forum->ID );
    $title = bbp_get_forum_title( $sub_forum->ID );

    // Show topic count
    if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );

    // Show reply count
    if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );

    // Counts to show
    if ( !empty( $count ) )
    $counts = $count_before . implode( $count_sep, $count ) . $count_after;

    // Show topic count
    if ( !empty( $show_freshness_link ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
    $freshness_link = bbp_get_forum_freshness_link( $sub_forum->ID );
    $freshness_author = $freshness_author_before . bbp_get_author_link( array( 'post_id' => bbp_get_forum_last_active_id( $sub_forum->ID ), 'size' => 14 ) ) . $freshness_author_after;
    $freshness_link = $freshness_before . $freshness_link . $freshness_author . $freshness_after;
    }

    // Build this sub forums link
    $output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $counts . $freshness_link . '</a>' . $show_sep . $link_after;
    }

    // Output the list
    echo $before . $output . $after;
    }
    }

    Let me know how you get on, good luck!

    #44899

    I’m trying to implement a “Quick Post” box using the New Topic Form shortcode, [bbp-topic-form], but it seems non-admin users cannot post using the form (it says, “You cannot create new topics at this time.”). The same users can post a topic by actually going into the forums, so I’m wondering what the issue might be.

    The website URL: capital.businesses.org.nz

    It’s a subdomain installation of a multi-site network (businesses.org.nz), which in turn is part of a multi-network installation (using the ‘networks for wordpress’ plugin).

    #113692
    vibol
    Member

    This looks like an issue with WP_Meta_Query issuing a CAST for all rows in wp_postmeta during the query.

    Relevant LOCs in meta.php:

    $where[$k] = ' (' . $where[$k] . $wpdb->prepare("CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string})", $meta_value);

    There are several options to pursue:

    * Store thread ids in a separate table and intercept get_meta_sql filter to update the query to look in the correct table for _bbp_topic_id lookups.

    * Update WP_Meta_Query to read relevant types from type-specific tables (i.e. wp_postmeta_unsigned) for topic_id lookups. Requires updating mechanisms to save metadata into type-specific tables as well.

    What are some other options?

    #44892

    Hi,

    How can I rename Topics to Tickets in BBPress? I have renamed the tags as such but would like the actual topics heading to read Tickets.

    I also notice on this message system you have a sub menu ‘not resolved’, ‘resolved and ‘not a support question’, which is something I would also like to include.

    I am trying to build a Project Management and Support system that includes tickets. I already have a general forum function via Buddypress, so I created a secondary forum page called tickets and included the shortcodes to configure it as a ticket system.

    I have looked around the net and here extensively, so forgive me if I have overlooked something obvious.

    Thanks in advance.

    #113691
    vibol
    Member

    This seems to have the right idea, but I’m not sure it covers WP_Query queries where the search criteria is against a meta key. The query has to cast an unindexed full-text field to char across N rows to find matching values.

    The generated query fragment that is problematic is this:

    wp_postmeta.meta_key = '_bbp_topic_id'
    AND CAST(wp_postmeta.meta_value AS CHAR) = '787852'

    It’s a core issue since Threads are used to group up Posts.

    #113681
    acousticwebdesign
    Participant

    Thanks Sniper Kitten, that’s very helpful.

    What about the backtick functionality I keep seeing in the forums? From what I can guess, this is supposed to let you embed html tags (or similar) in a forum reply between backticks and have those tags show up (encoded) in the reply. Is this only a feature of 2.1 as well? It’s not working right now on my forum. This is really the only functionality I need right now.

Viewing 25 results - 16,126 through 16,150 (of 32,519 total)
Skip to toolbar