Forum Replies Created
In reply to: AdRotate Banner Manager
The problem stands in Appearance / Widgets. I add the AdRotate + other plugins inside bbPress Sidebar, but it they are not displayed.
I would like to change the scope of the question, but I don’t know if I have the permissions.In reply to: BBpress free avatar plugin
I was able to use Avatar Manager (for the others I dont have a solution). In my case, the problem was another plugin – Social Socializer, that was overwriting the avatar path uploaded by the Avatar Manager (even if selected “Do not fetch the social avatar”). The solution is to empty the path field from Social Socializer.
The whole logic is on how to get the notifications from your own table synch with the posts table:
global $wpdb; $results = $wpdb->get_results( "SELECT notif.*, p2.post_title, p2.post_name FROM YOUR_NOTIF_TABLE notif INNER JOIN wp_posts p on p.id = (CASE WHEN notif.parent_id > 0 THEN notif.parent_id ELSE notif.topic_id END) INNER JOIN wp_posts p2 on notif.topic_id = p2.id WHERE p.post_author = $current_user->ID AND notif.user_source != $current_user->ID AND notif.unread = 1"); $reply_notifications = array();
Yes, I would like to , I am checking how to port my code to a standalone plugin
As a conclusion, I couldnt find any free plugin for reply / likes notifications to the user. I had to create one.
Thank you for the response. I used it to populate my own table.
On the other hand, there is a second option, maybe more optimized: from phpmyadmin, I created a trigger to populate my table when the information I am interested comes in.
Thank you for the response, I grepped the whole project and I cannot find the hook you mentioned in your previous post.
But I found in …./bbpress/includes/replies/functions.php the handlers for _bbp_reply_to. I should identify the place where wp_postmeta is populated so I can update my own table as you suggested. If I save the _bbp_reply_to information, I can avoid querying the huge meta table.
PS: I identified a corner case (hope not a bug). _bbp_reply_to gives the “real” parent of the post, but not in the case of the topic post (the first one from the topic).
Yes, I see that, the problem is that I don’t want to query wp_postmeta just for the “real parent” post (meaning not the parent from wp_posts aka the first post of the topic, but the post being one level up). I am surprised bbPress does not have a separate table. I wanted to avoid performance problems while quering a large table such as the meta table.
I think I can set triggers on the wp_posts table. The problem is the concept of parent_post.
If you have the structure of posts:
B – C
In wp_posts, A is considered the parent_post and B,C,D and E are considered replies.
However, in bbpress, I am following a different concept forum-like, where B is considered the parent of C and D.
This piece of info is not in the DB. How can I add a column in wp_posts where I keep the “real” parent of each post?