Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,251 through 10,275 (of 32,504 total)
  • Author
    Search Results
  • Robkk
    Moderator

    for just the forum and topic title links

    #bbpress-forums a.bbp-forum-title, 
    #bbpress-forums a.bbp-topic-permalink {
    font-size: 16px;
    }
    #154006
    packzap
    Participant

    Yes, that was the problem. I added bb_ to table prefix and re-ran. Now it imported all users, forums, topics and posts from old version 1.2 bbPress. Woo-hoo! Thanks.

    #153999
    chero123
    Participant

    hello, good day!…I want to put a button "thanks" for each post in the user profile and the Times Appears "Thanked"

    but I find this plugin or shortcode, or a way to do

    example:

    I found this plugin: https://wordpress.org/plugins/bbpress-like-button/

    but does not show the data in the public profile …

    although the plugin either to pay, no matter
    It is now important for a forum

    help!
    kind regards

    Robin W
    Moderator

    Try

    Forum/Topic headings

    #bbpress-forums ul.forum-titles
     
     {
    font-size:  16px;
     }

    Topic/reply text

    #bbpress-forums .bbp-topic-content p, 
    #bbpress-forums .bbp-reply-content p
     
     {
    font-size:  16px;
     }
    #153993
    Robin W
    Moderator
    #153988
    Sam Rohn
    Participant

    bbpress 1.0.2 is obsolete for a few years now and is no longer supported, current bbpress is version 2.5.4

    https://wordpress.org/plugins/bbpress/

    using wordpress and bbpress 2.x, you could set up wp at domain.tld/blog and put bbpress (2.x) on a wp page like domain.tld/blog/forum

    see the bbpress codex for more info on setting up bbpress 2

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

    see here for info on importing other forums

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

    sam

    Pavle123
    Participant

    Code above should be added to your functions.php file in your theme folder.

    #153978
    Robin W
    Moderator

    And how do I remove Topic:

    I’ve not tested but believe this will do it

    function my_generate_titles( $new_title ){
            // reset the format to title only
    	$new_title['format'] = '%s';
    	return $new_title;
    
    }
    add_filter( 'bbp_before_title_parse_args', 'my_generate_titles' );

    come back and let us know if it does or doesn’t

    #153976
    Stephen Edgar
    Keymaster

    Thanks for the screenshots, indeed it looks like no forums or topics are actually being imported.

    A quick look at your forums_forum` table leads me to the following in how the forum section of your custom importer should look like, it is not complete as you have more data that what I could see in the screenshot you posted.

    
    
    		/** Forum Section *****************************************************/
    
    		// Forum id (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'forum_id',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_forum_id'
    		);
    
    		// Forum parent id (If no parent, then 0, Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'cat_id',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_forum_parent_id'
    		);
    
    		// Forum title.
    		$this->field_map[] = array(
    			'from_tablename' => 'forum',
    			'from_fieldname' => 'f_subject',
    			'to_type'        => 'forum',
    			'to_fieldname'   => 'post_title'
    		);
    
    		// Forum slug (Clean name to avoid conflicts)
    		$this->field_map[] = array(
    			'from_tablename'  => 'forum',
    			'from_fieldname'  => 'f_subject',
    			'to_type'         => 'forum',
    			'to_fieldname'    => 'post_name',
    			'callback_method' => 'callback_slug'
    		);
    
    		// Forum description.
    		$this->field_map[] = array(
    			'from_tablename'  => 'forum',
    			'from_fieldname'  => 'f_subject',
    			'to_type'         => 'forum',
    			'to_fieldname'    => 'post_content',
    			'callback_method' => 'callback_null'
    		);
    
    		// Forum dates.
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_date',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_date_gmt',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_modified',
    			'default'      => date('Y-m-d H:i:s')
    		);
    		$this->field_map[] = array(
    			'to_type'      => 'forum',
    			'to_fieldname' => 'post_modified_gmt',
    			'default'      => date('Y-m-d H:i:s')
    		);
    

    If you modify your forum section per the above I think you will find you will now have forums imported, if you have a more detailed i.e. “full” view of the forum data I can help work out what elese we can add for a more complete import, the same goes for topics, if you can add full screenshots of ALL the rows in your forums_forum and forums_topic tables I can work out what else needs to be added 🙂

    Pavle123
    Participant

    I have been using this piece of code to call the default bbPress breadcrumbs.

    /**
     * Filter to call default bbPress breadcrumbs
     */
    add_filter( 'bbp_get_breadcrumb', 'myfix_bbp_get_breadcrumb', 1, 3 );
    function myfix_bbp_get_breadcrumb($trail, $crumbs, $r){
            // This will remove wordpress-seo filter to disable bbPress breadcrums by default
            remove_all_filters("bbp_get_breadcrumb",10);
            return $trail;
    }
    #153965

    Topic: bbpress button thanks

    in forum Plugins
    chero123
    Participant

    I want to put a button "thanks" for each post in the user profile and the Times Appears "Thanked"

    but I find this plugin or shortcode, or a way to do

    example:

    I found this plugin: https://wordpress.org/plugins/bbpress-like-button/

    but does not show the data in the public profile …

    although the plugin either to pay, no matter

    It is now important for a forum

    help!
    kind regards

    #153947
    Robin W
    Moderator

    you can just show the latest topics as a list by using

    http://www.mysite.com/topics

    say as a menu item or make this your home page.

    alternately you can post the latest xx topics using

    bbp additional shortcodes

    #153944

    In reply to: Templates problems

    Robin W
    Moderator
    #153941

    In reply to: Separate forums?

    Robin W
    Moderator

    no problem

    set up your ‘cars’ as categories
    Dashboard>forums>new forum. Call it say GM then on the right hand side you’ll see ‘Type’ change this to category

    Save this and exit.

    The in

    Dashboard>forums>all forums you have your forum list. For the GM forum, hover over the ‘edit’ option, and at the bottom of the screen you’ll see something like

    http://www.mysite.com/wp-admin/post.php/post=123&action= edit
    

    Make a note that 123 equals the GM forum category – you’ll need this later.

    The create your sub forums as forums eg Buick, Cadillac, and on the right and side make these have a parent of GM

    Then create a wordpress page called say GM, and put the shortcode

    [bbp-single-forum id=123]

    where 123 was the post number of the category forum you noted above

    Then just add this page to your menu

    #153934

    In reply to: Meta query in Views

    robsward
    Participant

    Hi!

    Since I only had three values, I used the following to get around the ‘OR’ issue:

    'meta_key' => '_bbps_topic_status',
    'meta_value' => '3',
    'meta_compare' => '!='

    However, I now have another question, which is that I want to exclude from this view posts whose last reply author’s role is not keymaster or moderator. I have this logic in a template file to help me style the author link:

    		$reply_post_id		= bbp_get_topic_last_active_id();
    
    		$reply_author_id 	= bbp_get_reply_author_id( $reply_post_id );
    
    		$reply_author_role 	= bbp_get_user_display_role( $reply_author_id );
    
    		if( $reply_author_role == "Moderator" || $reply_author_role == "Keymaster" ) {
    			$role = "moderator";
    		} else {
    			$role = "";
    		}

    What I’d like to do is roll this into the query to return a list of topics/threads whose status is not ‘3’, and whose last active user does not belong to either the Moderator or Keymaster groups. Not sure if this is even possible, since one seems like it requires the WP_Users_Query– perhaps I should create a separate meta_key/value pair for the last active user role?

    Thanks again

    #153925
    Stephen Edgar
    Keymaster

    This can be quite complex and is really not a “bbPress”, it is more a Apache/Nginx “thing”, take a look at the following on Stack Overflow, it describes the changes needed to redirect via .htaccess an old vBulletin to bbPress site:
    http://stackoverflow.com/q/13920322/1911294

    #153924
    Stephen Edgar
    Keymaster

    HI @maddogmcewan, as per my note above, I split this to a new topic as there are sure to be a couple of things that will get confusing if we continued in that same topic.

    To start with you should take a look in your wp_posts table, you should be able to find bbPress three custom post types forum, topic, and reply in the post_type column.

    1. Check if you indeed have some post types forum in your wp_posts table.
    2. Now find a topic in the wp_posts table, look at the post_parent, the ID of that field should relate to one of the ID values of the actual forums you found in step 1.
    3. Replies are the same, find a reply, look up the post_parent and check if a topic with that same ID exists.

    I’m expecting you have some mismatched data from your import and it is a matter of digging in to find what is broken in the data relationships.

    #153922

    In reply to: Meta query in Views

    Stephen Edgar
    Keymaster

    Here is the resultant SQL query for your code above:

    
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
    FROM wp_posts 
    INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id
    INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
    INNER JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id)
    WHERE 1=1 
    
    AND ( ( YEAR( post_date ) = 2014 ) )
    
    AND wp_posts.post_type = 'topic'
    
    AND (wp_posts.post_status = 'publish'
    	OR wp_posts.post_status = 'closed'
    	OR wp_posts.post_status = 'private'
    	OR wp_posts.post_status = 'hidden')
    
    AND (wp_postmeta.meta_key = '_bbp_last_active_time'
    	OR (mt1.meta_key = '_bbps_topic_status'
    		AND CAST(mt1.meta_value AS CHAR) LIKE '%1%')
    	OR (mt2.meta_key = '_bbps_topic_status'
    		AND CAST(mt2.meta_value AS CHAR) LIKE '%2%') 
    	)
    
    GROUP BY wp_posts.ID
    ORDER BY wp_posts.post_date DESC
    LIMIT 0, 15
    

    I think you are hitting a known limitation of WordPress at the moment nesting queries, take a look at Boone’s posts on the improvements coming to WordPress 4.1:

    Meta, Date, and Tax Query improvements in WP 4.1

    …classes currently accept a ‘relation’ parameter, which allows multiple query clauses to be joined with AND or OR. So, for instance, you can query for: posts that are in the ‘Boone’ category AND have the tag ‘Awesome’ AND do not have the term ‘Raphael’ in the favorite_turtle taxonomy. But this syntax only allows for so much expressiveness: you can’t mix AND and OR, and you can’t group clauses. These limitations make it difficult to use these queries in support of complex content filtering…

    Then take a read of the follow up post explaining what has happened since that first post, I haven’t had the time to look at how this changes affect bbPress, they should not break bbPress, but these will be something we will take a look at to a) Ensure bbPress is not affected by these WordPress 4.1 updates and b) How we can leverage these improvements in future versions of bbPress.

    Update on Query improvements in 4.1

    #153921

    In reply to: Help Css & Layout

    Robkk
    Moderator

    @mnhfile well i dont know why you have it only showing when the parent theme is activated , its suppose to work too when you just put the file in a bbpress folder in your child theme.

    maybe you put the file in your parent theme too, or edited the bbpress templates in the plugin folder which you should not do , since when either of these things update , you will lose all your modifications.

    i did look at your website , it is coming together kind of nicely

    the weird layout that makes it look like any additional categories below the first category look like subcategories with the space to the left and everything, this might be a little design issue, it kind of did this when i was testing the file earlier.

    if you want switch out robins file with this one, just copy and paste right over it using a text-editor like notepad++ test it out and see how it does on your site.

    https://raw.githubusercontent.com/robkk/better-bbpress-responsive-theme/master/bbpress/loop-forums.php

    And can I do some modification in each tab like hiding or disclosing tab contents(forums)

    please explain a little bit more on what you are talking about, i have an idea and assume it might be some custom development work , but explain a little bit more just to make sure.

    #153919
    8ird
    Participant

    Hi there,

    I’ve been successfully clinging on to bbPress 1.2 (last standalone) with my forum, so far without any problems.

    Sadly that changed about a month ago when the forum suddenly started fetching “wrong” time stamps for user posts.

    Now when I say wrong time stamps, what I really mean is differing time stamps, from what I could observe of about one hour.

    Lets say I post something at 2pm, then one of my users comes on and he posts a reply shortly after. Now that reply doesn’t get a time stamp of, say, 2pm1min, but instead 3pm1min. The forum will now treat this post as if it were posted in the future, resulting in the output “posted -1 year ago” until forum time is past 3pm1min.
    The second and more urgent consequence is that if I or anybody else with the “right” time stamp assigned to them will post another comment within that hour, that reply will be added in the wrong order prior to the first reply.

    As for solving this issue, I have tried to figure it out in the code (to no avail) and even did a rollback of the forum and database to March 2014 for test purposes, yet the issue persists.
    This leads me to believe that it cannot be related to any bad code (especially since the software and Plugins haven’t been touched in months), but rather that there may have been a fundamental change in the way the date function in post.php works. I can’t even seem to figure out where bbPress would fetch it’s time data from.

    Banging my head against the wall at the moment, any help would be hugely appreciated.

    Cheers
    Lars

    #153915
    robsward
    Participant

    I’m trying to create a View that uses the following arguments, using meta_query and date_query, but it doesn’t seem to filter at all and displays all posts:

    $args2  = array( 
            'orderby' => 'post_date',
    	'order', 'DESC',
            'meta_query' => array(
                 'relation'  => 'OR',
                 array(
    	             'key'      => '_bbps_topic_status',
    	             'value'    => '1',
                     'compare'   => 'LIKE'
                 ),
                 array(
    	             'key'      => '_bbps_topic_status',
    	             'value'    => '2',
                     'compare'   => 'LIKE'
                 )
             ),
            'date_query' => array(
    	        array(
    		        'year'  => date( 'Y' ),
    		        'month' => date( 'M' ),
    	        )
            )
    	);
    	bbp_register_view( 'unsolved-tix', __( 'Unsolved Tickets', 'textdomain' ), $args2, true );

    Using just a single meta_key works fine, but in these args, neither the date_query nor meta_query work. Are these unsupported?

    #153907
    FrancescoR
    Participant

    Hi, I have some problems to create my custom layout.

    In practice, the problem is that my theme has the feature to create templates through pages.
    Now, when I create a new page and use [bbp-forum-index] shortcode, I see the page themplate like I want, but when I click on a topic, the layout change.

    This, probably, because URL changes, in fact topics always follow root forum setted on forum settings. And, if i leave the check (that one that set root default root for all contents) I got a 404.
    Instead, if I set forum root like page permalink the layout is the standard one.

    Maybe is my theme, but the code is really hard to understand, so I just need that all contents follow the page url and template.

    my page code:

    <?php get_header(); ?>
    <?php 
    
    $layout_obj = new C5_theme_layout();
    
    $layout_obj->build_layout('page');
    
     ?>
    			
    
    <?php get_footer(); ?>

    I hope that someone can help me, thanks and sorry for my english

    #153886

    In reply to: Allow HTML from users

    Stephen Edgar
    Keymaster

    @richkraetsch I expect this to be more of an issue with the GD BBPress Tools plugin rather than bbPress, they should have support in that plugin for the custom HTML tags it is using.

    You can also try this plugin (and remove that custom code you added), I just added div and sub element class to this and it should work for you, you will need to double check and modify it to remove any HTML tags you do not need, also the next release of bbPress includes some more changes to the allowed KSES HTML tags so you’ll need to update and possibly make some more changes once bbPress 2.6 is released.

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

    #153884
    albnaldo
    Participant

    Also, how do I remove Topic: and Forum: slug at the title of the page? Where should I enter the filter code?

    #153875
    emrphy
    Participant

    I’m trying to set up bbPress, but I’m not using the postname permalinks (for SEO reasons), which is causing problems. So I tried setting it up using Method 2 in the setup guide, which is basically just setting up a page with [bbp-forum-index] on it. That works, but now none of the non-index forum pages work. Just 404 pages.

    What should the Forum Root Slug and Single Forum Slugs be? I’m thinking that may be the problem. I’ve been messing around with them but haven’t been able to fix them yet. Thanks for any help!

Viewing 25 results - 10,251 through 10,275 (of 32,504 total)
Skip to toolbar