Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,976 through 12,000 (of 32,521 total)
  • Author
    Search Results
  • #145891

    In reply to: Forum Page not working

    Stephen Edgar
    Keymaster

    There are no issues using bbPress 2.5.3 and WordPress 3.9 they are 100% compatible.

    Any issues will be as @phpnukes points out theme issues or plugin conflicts.

    I suspect your issue @buzzybee24 is indeed a theme issue, check your themes faq and/or support sites for information on using your theme with bbPress v2.x. If you can’t find anything most likely you will need to make a copy of your themes page.php file and rename it to bbpress.php in your theme folder.


    @phpnukes
    Your issue will be a plugin conflict as to why some of the items are missing in the dashboard.

    #145888
    Robin W
    Moderator

    great – thank you – I will update the code to stop the error for future users !

    #145878
    Robin W
    Moderator

    ok, just because it was annoying me, I looked further

    you should have a folder in your theme called forums which has a number of .css files in it.

    As far as I can work out, somewhere you can set up schemes for your forums within this these, or another plugin, and you have selected theme 4?

    Anyway two .css files are active

    in http://www.betatestarena.com/forums/

    the page is using

    /forums/#4.css as it’s style file

    This has

    body.it-background {
    }
    

    ie not set, but uses

    body.custom-background {
      background-attachment: fixed;
      background-color: #000000;
      background-image: url("http://www.betatestarena.com/wp-content/uploads/2014/05/Background.png");
      background-position: center top;
      background-repeat: repeat-x;
    }
    

    to give you the background color

    In your other link – http://www.betatestarena.com/forum/announcements/

    the page is using

    /forums/ammouncements/#4.css as its style file

    which has

    body.it-background {
      background-image: none !important;
    }
    body.it-background {
      background-color: #D2D2D8 !important;
    }
    
    

    on lines 760 and 761

    which set the off-white color.

    so play with these settings to get what you want.

    #145859
    laternastudio
    Participant

    For future readers, I was able to accomplish the redirect with this simple line of code:

    add_filter( 'bbp_pre_get_user_profile_url', function() {
    	return get_bloginfo('url').'/profile';
    });

    Very simple, really!

    You can also change the default url for favorites and subscriptions by doing this:

    
    // Replace the default link for the favorites
    add_filter( 'bbp_get_favorites_permalink', function() {
    	return get_bloginfo('url').'/profile/forum-favorites';
    });
    
    // Replace the default link for subscriptions
    add_filter( 'bbp_get_subscriptions_permalink', function() {
    	return get_bloginfo('url').'/profile/forum-subscriptions';
    });
    

    Of course, if you’re using pre PHP 5.3.1 (or are developing a plugin) you’ll need to create actual functions rather than using anonymous functions.

    #145849
    Robin W
    Moderator

    As I think you have guessed as you posted a while ago on the Emphaino wordpress support site, this is a theme issue.

    I can only suggest you try a basic bbpress page to see if this will display sufficiently well to fit in with your theme.

    So create a file called bbpress.php and into this drop the following code

    <?php
    get_header(); ?>
    
    		<div id="container">
    			<div id="content" role="main">
    
    			<?php
    			/* Run the loop to output the page.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-page.php and that will be used instead.
    			 */
    			get_template_part( 'loop', 'page' );
    			?>
    
    			</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    
    

    Then save this file in the root of your theme.

    bbpress will then use this file instead of your theme’s page file for the display of bbpress pages.

    Give it a go, and if it fixes the problem come back and let us know. If it doesn’t then you will need to do some styling, and that will take some research to fix !

    #145848
    Robin W
    Moderator

    Without using code for 21K users, I can get it to 42 quick actions – or the same action 42 times !

    NOW be careful make sure you know who you want to be different – eg administrators, as if you bulk change and then log out without changing back, then you may lose admin access – and then you’ll need to use phpmyadmin using nasty sql stuff to correct this.

    So start by making a list of users with admin, or other wordpress roles you’ll want to be different – write these names onto a post it note and stick this to your screen so you won’t forget !!!!


    Then go into

    Dashboard>users>all users

    At the top right of the page you see ‘screen options’ click this and typically you’ll see a part that says

    20 users apply

    Change this to 999 users and click the apply box.

    This will then display 999 users at a time, so you can bulk change 999 in one go.

    Then next to the ‘username’ heading you’ll see a tick box which is the ‘select all’ option, click this and it will select all 999 of page 1 users

    Above this you’ll see a ‘bulk actions’ and then the bits we want to the right of that – the ability to change the wordpress and forum roles.

    So having ticked to select all the 999 users displayed on page 1, click the ‘change role to’ and select the subscriber role, and then the change box, and hey presto all 999 are now subscribers.

    Tick the ‘select all’ again, and select the bbpress participant role, and change that.

    so now all page 1 users are correctly set.

    Now select page 2 on the right just below the bulk change forum role and repeat !

    So for each page (21 or 22 of them) you do

    Select page
    click ‘the select all’ box,
    click forum to ‘subscriber’ and click change
    click ‘the select all’ box,
    click role to ‘particpant’ and click change
    select next page

    THEN!!!!!!!!!!!!!!!!!!!!!!!!!! CHANGE THE ADMINS BACK BEFORE LOGGING OUT !!!!!!!!!!!!!!!!!!

     

    Probably taken me longer to type these instructions than for you to execute them !

    Mod Note: I edited your post Robin 😉 Cheers, Stephen

    siobhan61
    Participant

    Thanks Stephen,

    Yes, it is weird! The permalink remedy didn’t work but thanks for responding. I think what I’ll do is make note of any code changes I’ve made and then uninstall and reinstall both bbpress and tweaks. There may be some conflict in there that I can’t see — I started this project a few months ago and went away from it for awhile.

    cheers, Cheryl

    mshafshak
    Participant

    i have 21k users that have site roles “none” and empty forum roles thats maybe coz ijust shfted from a joomla website into wordpress & bbpress. I want to make the site role ‘subscriber’ and forum role ‘participant’ to all users how can this be done with writing a code ??

    #145811
    Stephen Edgar
    Keymaster

    The patch should work fine for any user with the capability read_private_replies which includes the included bbPress Keymaster and Moderator. Are you sure the user/role you are using has the read_private_replies capability?

    Install this plugin and navigate to the users profile in the WordPress dashboard to confirm the role and capability of a user.

    https://wordpress.org/plugins/bbp-capabilities/

    #145807
    mlocke90
    Participant

    Should this patch allow anyone who has the read_private_replies cap to see topic content? or just the Admin / keymaster?

    I applied the code and it fixed it for admin/keymasters but not for a custom role with read_private_replies cap.

    Primus Palus
    Participant

    If I view the index of the bbpress forum I can see my background image for my theme. When I click to go into a specific forum, the background is replaced with a color (off white).

    I imagine this is all CSS related and somewhere in the code. I however would like to set all forums to show the same background. I am using a theme called “Explicit” for my wordpress site.

    Thanks. I hate being new to this.

    #145799
    Robin W
    Moderator
    #145794
    Evan Herman
    Participant

    Probably not the most elegant solution, but something I came up with to temporarily resolve the issue.

    First we grab the classes assigned to the body class:

    $body_class = get_body_class();

    Then we just check if bbpress is in the body class array, and if it is, I’ve decided to use jQuery to just switch the classes on the navigation item.

    
    if ( in_array('bbpress',$body_class) ) {
    		?>
    		<script>
    		  jQuery(document).ready(function() {
    		    jQuery('.menu-item-347').removeClass('current_page_parent');
    		    jQuery('.menu-item-2592').addClass('current_page_parent');
    		  });
    		</script>
    <?php
    	}
    
    #145787
    Robin W
    Moderator

    suggest you start with looking at

    bbpress/includes/extend/buddypress/members.php

    This changes bbpress to go to buddypress profile, and should give you all the code you need.

    #145782
    ultramalcolm
    Participant

    I’ve installed bbpress, but when I go to the forum in a browser, I just get this message:

    Fatal error: Class 'WP_Post' not found in /nfs/c09/h02/mnt/137912/domains/profoodblogger.com/html/wp-content/plugins/bbpress/includes/core/theme-compat.php on line 375

    How can I begin tracking this down?

    #145781

    In reply to: text buttons

    mojomo
    Participant

    My theme support was able to solve the problem by applying stylesheet code fixes, thx.

    #145778
    jbdizzle
    Participant

    So I changed the names of the user roles. I would like to change the text color of each role. Here is the code that I am using to change the name. Could I just wrap the role name in a color code?

    add_filter( 'bbp_get_dynamic_roles', 'my_bbp_custom_role_names');
    
    function my_bbp_custom_role_names(){
     return array(
    
            // Keymaster
            bbp_get_keymaster_role() => array(
                'name'         => __( 'The Dragon Born', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
            ),
    
            // Moderator
            bbp_get_moderator_role() => array(
                'name'         => __( 'Moderator', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
            ),
    
            // Participant
            bbp_get_participant_role() => array(
                'name'         => __( 'Legionnaire', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
            ),
    
            // Spectator
            bbp_get_spectator_role() => array(
                'name'         => __( 'Spectator', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
            ),
    
            // Blocked
            bbp_get_blocked_role() => array(
                'name'         => __( 'Blocked', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
            )
        );
    }

    p.s. Is there a way to change what each of these roles have access to?

    #145777
    laternastudio
    Participant

    Hi there,

    I’ve spent a while searching the forums/web regarding custom views, but am a little bit stumped at the moment. Some of the only reference that I’ve found is a bit outdated (though it still seems to work) and incomplete.

    I’d like to create 2 custom views:

    • Display a particular user’s favorites (let’s say user_id is hard-coded to 2)
    • Display a particular user’s subscribed topics (again, let’s say user_id is hard-coded to 2)

    Any points in the right direction? Ideas for resources on the topic of custom views?

    #145774
    laternastudio
    Participant

    Sorry, that wasn’t clear in my first post. They’ll regardless of which user is logged in, they’ll need to go here:

    http://www.example.com/profile

    The session data will determine which information to display.

    #145761
    #145757

    In reply to: Freshness for Category

    Robin W
    Moderator

    Chill, we’ll hopefully work it out.

    you might (should) want to create a test site. Whilst that may seem daunting, it is quite easy to do, and once done a great way to test stuff without risking the live site.

    see

    https://codex.bbpress.org/creating-a-test-site/

    Couple of questons when you are ready

    1. The page you are linking to – this is just a members page, not a link to the forum pages?
    2. What is your forum slug called (go into dashboard>settings>forums and look for forum slug.

    #145756
    Robin W
    Moderator

    Please don’t apologise for inexperience, we’re were all there once !

    Just double checked it and the code is fine.

    Probably an issue with you either not copying across fully, or a paste error.

    Delete the code, copy across again and retry

    if it still fails, come back with the bit of code that is on the line it falls at (and the line before please!)

    and I’ll look further

    #145752

    In reply to: Freshness for Category

    mcleandesign
    Participant

    Boy do I feel like a fish out of water here…sheesh. I’ve been designing for 30+ years and just now moving into this new medium, it’s challenging me for sure. I’m pretty insecure about messing with the code on my own, but have some folks I can draw in to help me with this. But before I do any of that I’ll just throw a few more thoughts into the ring just to clarify. First, yes, this is a paid theme from themeforest as well as the pro version of S2, which is what my suspect is causing the conflict (due to other things I’ve read online. I’ve sent a query to S2 to see what their thoughts are as well).

    I guess what I’m unsure about in your reply above is about the page templates. The only thing I’ve done is install bbPress, click the activate button, and then the sidebar widget disappears. To test this isn’t template related I created a new page, not based on any theme, just added a full width panel and my set the page to show my left sidebar with custom widget.

    I previewed the page, which looked accurate, then activated the bbPress plug in and as suspected, the left sidebar widget disappeared. The theme still show the left sidebar space, but no widget is present.

    So, here I am scratching my head… feeling like a dummy. My first thought is, get another cup of coffee. Second thought is hire you to fix it for me <grin>. #2 sounds like it has much better success. Although, it doesn’t teach me how to overcome my challenge, so, I guess in the long run that is self defeating.

    Ideally, I’d like the forum to function within the space to the right of our sidebar, but haven’t even begun to think about how to even set up the forum yet, still trying to figure out why it’s messing up what I’ve already created.

    While you’re reading this (and probably laughing at my inexperience…which is OK, I laugh at myself all the time) I’ll see if I can decipher the step-by-step instructions. And, truly, if you want to jump in and do some private consultation I’d be happy to give you my phone number and we can talk personally. Don’t know if that breaks rules or what..but just thought I’d throw it on the table.

    Thanks for your help Robin.. I appreciate it more than you know…truly. Also, I’m going to be out of the office most of the day, so we may have to continue this conversation on Monday.

    d

    #145743
    koendb
    Participant

    I had to read better. It was in the Codex is_page() function reference.

    Had to reset the query after the loop:
    wp_reset_query(); // and after that:
    if(is_page()){ // etc.

    Mike
    Participant

    Thanks, but I finished and moved on. I tried and failed with several different approaches like this, but copying and altering 2 functions took less than 2 minutes as the //comments were clear about how to disable the AJAX.

    I took me almost 2 weeks part-time to customise the bbpress forum. I spent a lot of time messing with IDs and classes to target CSS changes and trying to figure out the proper code to modify defaults.

    For example finding the code to return just an “edit” for replies was a matter of great googling and some luck.

Viewing 25 results - 11,976 through 12,000 (of 32,521 total)
Skip to toolbar