Search Results for 'code'
-
AuthorSearch Results
-
October 21, 2014 at 12:16 pm #153632
In reply to: Wanting to try a new forum but scared and lost!
Robin W
ModeratorbbPress forums can be private, public or hidden.
private are only viewable if logged in, hidden are only viewable by mods and above.
However my private groups plugin will give you all the control you need
https://wordpress.org/plugins/bbp-private-groups/
re importing
October 21, 2014 at 6:31 am #153619Topic: BBpress changing WordPress page titles
in forum Troubleshootingshelleyheath
ParticipantHi There,
I have a website which restricts content via the Groups plugin (https://wordpress.org/plugins/groups/)
On one of the restricted pages I am using the following code to insert a forum: [bbp-single-forum id=12492]
However when working in the frontend and adding a topic, sometimes it renames the actual page… The forum ending to the url just tacks itself to the page on which [bbp-single-forum id=12492] is featured.
Forum page:
Original url:
http://lifepurposecoachingcenters.com/classrooms/pclc-1/
Reset url after it goes wrong:
http://lifepurposecoachingcenters.com/classrooms/pclc-1-a-time-for-introductions/
Any ideas would be much appreciated!
Thanks very much!
October 21, 2014 at 4:41 am #153616In reply to: Disabling topic creation-box
cubeacid
ParticipantOk, thanks for clarifying things, but I’m not familiar with modifying php-code, so I still would need help in this problem :/
October 21, 2014 at 4:20 am #153615In reply to: Disabling topic creation-box
Robin W
Moderatorcreate a directory on your theme called ‘bbpress’
ie wp-content/%your-theme-name%/bbpress
find
wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/%your-theme-name%/bbpress/form-topic.php
bbPress will now use this template instead of the originalI was only suggesting you start with looking at lines 42, I haven’t actually looked seriously at the code, I don’t have time at the moment 🙂
October 21, 2014 at 3:50 am #153613In reply to: How to remove (0,0) in sub forum listings?
Robin W
Moderatorok, the last line has a wrong “‘” type
replace this with
add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );and it should be fine
October 21, 2014 at 3:34 am #153610In reply to: Putting the @username below name
Robin W
ModeratorThis worked well for adding the username, so if i can just remove the full name/image, that out to do it.
If you mean the two bits above what you have just added , then the simplest would be
create a directory on your theme called ‘bbpress’
ie wp-content/%your-theme-name%/bbpress
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/%your-theme-name%/bbpress/loop-single-reply.php
bbPress will now use this template instead of the originalThen simply delete line 45
<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>October 21, 2014 at 3:08 am #153608In reply to: Putting the @username below name
david_ma
ParticipantHow about remove the authors real name and email linked avatar? My users want to use their username only, and a custom avatar.
This worked well for adding the username, so if i can just remove the full name/image, that out to do it.
/** * Add @mentionname after bbpress forum author details */ add_action( 'bbp_theme_after_reply_author_details', 'mentionname_to_bbpress' ); function mentionname_to_bbpress () { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo "@".$user_nicename; } }October 20, 2014 at 5:22 pm #153598In reply to: change style
October 20, 2014 at 4:41 pm #153596In reply to: How to remove (0,0) in sub forum listings?
kendorama
ParticipantNope. I copied all that into my functions and it didn’t work. I’ve googled other solutions which are along the same lines but different code that’s used. I figured it was cause that was outdated and bbPress version is different.
No other solution?
October 20, 2014 at 4:12 pm #153592chero123
Participantsolved, they can close the topic …
with shortcode
October 20, 2014 at 3:46 pm #153591In reply to: Remove box around the author name
lkharrell
Participantnevermind! I just figured it out!
It was
#bbpress-forums a.bbp-author-name { white-space: nowrap; background: none; border: none; }October 20, 2014 at 3:37 pm #153588In reply to: Remove box around the author name
lkharrell
ParticipantOctober 20, 2014 at 3:22 pm #153586In reply to: How to remove (0,0) in sub forum listings?
Robin W
Moderatornot sure why
I’ve read https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ among other tips.
isn’t working for you?
October 20, 2014 at 1:53 pm #153580Topic: How to remove (0,0) in sub forum listings?
in forum Troubleshootingkendorama
ParticipantI’ve googled and searched the support forums and it seems the answers are outdated and don’t currently work on this version of bbPress.
I’ve read https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ among other tips.
Any help?
October 19, 2014 at 2:12 pm #153553In reply to: Disabling topic creation-box
jessy
Participant@cubeacid: You want this: Do not allow users to publish new topics, just replies on your topics. Correct?
1, Install plugin: WPFront User Role Editor
2, Go to Roles => All roles => and choose Participant, it has 8 capabilities
3, You need uncheck publish_topics and edit_topics and assign_topic_tags and delete_topic_tags
4, with this plugin you can do it because it is built in role from plugin bbPress
5, But, we can customize it with filter function pasted below
6, Jast paste it into function.php and refresh the page in admin plugin WPFront User Role Editor in Participate role how magicaly capabilities are removed 🙂
7, If the participant or regular registered user will go on topics, they will be message “You cannot create new topics.” and if user click on your own created topic, he can reply 🙂Paste it into functions.php
function my_custom_get_caps_for_role_filter($caps, $role) { /* Only filter for roles we are interested in! */ if ($role == 'bbp_participant' ) $caps = my_custom_get_caps_for_role($role); return $caps; } add_filter('bbp_get_caps_for_role', 'my_custom_get_caps_for_role_filter', 10, 2); function my_custom_get_caps_for_role($role) { switch ($role) { case 'bbp_participant': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => false, 'throttle' => false, 'view_trash' => false, // Forum caps 'publish_forums' => false, 'edit_forums' => false, 'edit_others_forums' => false, 'delete_forums' => false, 'delete_others_forums' => false, 'read_private_forums' => false, 'read_hidden_forums' => false, // Topic caps 'publish_topics' => false, 'edit_topics' => false, 'edit_others_topics' => false, 'delete_topics' => false, 'delete_others_topics' => false, 'read_private_topics' => false, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => false, 'delete_others_replies' => false, 'read_private_replies' => false, // Topic tag caps 'manage_topic_tags' => false, 'edit_topic_tags' => false, 'delete_topic_tags' => false, 'assign_topic_tags' => false ); break; default: return $role; } }I have try that ad for me it works.
October 19, 2014 at 12:49 pm #153550In reply to: Remove box around the author name
jessy
ParticipantRewrite your theme styles with this, paste this on very bottom on style.css or into <head> tag section and wrap t with <style text/css></style>:
#bbpress-forums p.bbp-topic-meta span { white-space: nowrap; background: none; border: none; }October 19, 2014 at 11:54 am #153547In reply to: Issues inserting/embedding videos
jessy
ParticipantDo you really need this shortcode? I am sorry about this, but for many reasons it is enough to use just video from youtube, because, if you will use the video than you will need CDN also. And this shortcode in my opition do not have nice css stylesheet.
October 19, 2014 at 11:23 am #153544In reply to: Issues inserting/embedding videos
jessy
ParticipantInstall plugin bbPress2 shortcode whitelist.
just write string: video into that small text area
October 19, 2014 at 11:11 am #153542In reply to: Issues inserting/embedding videos
jessy
ParticipantInstall plugin bbPress2 shortcode whitelist
And to settings write video
October 19, 2014 at 10:47 am #153539In reply to: Set featured image for bbpress forum posts
jessy
ParticipantInto your function.php paste this code, you will allow to Custom Post Type forum – bbPress have featured images in admin.
add_theme_support( 'post-thumbnails', array( 'forum' ) ); add_post_type_support('forum', 'thumbnail');October 19, 2014 at 10:29 am #153538In reply to: Issues inserting/embedding videos
mannmithund
ParticipantThank you.
The theme supports videos, i.e. no issues to add them to regular blog posts.
Added the code, this results in
Fatal error: Call to undefined function video().October 19, 2014 at 10:28 am #153537In reply to: Size font bbpress
jessy
Participant1, Go to Appearance => Editor => Style.css edit this file section Reset from mayer, and find there “font-size: 100%; font: inherit;” change it into font-size: 16px; remove font: inherit
Reset section would look like this:
/* ------------------------------------------------------------------------- * * Reset - http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 * ------------------------------------------------------------------------- */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 16px; vertical-align: baseline; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; }Let me know if you need help.
October 19, 2014 at 9:55 am #153536In reply to: Issues inserting/embedding videos
jessy
ParticipantIf your theme support this shortcode on posts and pages we can assume your shortcode is working fine, but bbPress is for security reasons blocking.
Place this code into functions.php
function jm_bbp_shortcodes( $content, $reply_id ) { return video( $content ); } add_filter('bbp_get_reply_content', 'jm_bbp_shortcodes', 10, 2); add_filter('bbp_get_topic_content', 'jm_bbp_shortcodes', 10, 2);Let me know if you need help.
October 19, 2014 at 9:35 am #153535Topic: broken
in forum TroubleshootingLazylonewolf
ParticipantUsing the li(list) HTML tag causes the reply to be broken. Any idea how to fix this?
<img src="http://fc05.deviantart.net/fs70/f/2014/292/8/3/broken_li_by_radstylix-d83ea8x.png" alt="<li> html breaks reply" />Top part of the black line shows a reply without li, while below it shows what happens if li is used.
October 19, 2014 at 9:18 am #153534In reply to: Restricting bbpress to a single forum
jessy
ParticipantTwo solutions:
1, Go to Settings => Forums it is settins for bbPress and just find Forum root should show and choose Topics by Freshness
2, You need to use shortcode [bbp-single-forum id=2766]
It is simple, create one forum and use your single forum ID, you can find it if you hover over the forum in the admin, check the bottom the link and there is the ID, replace it to your shortcode in custom page.
If you need help, let me know.
-
AuthorSearch Results