Forum Replies Created
-
In reply to: Add reply programatically
the quick and dirty solution is to get the topic IP before executing bbp_insert_reply and reset it afterwards
eg (untested)
$reply_data = array('post_parent'=>$post_parent, 'post_content' => $post_content); $reply_meta = array('forum_id'=>$post_forum_id, 'topic_id' => $post_topic_id); //get the topic IP so we can reset it later $ip = get_post_meta( $topic_id, '_bbp_author_ip', false ); bbp_insert_reply($reply_data,$reply_meta); //reset the topic IP update_post_meta( $topic_id, '_bbp_author_ip', $ip, false );
I could spend a long time working out a more elegant fix, but hopefully the above will be enough !
In reply to: Add reply programaticallyok, I know why it is doing it, I’ll do some digging to see how to get around
your function calls
bbp_insert_reply
this function is in
/includes/replies/functions.php starts line 29
This creates the reply, and then on line 64 it has
// Update the topic $topic_id = bbp_get_reply_topic_id( $reply_id ); if ( !empty( $topic_id ) ) { bbp_update_topic( $topic_id ); }
bbp_update_topic
is held in/includes/topics/functions.php starting line 818
has a check to see if you are creating or editing a topic.
if you are not editing a topic, it presumes that you are creating so starting line 884
// Update associated topic values if this is a new topic if ( empty( $is_edit ) ) { // Update poster IP if not editing update_post_meta( $topic_id, '_bbp_author_ip', bbp_current_author_ip(), false );
since at that point your call via bbp_insert_reply and bbp_update_topic is NOT an edit, it assumes it is a new topic and updates with the current user IP as above.
let me think about easiest way to fix.
In reply to: Forum not working on my websiteI cannot see from user ned what the problem is.
if you have two sites, one working and one not, then you will need to go through every setting to see where the difference is.
Even if you gave me access to both sites – I could still spend hours working out what is wrong, so sorry that is beyond free help.
In reply to: Whitespace above first image in topicok, so do you have a plugin adding images (eg GD bbPress Attachments) or how do you do this?
In reply to: Add reply programaticallysorry can you just clarify
Topic A
Reply BDoes topic A acquire reply B authors’s IP address, or does reply B get Topic A authors IP address ?
In reply to: Forum not working on my websiteI am fairly sure that this is a theme issue.
As a test switch to the theme twentyseventeen and see if the issue goes away.
No problem
In reply to: Forum Width in Twenty Seventeenno problem, glad to have helped 🙂
In reply to: Remove quotation marks from blockquoteyou’re welcome
In reply to: ERROR: Are you sure you want to do this?ok, no idea why this is happening – it could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.
Then come back
In reply to: Live chat pluginplenty of wordpress live chat plugins, just google ‘wordpress live chat plugin free’
In reply to: Whitespace above first image in topicyour image is using your themes ‘aligncenter’ property, which causes it to display as a new block, so it starts ‘under’ where the author finishes.
I’m not sure how you are adding images – do you get an option of how to display them, if so don’t do center
In reply to: Any Way to Convert WordPress Comments to BBPressgreat post – thanks for taking the time to fully document this 🙂
In reply to: Combine WordPress Comments and BBpress Postsgreat post – thanks for taking the time to fully document this 🙂
the shortcode goes in say page content.
so create a page and put
[bbp-single-topic id=$topic_id]
In reply to: Forum Width in Twenty Seventeenvia css try
.has-sidebar:not(.error404) #primary { width: 100% !important; }
you can set it to more than 100% if you wish !
try my style pack plugin, it has this + many other features and will save you having to maintain code
In reply to: Importing data via sqlThe file is :
/bbpress/includes/admin/converters/Example.php
so if you go to
you can download it to your PC and open the file
In reply to: Whitespace above first image in topicis your forum public? If so post a link and I’ll see if a simple css change is needed
In reply to: Whitespace above first image in topichmm – could be a whole host of things
does this happen with all images?
Only just started or always been the case or new to using images?
Just you account or everyone?In reply to: Search a single forum with bbPressThis approach is not working anymore
did it work and has stopped, or has it never worked for you?
In reply to: Recent replies listok, remove the whole line
<?php echo do_shortcode(‘[bbpress_recent_replies_by_topic show =5]’) ?>
then add this to your functions
add_action( 'bbp_template_before_forums_loop', 'call_bbpress_recent_replies_by_topic' ); function call_bbpress_recent_replies_by_topic () { echo do_shortcode("[bbpress_recent_replies_by_topic show=5]") ; }
This just hooks to the line after the one you’d added
<?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
so saving you having to amend that template.
This works on my site.
In reply to: Adding Author’s Role as Class to Replies/Topics?ok, which div do you want the class added to, give me the existing class/classes in that div so I can identify
In reply to: How to fix fatal error?In reply to: Importing data via sqlgreat – glad to have helped 🙂