Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,951 through 11,975 (of 32,504 total)
  • Author
    Search Results
  • Robin W
    Moderator

    Have you tried copying and renaming your full width page template as per

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

    #145969

    In reply to: Forum Page not working

    Stephen Edgar
    Keymaster

    @buzzybee24 In your WordPress theme folder eg \wp-content\themes\mytheme

    Look for a file named page.php and make a copy of this file and rename it to bbpress.php

    #145962
    theENiGMAman
    Participant

    Thanks @robin-w it is in fact a theme issue, I’m now guessing there is some snippet of code which i’ll have to insert into the theme, does anyone know by chance which code snippet is required, or have a link to another thread on here to help my boneheaded self out – thanks again for all your help 😀

    #145947
    Robin W
    Moderator

    ok thanks – I can only assume that this is related to how wamp deals with local urls, as I can neither see how the code could get to that stage, nor can I replicate on-line.

    However leave it with me, and I’ll see if I can add some code that checks to see if it looks like a url.

    If you leave these both blank, does it go to a login or 404 page as it should?

    JBBoY
    Participant

    Hi community,

    I’m trying to redirect all the register steps out of wp-admin or wp-login.php to finally hide completely wp-admin section to users. Since now I’ve succeed with registration and field errors, but now I’m trying to do the same with the help of [lost-password].

    The shortcode above works properly but the problem comes when an email with the /wp-login.php?action=rp&key=Y4I9GCCGagXxiaWk&login=my_user redirects the user to the wp-admin/wp-login area. This area has two fields “New password” and “Confirm new password”. Is there a shortcode who shows the same two fields in a custom page without the need of use wp-admin/wp-login area?

    Thank you in advance for your help and time.

    #145928
    Robin W
    Moderator

    Maybe not the most elegant, but this is quick and easy and should do it

    In you theme, create a folder called ‘bbpress’ eg

    wp-content/themes/your-theme-name/bbpress

    then create a file called

    content-single-user.php

    into that put the following code

    <?php
    
    /**
     * Single User Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <div id="bbpress-forums">
    
    	<?php echo 'Sorry access not permitted' ; ?>
    </div>
    
    

    then save this file to the bbpress folder you created above

    If you want to completely hide the page, you could just put say your homepage url into the echo line and they would just be taken to the homepage.

    #145926
    Robin W
    Moderator

    Ok so you’re a wordpress site – so see

    Codex

    for step by set how to install

    #145922
    Homika
    Participant

    I found this one: https://wordpress.org/support/topic/javascript-error-on-pages-without-sharebar
    The hack proposed in that topic solved my issue which was caused by JS error. Hoping that plugin will be fixed at some point, so I don’t need to hack into its code with every update…

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

Viewing 25 results - 11,951 through 11,975 (of 32,504 total)
Skip to toolbar