The first day of April started off with attempting to tackle one of the most challenging areas of the XenWord plugin, the Comments System.
In particular, the counts.php page has been rewritten with PHP comments so that the coding can be followed better. The file is incomplete due to one of the four possibilities returning the thread count instead of the count of an array_merge.
Scenario One
A WordPress post is created prior to XenWord activation and has one WordPress comment
Scenario Two
A WordPress post is created prior to XenWord activation and numerous comments are made. Later this thread is tied to a XenForo discussion thread and more replies and comments are done.
Scenario Three
A WordPress post is created after XenWord activation and members add WordPress comments and XenForo replies.
Scenario Four
A WordPress post is created after XenWord activation and no comments or XenForo replies are published.
Scenario one will return a count of 1. Scenario Three and Four will return the thread reply_count which has the correct count.
Scenario Two does not return the correct comment count because it is returning the reply_count for the thread.
After hours of rewriting the count.php file, I'm exhausted and ready for bed. Have a great evening.
In particular, the counts.php page has been rewritten with PHP comments so that the coding can be followed better. The file is incomplete due to one of the four possibilities returning the thread count instead of the count of an array_merge.
Scenario One
A WordPress post is created prior to XenWord activation and has one WordPress comment
Scenario Two
A WordPress post is created prior to XenWord activation and numerous comments are made. Later this thread is tied to a XenForo discussion thread and more replies and comments are done.
Scenario Three
A WordPress post is created after XenWord activation and members add WordPress comments and XenForo replies.
Scenario Four
A WordPress post is created after XenWord activation and no comments or XenForo replies are published.
Scenario one will return a count of 1. Scenario Three and Four will return the thread reply_count which has the correct count.
Scenario Two does not return the correct comment count because it is returning the reply_count for the thread.
After hours of rewriting the count.php file, I'm exhausted and ready for bed. Have a great evening.