Search Results for 'code'
-
AuthorSearch Results
-
October 20, 2016 at 9:15 pm #178584
Topic: template hierarchy in visual mode?
in forum Installationracfish78
ParticipantThis page is a great initiative to make explained each part.. but for me still has a problem…
I can’t identify those parts in the layout… could someone do a visual scratch for elements over some “twenty” template?
I really, really appreciate ๐
October 20, 2016 at 10:05 am #178574In reply to: BBpress 2.6 alpha – problem importing phpBB
Steveim
ParticipantHi. I have just converted a PHPBB v3.1.10 to BBPress using the 2.6 alpha version. I am unsure whether the user passwords are converted or not.
In the codex https://codex.bbpress.org/getting-started/importing-data/import-forums/phpbb/ it says “Existing passwords are converted during the import so users can login to WordPress/bbPress as soon as the import and recounts have finished.”
However, in the importer it says “Non-bbPress passwords cannot be automatically converted. They will be converted as each user logs in.”I don’t know if they have been converted or what is meant by “They will be converted as each user logs in.”
Can you tell me what the status of the WP User passwords is and what the users can or need to do?
Cheers
October 20, 2016 at 8:45 am #178572In reply to: Show whole forum in heirachal format
THWright
ParticipantI can’t recall where I had found this code, fairly certain on the forums here, but here is a pastebin of the code:
http://pastebin.com/J9whPuCVIt shows category forums and then any forums beneath it, up to one level. It isn’t the entire hierarchical display but could be modified somehow, I would imagine, to show more. How I’m not sure.
You will want to place this file in your child theme in the themes/childtheme/bbpress directory; you’ll want to name the file loop-forums.php
Note: I did change the names of my forum’s columns to Topics, Posts, and Recent, for what its worth.
October 19, 2016 at 6:53 pm #178564Topic: Problems with permissions?
in forum Troubleshootingmaegras
ParticipantHi all i’m new to bbpress. I read lot of docs but i was unable to solve this issue
I’m setting up a forum for my website, i installed bbpress, created a forum, created a page with bbpres shortcode and now i’m able to see forum root clicking on the link in menu.
I can create discussions from backend but when i try to create a new topic from frontend, logged in as admin, i got “you don’t have permission to post”.
How could it be?
October 18, 2016 at 8:27 am #178528In reply to: BBPress slowness save
Stephen Edgar
KeymasterIf it’s taking 15 seconds to do add a reply or a topic you most definately have a plugin or theme manipulating post queries, most likely
pre_get_postsfilter is running in a plugin, maybe a theme.Please disable ALL our plugins and test the speed again please.
If the speed remains the same, try switching to the Twenty Fourteen theme.
You’ll also notice here on bbpress.org it does not take 15 seconds
October 17, 2016 at 5:45 pm #178512In reply to: Display is Cluttered, not like Documentation
Robin W
Moderatorsomething is broken !
can you tell me how your page is set up?
see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/
and which of item 3?
October 15, 2016 at 5:53 pm #178490contemplate
ParticipantHi All. Needed this exact behavior as well. It really should be the default behavior. But if you don’t want to hack the core here is the code to place in your functions.php or custom plugin:
/** * Format the BuddyBar/Toolbar notifications * Fixed: https://bbpress.org/forums/topic/new-reply-notification-link-to-the-reply/ */ function bbp_format_buddypress_notifications_custom( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { // New reply notifications if ( 'bbp_new_reply' === $action ) { $topic_id = bbp_get_reply_topic_id( $item_id ); $topic_title = bbp_get_topic_title( $topic_id ); $topic_link = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $item_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $item_id ); $title_attr = __( 'Topic Replies', 'bbpress' ); if ( (int) $total_items > 1 ) { $text = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items ); $filter = 'bbp_multiple_new_subscription_notification'; } else { if ( !empty( $secondary_item_id ) ) { $text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) ); } else { $text = sprintf( __( 'You have %d new reply to %s', 'bbpress' ), (int) $total_items, $topic_title ); } $filter = 'bbp_single_new_subscription_notification'; } // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link ); // Deprecated BuddyBar } else { $return = apply_filters( $filter, array( 'text' => $text, 'link' => $topic_link ), $topic_link, (int) $total_items, $text, $topic_title ); } do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items ); return $return; } } remove_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10 ); add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications_custom', 10, 5 ); /** * Hooked into the new reply function, this notification action is responsible * for notifying topic and hierarchical reply authors of topic replies. * Fixed: https://bbpress.org/forums/topic/new-reply-notification-link-to-the-reply/ */ function bbp_buddypress_add_notification_custom( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = false, $author_id = 0, $is_edit = false, $reply_to = 0 ) { // Bail if somehow this is hooked to an edit action if ( !empty( $is_edit ) ) { return; } // Get autohr information $topic_author_id = bbp_get_topic_author_id( $topic_id ); $secondary_item_id = $author_id; // Hierarchical replies if ( !empty( $reply_to ) ) { $reply_to_item_id = bbp_get_topic_author_id( $reply_to ); } // Get some reply information $args = array( 'user_id' => $topic_author_id, 'item_id' => $reply_id, 'component_name' => bbp_get_component_name(), 'component_action' => 'bbp_new_reply', 'date_notified' => get_post( $reply_id )->post_date, ); // Notify the topic author if not the current reply author if ( $author_id !== $topic_author_id ) { $args['secondary_item_id'] = $secondary_item_id ; bp_notifications_add_notification( $args ); } // Notify the immediate reply author if not the current reply author if ( !empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) { $args['secondary_item_id'] = $reply_to_item_id ; bp_notifications_add_notification( $args ); } } remove_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10 ); add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification_custom', 10, 7 );October 15, 2016 at 4:10 pm #178488In reply to: how to create dynamic reply-box
Jon Fergus
Participantr-a-y and Robkk, you can have a look on my staging site’s group topic to see the reply form location issue live. This is how it operates for me (using Robkk’s example above): Attempting to reply to Reply 1 will prompt the reply form to appear under Reply 3. Attempting to reply to Reply 2 will also prompt the reply form to appear under Reply 3. The only time the reply form appears where we want it is when replying to Reply 3 (i.e. the last reply of any column of replies, so long as there are no sub-replies).
See here: http://staging-nexus.universaltheosophy.com/groups/test-group/forum/topic/test-group-topic/
I think I remember seeing someone playing with the reply.js code trying to tackle this very issue, so will try to find that again. At the time it didn’t help me because I still hadn’t got reply.js to work at all.
I’ll spend some time working through the visual tab issue. Thanks for the links.
October 15, 2016 at 1:10 pm #178487Topic: BuddyPress Group Forums Conditionals
in forum TroubleshootingMilan Petrovic
ParticipantHi,
Does anyone know how to use bbPress conditionals when bbPress is used for group forums? None of the bbp_is_ functions is working outside of the bbPress templates, and the point of the conditional functions is to have them work outside of the bbPress own template so that some other piece of code knows what is the page context. I am trying to use these functions inside the page BODY.
So, how to determine which forum is loaded as group forum, which topic is currently displayed, and anything else related to subpages for edit of topics and replies?
Milan
October 14, 2016 at 2:16 pm #178476In reply to: how to create dynamic reply-box
Robkk
ModeratorOne other little thing though. I notice that the reply form appears below all sub-replies of a reply, instead of directly beneath the intended reply.
I think the reply.js code and possible other areas for threaded replies code can be improved to fix this. No idea how right now.
When the reply form is at its default location in a bbpress topic, the Visual tab works fine. But when the reply form pops up after clicking โreplyโ on a comment, the Visual tab fails to work (canโt type in it or see the contents).
I think this is another known issue. One of these tickets need to possible be reopened and include a patch for this issue.
October 14, 2016 at 8:59 am #178471In reply to: how to create dynamic reply-box
Jon Fergus
ParticipantDamn, another issue has come up. On my main site I’ve added the “Visual” tab to the reply form, using the following code in my functions.php file:
/* add visual editor to bbpress replies */ function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; $args['teeny'] = false; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );When the reply form is at its default location in a bbpress topic, the Visual tab works fine. But when the reply form pops up after clicking “reply” on a comment, the Visual tab fails to work (can’t type in it or see the contents). I reproduced the issue on my staging site for you to see:
http://staging-nexus.universaltheosophy.com/groups/test-group/forum/topic/test-group-topic/
I’m also using the “TinyMCE Advanced” plugin, but can verify that the issue with the Visual tab is independent of that plugin.
October 14, 2016 at 5:18 am #178468In reply to: Differentiate display for topics with participation
benzouye
ParticipantHi,
GD bbPress Toolbox Pro seems to propose what I want … In their “Integration tweaks” there is a “Logged in user reply in topic” option …
https://bbpress.dev4press.com/features/integration-tweaks/
Wish I could see the code only for this option ๐I’ll continue working on it !
Thanks.
October 13, 2016 at 3:32 pm #178450In reply to: how to create dynamic reply-box
Robkk
ModeratorOk. I found the problem: Buddypress.
The functionality of reply.js works for bbpress, but does not work if the topic is in a forum that is within a Buddypress group.
Just tested on your site, as well as my test site. And yes that BuddyPress is related to this issue.
May not specifically be BuddyPress and their code. I think there are tickets with bbPress’ BuddyPress extend code that might have issues with some conditionals in a bbPress post that is in a group.
Will look through bbPress trac for some possibly related tickets.
Edit: Found the ticket.
https://bbpress.trac.wordpress.org/ticket/2974
It is pretty easy to workaround this issue as well, since all you have to do is enqueue the javascript with a different conditional or enqueue it sitewide, but doing it sitewide might cause another issue somewhere.
Will do some testing and get back.
October 13, 2016 at 4:18 am #178426In reply to: Error message when any user posts
james8181
ParticipantI just put your code snipets in and saved it but unfortunately it is not taking effect still.
I cleared cache and tried a difference browser too but not showing up
October 13, 2016 at 4:12 am #178424In reply to: Error message when any user posts
james8181
ParticipantHi Robin,
I re-enabled bbpress and the style pack and it seems stable now.
Your 2 code snippets are saved but not taking effect:
.entry-content fieldset legend {
color: #fff !important;
}#bbpress-forums p.bbp-topic-content, #bbpress-forums p.bbp-reply-content {
color: #1e73be !important;
}A snipet i made myself to style the background of the reply form is taking effect so this customer code area for css in the beaver theme seems to work for bbpress:
.bbp-form{
background-color:rgba(250, 236, 113, 0.90);
}Here is a screenshot of what i still need to style. If you could take a look when you get the chance that would be great. http://imgur.com/a/tKRoc
Many thanks
October 13, 2016 at 3:28 am #178420In reply to: Error message when any user posts
james8181
ParticipantNo worries. I appreciate your help with this Robin.
I am using the beaver builder page builder and their beaver child theme. I am entering it into the Appearance > customizer area. There is an area for code snippets in there. I usually put CSS in their global CSS area but have been advised from beaver builder that CSS that needs to affect dynamically generated pages (ie, not pagesi have created in the wordpress UI) need to be put in here.
October 12, 2016 at 12:34 pm #178402In reply to: Multiple Forums
Robin W
Moderatordepends
if you are just talking about having two forums, then if you want you use shortcodes
single forum [bbp-single-forum id=$forum_id] โ Display a single forums topics. eg. [bbp-single-forum id=32]
and have
page 1
[bbp-single-forum id=32]
Page 2
[bbp-single-forum id=35]
October 12, 2016 at 11:00 am #178397In reply to: Error message when any user posts
Robin W
ModeratorOw!! Sorry – believe it or not, that is the first time anyone has tried that !!
I’ve coded a fix for the next release that will stop that happening in future.
Can you tell me where you are adding those snippets? I’m more dubious on the first, but the second should work.
October 11, 2016 at 4:58 pm #178378In reply to: Error message when any user posts
Robin W
Moderatorok, I think the first is your theme, but try adding this to the custom css
#bbpress-forums p.bbp-topic-content, #bbpress-forums p.bbp-reply-content { color: #1e73be !important; }and also add this for the Reply to :
.entry-content fieldset legend { color: #fff !important; }October 11, 2016 at 6:07 am #178369In reply to: Error message when any user posts
james8181
ParticipantHi Robin,
I have been trying to persevere with this but i am having problems styling this still. I used the parts from the codex to style the background as below, and that is working nicely.
/*1 Forum Header and Footer*/
/*2 Reply header*/
/*3. Template notice info*/
(also manually changed the background color of the reply form)Everything past that up to 8 does not take effect. I would like to just have all of the text in the forum as black as it is currently white on white. My theme settings for text are set to black so i am not sure why it does not inherit this.
I have tried manually changing each element on there but nothing takes effect (tried prefixing them all with #bbpress-forums like your snippets too). IF you could spare a moment could you take a look at the page (I’ve changed it to show when not logged in) and advise me on what i am doing wrong. Below are all of the areas of text i need as black which i am just appending with { color:#000000;}
A) On the list of all forums page:
bbp-forum-info
bbp-forum-topic-count
bbp-forum-reply-count
bbp-forum-freshnessB) on any topic page with create a new topic option:
bbp-forum-description
bbp-topic-permalink
bbp-author-name
bbp-topic-freshness(The following bit of text are just showing as “label” in chrome inspect so not sure how to target them)
Topic Title (Maximum Length: 80):
Notify me of follow-up replies via email
Attachments:
No file chosenC) within a topic with reply option
bbp-reply-content
bbp-topic-description(The following bit of text are just showing as “label” in chrome inspect so not sure how to target them)
Topic Title (Maximum Length: 80):
Notify me of follow-up replies via email
Attachments:
No file chosen2)
I have noticed a seperate issue:
http://clashingbeavers.com/beaver-forums/
If i enter any forum and then navigate back by clicking on the Home > Forums link within bbpress UI it will take me to a diffrerent urlhttp://clashingbeavers.com/forums/
and this one looks different. How to stop it taking users to this other url?
Sorry this went on a bit and your advice is much appreciated!
Many thanksOctober 11, 2016 at 3:24 am #178367In reply to: Error message when any user posts
james8181
ParticipantActually, i will just use change the css using this very informative article:
I was being lazy not to have done this originally!
cheers!October 10, 2016 at 6:56 am #178360Topic: Error message when any user posts
in forum Troubleshootingjames8181
ParticipantHello,
When any user posts in any forum the following error messages appear, however the message DOES actually post. Anyone know what is causing this problem? and how to fix it. I am not a programmer so the code does not mean much to me
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘BBP_Admin_Replies’ does not have a method ‘update_reply’ in /home/clashing/public_html/wp-includes/plugin.php on line 524
Warning: Cannot modify header information – headers already sent by (output started at /home/clashing/public_html/wp-includes/plugin.php:524) in /home/clashing/public_html/wp-includes/pluggable.php on line 1174
WordPress 4.6.1
bbpress Version 2.5.10
Beaver Builder Child ThemeVersion: 1.0
http://clashingbeavers.com/beaver-forums/ (although the forums are hidden when not logged in)Thanks for you help
October 9, 2016 at 11:36 pm #178352In reply to: Separate forum with SSO
Stephen Edgar
KeymasterYes, you sure can, either way you mention would work, another option is multisite.
That said, for either way you mention you’d utilise “shared user tables”
See this codex doc on setting that up: https://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables
October 7, 2016 at 2:53 pm #178327In reply to: Shortcode bbp-single-topic-tag not working
Fourmi
ParticipantSorry my message was lacking one useful info! I’m using it from a theme file’s code, using
echo do_shortcode('[bbp-single-tag id=19]');
(19 is a correct topic tag id)It’s printing the same content that’s in the page I’m looking at (ex: in a forum I see the topics of the forum instead of the topics with the tag). It’s working if I update the query before calling the shortcode:
$wp_query = new WP_Query(array('post_type' => 'topic'));I thought it should be working without having to add this but now it works so I’m happy!
Thanks for your help!
October 6, 2016 at 7:57 pm #178316In reply to: Shortcode bbp-single-topic-tag not working
Robkk
ModeratorIt works fine for me, remember to use a topic tags id instead of a name.
[bbp-single-tag id=$tag_id] โ Display a list of all topics associated with a specific tag. eg. [bbp-single-tag id=64]
https://codex.bbpress.org/features/shortcodes/
To find a topic tags id, you can go to Topics > Topic Tags in the WordPress backend, then edit a topic tag and look at the url. You should see something like this. You can also hover over each edit link and look at the bottom left and see the same url appear. You will see tag_ID=(number).
yoursite.com/wp-admin/term.php?taxonomy=topic-tag&tag_ID=4&post_type=topic&…
To make it easier to find an ID of a post, tag, user, you can also install the Reveal IDs plugins to add a column to tables that show the ID.
-
AuthorSearch Results