gordielachance
Forum Replies Created
-
Forum: Plugins
In reply to: [Pinterest Importer] 19/08/16 : plugin brokenYes.. :/
Seems Pinterest updated its website recently.
I have to review the code to fix it, but I don’t know when I’ll have some time for this.Meanwhile, developpers can help on Github…
I’m trying to find out something to speed up the queries even more.
Could you try to run this query within phpMyAdmin, and tell me an average of the time the query takes and how much posts are returned?
SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = '_bbp_last_active_time' AND wp_postmeta.meta_value > '2015-10-04 11:51:05' ) AND ( mt1.meta_key = 'bbppu_read_by' AND mt1.meta_value = '1' ) ) AND wp_posts.post_type = 'topic' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_status = 'private')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC
Mine is about ~0.03 seconds, returning 233 posts.
This is about 25% faster than the queries from v1.2.7, which was :
SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = '_bbp_last_active_time' AND wp_postmeta.meta_value > '2015-10-04 11:51:05' ) AND ( mt1.meta_key = 'bbppu_read_by' AND mt1.meta_value = '1' ) ) AND wp_posts.post_type = 'topic' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_status = 'private')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC
I also updated the cache system so this query is not run everytime < v 1.2.8.
It would help me to know how much time it takes on forums like yours, with a huge amount of posts. Thanks !
- This reply was modified 8 years, 2 months ago by gordielachance.
- This reply was modified 8 years, 2 months ago by gordielachance.
- This reply was modified 8 years, 2 months ago by gordielachance.
I did try to update the code to make the queries faster; please update to 1.3.0.
It may make a difference.For feedback purpose, you can enable the debug log to get various informations about the plugin, including the queries times.
- This reply was modified 8 years, 2 months ago by gordielachance.
Now (v1.2.9) the two queries are only fetching post IDs instead of full posts, could you give me your feedback ?
Thanks !
Hi and thanks for your feeback.
The line
$transient_duration = null;
should not be there, I made a fix (1.2.8).Here is how works the function *has_user_read_all_forum_topics* :
1/ query to get all the topics of a forum
2/ query to get all the read topics of that forum
3/ if the counts of posts for those two queries matches, then the forum is considered as read.Indeed, that could return a LOT of posts, and that is probably why it is slowing down your forums.
I have to find another solution here.
My first idea would be to use an ‘offset’ :
Do compare the counts of the two queries on a base of, let’s say, 100 items; and abord once it does not match : so if a recent post is unread, it will stops at the first cycle and will not need to query all the posts.
Mhh… Let me think about it. Ideas are welcome !
- This reply was modified 8 years, 2 months ago by gordielachance.
Hi @let-me-see,
I implemented an (optional) “bookmark” function to display a link that goes to the last read reply.
Update to 1.2.7 ! As usual, and because all of this takes time, a href=”https://bit.ly/gbreant”>donate if you like it !Forum: Plugins
In reply to: [bbPress Pencil Unread] Can you add this function?Forum: Plugins
In reply to: [bbPress Votes] Change pts to vote upIt’s done ! See v1.2.2. Donate if you like it, it’s quite a job to maintain all those plugins ??
Forum: Reviews
In reply to: [bbPress Votes] Does not seem to work with latest version of WP@btgjp
It does work. Maybe you should explain your problem better before giving a bad review.Forum: Plugins
In reply to: [bbPress Votes] Change "pts" and hide "sort by score".feature request 1/ is now available !
Forum: Plugins
In reply to: [bbPress Votes] “Solve” topic when reaching a specific amount of upvotes?Yes, using v1.2, you could use our hook ‘bbpvotes_do_post_vote’, which is fired when a vote is submitted.
function my_post_vote($post_id,$voter_id,$vote,$post_score){ if ($post_score >= 50) { //... } } add_action('bbpvotes_do_post_vote','my_post_vote',10,4);
(this has not been tested but should work)
- This reply was modified 8 years, 2 months ago by gordielachance.
Forum: Plugins
In reply to: [bbPress Votes] Vote NotificationHi,
Can you develop ?Thanks
Forum: Plugins
In reply to: [bbPress Votes] Remove Voting from Reply – Vote only on TopicThis has been implemented in the new version; that I hope i’ll finish soon…
Forum: Plugins
In reply to: [bbPress Votes] Change pts to vote upHi, this will be available in next version (soon I hope !).
Thanks for your feedback !Forum: Plugins
In reply to: [bbPress Pencil Unread] Please support Arabic language & RTLHey @mohammad-sy; I think I understood your problem !
Update to 1.2.4, it should work now.