Search Results for 'code'
-
AuthorSearch Results
-
October 7, 2015 at 3:34 am #167482
Robkk
ModeratorI think the plugin bbPress style pack has a shortcode for this type of thing.
October 7, 2015 at 3:24 am #167481In reply to: Need help putting forums in a page
Robkk
ModeratorYou 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
October 7, 2015 at 3:22 am #167480In reply to: Adding a border to topic and rply text boxes.
Robkk
ModeratorSee 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; }October 7, 2015 at 1:31 am #167474In reply to: Remove the Oh Bother – No Forums here box
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.
October 6, 2015 at 11:06 pm #167468In reply to: When I deactivate bbPress, I cannot log in
Robkk
ModeratorSorry 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.
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.
October 6, 2015 at 3:07 pm #167458In reply to: Underscores not show html
Robkk
ModeratorCould be an issue with theme compatibility in bbPress. To get around that make a bbpress.php file in your theme.
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.
October 6, 2015 at 3:04 pm #167457In reply to: Nofollow on Internal Links
DevynCJohnson
ParticipantI 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 );October 6, 2015 at 2:55 pm #167456In reply to: Remove the Oh Bother – No Forums here box
Robkk
ModeratorWould 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.
October 6, 2015 at 1:49 pm #167453In reply to: URGENT – Freshness Name doesn’t update
Robkk
ModeratorDid you place the forum index shortcode into a static WordPress page?? Does clearing cache fix the issue??
October 6, 2015 at 9:01 am #167430In reply to: User profile full width page
Robkk
ModeratorI 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.
October 6, 2015 at 8:21 am #167425In reply to: Remove the Oh Bother – No Forums here box
Robkk
ModeratorYour 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.
October 6, 2015 at 7:34 am #167424In reply to: forums redirected to 404 page
Robkk
ModeratorSorry 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
October 6, 2015 at 7:31 am #167422In reply to: User profile full width page
mica123
ParticipantThank 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.
October 6, 2015 at 7:09 am #167419In reply to: User profile full width page
Robkk
ModeratorThis 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.
October 6, 2015 at 6:19 am #167416Robkk
ModeratorThe 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.
October 6, 2015 at 1:03 am #167414Topic: Count topic’s favorites
in forum TroubleshootingLoc Pham
ParticipantI’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.phpbut did not find any and wondering if you’re aware of any.Thanks.
October 5, 2015 at 5:20 am #167402Topic: Moderator cannot assign tags
in forum Troubleshootingoliver_rub
ParticipantHey 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?October 4, 2015 at 11:42 pm #167399In reply to: Query topics with WP REST API
Loc Pham
ParticipantMy 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]=sportsOctober 4, 2015 at 4:24 pm #167396In reply to: Redirect from page to profile url (menu link)
Carp Talk
ParticipantFor 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
October 4, 2015 at 3:55 pm #167395In reply to: Redirect from page to profile url (menu link)
Carp Talk
ParticipantHi 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>October 4, 2015 at 3:31 pm #167394In reply to: How do you put the "My Profile" link on the menu?
Carp Talk
ParticipantHi 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 ?
October 3, 2015 at 9:24 am #167380In reply to: Login, Register, Lost Password links
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.October 2, 2015 at 6:04 pm #167363In reply to: Login, Register, Lost Password links
Robkk
ModeratorIn the code I posted the menu links should lead to the default WordPress forms.
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.
October 2, 2015 at 5:13 pm #167357In reply to: Login, Register, Lost Password links
mica123
ParticipantYes, 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?
October 2, 2015 at 5:03 pm #167356In reply to: Login, Register, Lost Password links
Robkk
ModeratorAre 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.
-
AuthorSearch Results
