Search Results for 'code'
-
AuthorSearch Results
-
December 5, 2019 at 1:06 pm #206654
brownbagmarketing
ParticipantI tried some of those steps.
But looking at the MemberPress plugin code, it looks like no matter what the [bbp-forum-index] shortcode would not trigger a login form.
And not only for that shortcode, but it exposed all content on the entire page to a non logged in user.I’ll play around with your suggestion some more as I don’t like the thought of overriding the memberpress plugin filters like this.
Thanks
December 5, 2019 at 12:33 pm #206648rhysedwards
ParticipantI have also tried adding ‘add_theme_support( ‘bbpress’ );’ to the main theme’s functions.php.
I have tried following the instructions here: https://codex.bbpress.org/themes/theme-compatibility/
Which recommended copying the bbPress plugin files to the root of my theme folder. This has also produced no results.
December 5, 2019 at 12:32 pm #206647brownbagmarketing
ParticipantAdded this to my theme functions file:
// Adding function to block page content for any pages containing bbpress shortcodes.
add_filter(‘mepr-pre-run-rule-content’, ‘do_block_the_content’, 99, 3);function do_block_the_content($block, $current_post, $uri) {
$block = 1;
return $block;
}
It seems to be doing what I want, but we’ll see.December 5, 2019 at 12:30 pm #206646rhysedwards
ParticipantI have added a forum page already. that is where i put this shortcode: [bbp-forum-index]
December 5, 2019 at 12:12 pm #206644Topic: Issue when you use left aligned images
in forum TroubleshootingChuckie
ParticipantI noticed an issue yesterday and it has to be to do with CSS styling.
I inserted an image (using TinyMCE toolbar) and left aligned it. It was the last thing on the topic.
When I hit submit I found that the small dotted footer line and freshness note just under it were going straight through the image. Since the image was left aligned I had a paragraph of text to the right of it that went half way. The there was this footer.
So it did not bypass this image and place the footer below the image. In the end I had no choice but to either leave the image with no alignment or center align it. Then the footer is correct.
Surely there should be a
divaround the topic or reply content and then the footer and freshness note below that. It would then avoid this issue since the left aligned image would be inside thatdivand the footer area pushed down under thediv.December 5, 2019 at 11:11 am #206641rhysedwards
ParticipantI have created a theme, and installed bbPress. I followed the getting started instructions in the documentation, and added the [bbp-forum-index] shortcode to my forum page.
Under my theme, no forum appears, nothing at all. However if I activate a default theme the forum shows.
How do I add a forum to a wordpress theme that i created? I couldn’t seem to find anything on the internet to help with that part.
Many thanks
WordPress 5.2.4
bbPress Version 2.6.2December 4, 2019 at 6:15 pm #206632brownbagmarketing
ParticipantI have the exact same issue.
Any page that has a bbpress forum shortcode on it, the memberpress login does not appear on it and the forum does, even if the user is not logged in.December 4, 2019 at 12:02 pm #206622In reply to: Change bbPress role for WP users who change WP role
Robin W
Moderatorso you will either need a hook from your CiviCRM code, so need to query this with them, or as you suggest have a cron job.
In the spirit of community software, if you write such a function, then yes please do share it here so that other people who would like to do this canb make use of it
December 3, 2019 at 3:44 pm #206588In reply to: Issue with “bbPress Advanced Statistics”
Chuckie
ParticipantSince the function still needed a return value I wrapped the actual
forloop instead.But I don’t know if it was coincidence or what but i site seemed more sluggish. I have commented that code out even though it worked. Maybe the check is done fairly frequently. I don’t know.
I will leave it for the moment as it is. Worse case scenario is that I switch off showing the last 24 hours activity as there is a setting for that.
December 3, 2019 at 1:30 pm #206586In reply to: Issue with “bbPress Advanced Statistics”
Robin W
Moderatorok, very quick as I am passing
If you just want it to display for logged in but not for others, then just change
return $HTMLOutput;to
if (is_user_logged_in()) { return $HTMLOutput; }December 3, 2019 at 1:06 pm #206585In reply to: Issue with “bbPress Advanced Statistics”
Chuckie
ParticipantIt seems to be this html that builds a load of divs:
function build_html() { $this->sort_users(); $data = $this->stats_builder(); $HTMLOutput = ""; foreach( $data as $key => $html ) { $HTMLOutput .= "<div class='bbpas-" . $key . "' id='bbpas-" . $key . "'>" . $html . "</div>"; } return $HTMLOutput; }That is called by this:
function widget( $arg, $instance ) { echo $arg['before_widget'] . $arg['before_title'] . $instance['heading'] . $arg['after_title'] . $this->_parent->online->build_html() . $arg['after_widget']; }So the
is_logged_intest would have to be applied tobuild_htmland if$keyis a certain value do the logged in test.Elsewhere i found this:
// Section: Users active in last x hours if(in_array( 'last_x_hours', $stat ) ) { $HTMLOutput["inactive"] = $this->section_userstats( $this->stats, "inactive" ); }So I guess the
$keyof interest isinactive. Funny index to use for that …December 2, 2019 at 7:30 pm #206547In reply to: Threaded Replies Not Working
jrv123
ParticipantTry a permanent fix to the code…
Make the fix to line #18 of reply.js (see https://bbpress.org/forums/topic/threaded-replies-not-working/)
All of a sudden, creating replies to replies started adding ‘_bbp_reply_to’ items to the ‘postmeta’ table, where that key has the value of the row to which the reply is being created.
Nested/indented replies suddenly started doing their thing; i.e., indenting to the level of reply-to-reply they are.December 2, 2019 at 11:01 am #206529In reply to: Threaded Replies Not Working
jrv123
ParticipantSpecifically I am looking for some theme that works like is documented here: https://codex.bbpress.org/features/reply-threading/
December 2, 2019 at 10:24 am #206522In reply to: Threaded Replies Not Working
John James Jacoby
KeymasterHierarchical replies do not use the post_parent column. Replies always use post_parent for the topic ID.
The hierarchy/relationship is instead determined using a piece of postmeta, similar to the topic and forum connections.
So when you say they aren’t working, are they really not working visually, or are they not working the way you expected them to?
We coded them this way, so that all post to post relationships could use the same mechanism, eventually allowing them to be swapped out for something even more performant later (taxonomy connections, or a custom database table.)
December 2, 2019 at 9:22 am #206520Topic: Position of subscribe and favourite
in forum TroubleshootingChuckie
ParticipantI only just noticed this. I don’t know if it is a bbp style pack issue as I am using that plugin for the style.
Look at this topic at the Favorite | Subscribe links:
https://www.dropbox.com/s/5b9zxi8xhf9sdpw/issue-ok.png?dl=0
They look fine. But when I have a topic which has a longer title:
https://www.dropbox.com/s/i26c3tsv1mtx56c/issue-not-ok.png?dl=0
Visually it is appearing as:
| Unsubscribe FavoriteIt should be:
Favorite | UnsubscribeIs this a bbPress 2.6.x issue or a bbp style pack issue.
November 30, 2019 at 6:28 pm #206486In reply to: bbp-topic-form won’t show up properly on mobile
Prima M
ParticipantHy You can try this…
/* BBPress Fix Topic bbp-topic-form won’t show up properly on mobile */ @media (max-width:380px) and (min-width:320px) { #bbpress-forums .bbp-the-content-wrapper, #bbpress-forums #bbp_topic_title { width: 100%; } }November 30, 2019 at 4:00 am #206466huetherb
ParticipantHere is what I needed to do:
add_filter( ‘bbp_register_topic_post_type’, ‘enable_restAPI_bbpress_topics’, 10,1);
function enable_restAPI_bbpress_topics ($args) {
$args[‘show_in_rest’] = true;
$args[‘supports’] = array( ‘title’, ‘editor’, ‘author’ );
return $args;
}
Notice the supports variable. By includingauthorthat ensures post_author is set.Seriously, BBPress should simply include a setting in backend to enable restAPI. That is the direction that the web is heading in already, with headless CMS, decoupling front and and backend.
November 29, 2019 at 5:47 am #206437Chuckie
ParticipantWell, I am using your bbp style pack. Is it possible that some kind of vent hook had a priority change with the numbers in the source code which is not reflected in the style pack? Ie. Is it possible that in some instances hooks might not get executed? I recall the one instance where the number had been changed. This is only a hunch.
Andrew
November 29, 2019 at 3:58 am #206434In reply to: Trouble using importing tool
tomijolkkonen
ParticipantphpBB version is 3 but not the newest version of it. I’m doing this for another person, who has custom code on the site and he said that he is unable to update the version.
The row amount. I get the same results with either 100 or 1000.
The problem is just that it doesnt recognize the forum folder to get the top parent forums. 2nd problem. The importer changes posts into replies and now every post is a reply.
November 28, 2019 at 2:35 pm #206422Robin W
ModeratorI can create the problem now on my test site. If I add the plugin (which I was doing to de-bug) the problem goes away. This is despite it just being the code that the function uses !
I would like to eliminate that you posted to a closed topic.
I would however like you to look at this situation
Forum a – forum, open, public parent 0
Forum b – sub forum, public, parent forum a
Topic x – an OPEN topic
Reply 1 – a reply to the above topic
reply 2 – a second replycan you get the problem with this set up and my plugin deactivated ?
November 28, 2019 at 2:16 pm #206421Chuckie
ParticipantSo is there any way that I can provide for you the results for:
$ancestors = array_values( array_unique( array_merge( array( $topic_id, $forum_id ), (array) get_post_ancestors( $topic_id ) ) ) );Or
foreach ( $ancestors as $ancestor )?
November 28, 2019 at 2:09 pm #206419Chuckie
ParticipantThis could be why? In your code:
// Reply meta relating to most recent reply if ( bbp_is_reply( $ancestor ) ) { // @todo - hierarchical repliesI had just made a most recent reply. So it is doing nothing. I dunno. You know the code better.
November 28, 2019 at 7:40 am #206400Robin W
ModeratorNo, I’m deep in code, this is not simple !
In your case, If you move the private forum out from under a public forum, I suspect you will work.
November 28, 2019 at 6:07 am #206394In reply to: Title links do not work
J.Parra
ParticipantThanks for your quick response.
I have included this in my css file of the child theme.
# bbpress-forums li.bbp-body ul.forum .bbp-forum-title { float: none! important; }Would it be a correct solution?
What is strange to me is that my theme includes this concrete for bbbress and that it breaks the site when it has always worked well.
Anyway, solved, thank you very much.
November 27, 2019 at 4:48 pm #206378In reply to: Title links do not work
John James Jacoby
KeymasterLooks like an issue with the CSS in the theme:
https://www.racingonlineclub.com/wp-content/themes/sportcenter/css/leaf-bbpress.css?ver=5.3
Line 741:
float: left;Remove the float, and everything snugs back up nicely, and the
divbelow the title stops overlapping it. -
AuthorSearch Results