Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,676 through 7,700 (of 32,505 total)
  • Author
    Search Results
  • Robkk
    Moderator

    I think the plugin bbPress style pack has a shortcode for this type of thing.

    #167481
    Robkk
    Moderator

    You do not need to create a page at all just create a custom link in the menus section to /forums on your site.

    https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

    #167480
    Robkk
    Moderator

    See if this custom CSS will help. Add it to your child themes style.css file or in a custom css plugin or wherever you can place custom CSS.

    #bbpress-forums fieldset.bbp-form textarea {
        border: 1px solid #ccc;
    }
    #167474
    Pascal Casier
    Moderator

    @davidschwartzer,
    Happy to see you are getting where you want.

    To close this from my side, I have found a hardcoded folder name, so that’s probably why the css is not correctly loaded. I see in your source : <link rel='stylesheet' id='bbpmsclosednogrey-css' href='http://appletechtalk.com/wp-content/plugins/bbp-manage-subscriptions/css/closednogrey.css?ver=4.3.1' type='text/css' media='all' /> but most probably your folder is not called ‘bbp-manage-subscriptions’, right ? For this version, please rename the folder under the plugins folder and reactivate. Will be fixed in next version.

    Enjoy bbpress !

    Pascal.

    #167468
    Robkk
    Moderator

    @jrunfitpro

    Sorry for the late reply.

    Since you said it is not a plugin issue causing it and you have done other troubleshooting to see if a code snippet in a theme could be causing it, create a test user, just a participant/subscriber user, then you can deactivate bbPress so I can see the issue you are getting. Contact me through email so that you do not need to post login details on the forum.

    Contact


    @bdsand

    If you have already done some troubleshooting and have not found an issue, you can let me test to see what could be causing the issue too.

    #167458
    Robkk
    Moderator

    Could be an issue with theme compatibility in bbPress. To get around that make a bbpress.php file in your theme.

    Getting Started in Modifying the Main bbPress Template

    You can see what WordPress conditionals affect what bbPress pages by using the test that is explain in this ticket from the user. Or you can check the theme compat file in bbPress.

    https://bbpress.trac.wordpress.org/ticket/2723

    #167457
    DevynCJohnson
    Participant

    I have tried commenting out the following lines from ./includes/core/filters.php, but without success.

    add_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow',   50   );
    add_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow',   50   );
    #167456
    Robkk
    Moderator

    Would yu be able to tell me what line(s) in the file I would change if I want to go back to a right side bar like the rest of the pages?

    I just edited this gist file so just recopy the code to bring the sidebar back if you do want to use the login widget.

    https://gist.github.com/robkk/b97ff7d7655080cbcaab

    If I ever want to change themes will I still be able to use this file? I suppose I can see if a new theme has issues. If not, I guess I am OK. If I do, can I use this file as is or does it need to be modified for each theme?

    Every theme could be different. Most important the surrounding divs and their classes in simple themes, but it could get more way more complicated in some theme frameworks.

    #167453
    Robkk
    Moderator

    Did you place the forum index shortcode into a static WordPress page?? Does clearing cache fix the issue??

    Troubleshooting

    #167430
    Robkk
    Moderator

    I forgot you are using the Responsive theme and you shouldn’t get the same issue as some other theme frameworks.

    Remove your CSS and use this code for your bbpress.php file. It should work fine and be full width for your bbPress pages.

    https://gist.github.com/robkk/8a2a01a4d0e7d29c9d12

    #167425
    Robkk
    Moderator

    @davidschwartzer

    Your forum urls for each section is weird for some reason. Have you added a slug that is something like this forums/forum for the forum root slug in Settings > Forums in the WordPress backend?

    Your forums archive page is blank and only showing a sidebar login widget.

    appletechtalk.com/forums/

    Yet strangely here is how your forum archive should look like and yet it is in a single forum page. Since this is a single forum page there is a reason there is this notice, as single forums should have topics and not a forum archive. I think you could have possibly echoed a forum index shortcode in the single forum bbPress template?? I am not sure though, I am just guessing.

    Oh bother! No topics were found here!

    appletechtalk.com/forums/forum/forums/

    A single forum page should have this by default.

    yoursite.com/forums/forum/forum-name/

    Or if you have categories

    yoursite.com/forums/forum/category-name/forum-name

    Your topics are fine though.

    appletechtalk.com/forums/topic/notes-not-syncing/

    I am not sure how much template editing you may have done, but can you rename your bbpress folder in your child theme to like bbpress-1 so I could see without any template edits what were your original issues then I can try to help you on that.

    #167424
    Robkk
    Moderator

    Sorry you had to start over, but glad you got bbPress working fine on your site.

    Make sure to take regular backups, so that you do not have to just redo everything and just restore to a previously saved backup.

    https://codex.wordpress.org/WordPress_Backups

    Backing up your Database and Files

    #167422
    mica123
    Participant

    Thank you very much. I did set up the bbpres.php template on the basis of page.php – the same way as I did in my test site. However, this does not work for the user profile at all on the live site for some strange reason. Just now I found a workaround by using CSS – not sure if this is the correct way. But I would really like to know what the bbpress.php works for all pages except the user page. The CSS I used is:

    body.bbp-user-page.single.singular.bbpress div#content.grid.col-620 {
    		width: 100%;
    	}
    
    	body.bbp-user-page.single.singular.bbpress div#widgets.grid.col-300.fit {
         		display: none;
    	}
    

    Please let me have your thoughts.

    #167419
    Robkk
    Moderator

    This might be related to your theme and bbPress theme compatibility. I think what you are experiencing is similar to what other theme frameworks could experience with bbPress.

    https://bbpress.trac.wordpress.org/ticket/2545

    There might be a workaround for this though by using the template you are already using and creating a bbpress.php template from that so that all your bbPress pages you that template.

    Use what the file to find out what template is being used from your theme for the other bbPress pages, then copy that template and rename it bbpress.php.

    Getting Started in Modifying the Main bbPress Template

    #167416
    Robkk
    Moderator

    The forum search should show up on the forum archive page that is usually yoursite.com/forums by default and I do see it there on your site.

    The input box for the math captcha could just be a CSS issue. Unless you have anonymous posting activated in bbPress, you may need to send me account details for a Subscriber/Participant test user account as I may need to be logged in to your site to be able to even see the captcha.

    Also not sure why you are using bbPress with some other forum software plugin, you could possibly get issues by having them both activated together. If you are just importing from one to the other your simplepress data should stay in your database and you just import all of that.

    You should try some troubleshooting to see if some of the issues could be theme related. Make sure to check in a theme like Twenty Twelve, and also check to see if Simplepress could be causing an issue if you have it activated with bbPress.

    Troubleshooting

    #167414
    Loc Pham
    Participant

    I’m using bbPress’s “favorite” feature as “like” feature in other social networks in my application. Is there a function which would allow me to count the number of users whom “favorited” a topic? I’m also interested in counting the number of subscribed users for a particular topic as well. I’ve looked into /bbpress/includes/topics/templates.php but did not find any and wondering if you’re aware of any.

    Thanks.

    #167402
    oliver_rub
    Participant

    Hey guys,
    i have the problem that moderators in my forum can assign/modify tags at all. According to the bbPress role they should be able to do so. The template checks whether tags are allowed (which is true, since normal users (=participants) and admins can successfully post tags). I tried to fix it with the following code:

    function rub_fix_moderator_tags_capability($allcaps, $caps, $args){
    
    	if($args[0] !== 'assign_topic_tags'){
    		return $allcaps;
    	}
    
    	if(bbp_group_is_mod()){
    		$allcaps['manage_topic_tags'] = 1;
    		$allcaps['edit_topic_tags'] = 1;
    		$allcaps['delete_topic_tags'] = 1;
    		$allcaps['assign_topic_tags'] = 1;
    	}
    
    	return $allcaps;
    }
    add_filter('user_has_cap', 'rub_fix_moderator_tags_capability', 10, 3);

    Not sure whether this approach is correct, since it doesnt solve my problem 😉 Also when i try something like echo current_user_can('assign_topic_tags'); in there as a check, the page doenst load anymore.
    But also I´m a little bit clueless in terms of where to look for a solution. I created a somewhat clean install (just copied over the files, but new db) using the twentyfifteen theme, and there moderators are also not able to post tags. In terms of plugins I only have BuddyPress and bbPress enabled.
    Has someone an idea where to start looking or how to approach this?

    #167399
    Loc Pham
    Participant

    My post stripped the bracket in my endpoints, it should be the following instead:

    http://localhost:8888/wp-json/wp/v2/topic?filter[forum_type]=sports
    http://localhost:8888/wp-json/wp/v2/topic?filter[forum]=sports
    #167396
    Carp Talk
    Participant

    For anyone looking for a better and easier way to do this, i just added this to header.php after the

    							<?php if ( is_user_logged_in() ) { ?>
                
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" >My Account</a>
                    <ul class='sub-menu'>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>replies" >My replies</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>topics" >My topics</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>favorites" >My favorites</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>subscriptions" >My subscriptions</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Edit profile</a></li>
                    </ul>
                </li>

    It works a treat and i even guessed the edit lol

    #167395
    Carp Talk
    Participant

    Hi guys i have used the code above and it works perfect, one problem i have though is it appears in every menu (3 of them) as shown in the screen shot how do i get it to show only in the top right ?

    Here is the screenshot

    Here is the code i used

    // Filter wp_nav_menu() to profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {
        if (!is_user_logged_in() && $args->menu->slug == 'right-top-nav')
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user = $current_user->user_login ;
            $class = 'sub-menu';
            $profilelink = '
                <li><a href="/forums/users/' . $user . '/">My Account</a>
                    <ul class=' . $class . '>
                        </li><li><a href="/forums/users/' . $user . '/replies">My Replies</a></li>
                        <li><a href="/forums/users/' . $user . '/topics">My Topics</a></li>
                        <li><a href="/forums/users/' . $user . '/subscriptions">My Subscriptions</a></li>
                        <li><a href="/forums/users/' . $user . '/edit">Edit My Profile</a></li>
                    
                
            ';
            $menu = $menu . $profilelink;
            return $menu;
     
    }<code></code>
    #167394
    Carp Talk
    Participant

    Hi guys i have used the above code but the profile link appears in every menu. How do i add it to just the top menu ?

    #167380
    mica123
    Participant

    @robkk
    Thank you so much. I finally got the wp-login forms working. I even managed to style them by enqueuing the login style sheet. Here I have a question – I used the following:

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_template_directory_uri() . '/style-login.css' );
        wp_enqueue_script( 'custom-login', get_template_directory_uri() . '/style-login.js' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    This is fine, but the style sheet is loaded in my theme directory (responsive). I tried to load it into my child theme (responsive-child-theme) but it doesn’t work. Is the maian theme directory the correct location? What happens if the theme is updated?

    All this is new to me as I never set up a forum before, just websites. I am concerned about security. I am going to install Akismet. Should I also do something about honeypot registration? If so, what would you recommend? Would you also recommend reCaptcha? If so, what would be the best way to implement it?
    Many thanks.

    #167363
    Robkk
    Moderator

    In the code I posted the menu links should lead to the default WordPress forms.

    Login, Register, Lost Password links

    Other plugins can add frontend forms like Theme My Login, woocommerce, some other membership plugins.

    I am basically saying the bbPress forms are incomplete in functionality, it might be better to use something else like the default WordPress forms.

    #167357
    mica123
    Participant

    Yes, I am using the bbpress forms. Where would I find the default WordPress forms? Also, by other frontend forms – I am not sure what you mean? It is just difficult for me to understand that by not using the bbpress forms, redirects will show error messages without any code?

    #167356
    Robkk
    Moderator

    Are you trying to use the bbPress shortcodes in pages for logging in and registering??

    These forms are really incomplete in functionality, they don’t redirect back to the login form and show error messages above that form, it just redirects to the default WordPress form to show the error messages. I think using the default WordPress forms or other frontend forms are better for now.

Viewing 25 results - 7,676 through 7,700 (of 32,505 total)
Skip to toolbar