Post & Thread Highlight Pro

Post & Thread Highlight Pro [Paid] v1.7.2

No permission to buy ($16.00)
Feature suggestions:
  • Possible to add a 'highlighted' badge on these highlighted posts/thread
  • Alert user if their post/thread gets highlighted
  • the rebuild reactions for highlighted threads phrase is missing
  • ability to only show highlighted posts in a thread for users (use case, long thread, users only want to see highlighted posts) etc.
 
Possible to add a 'highlighted' badge on these highlighted posts/thread
Aren't badges usually controlled by trophy accumulation or similar?
Alert user if their post/thread gets highlighted
Yea, I'll mark this down to include in an update.
the rebuild reactions for highlighted threads phrase is missing
Thanks, I'll fix.
ability to only show highlighted posts in a thread for users (use case, long thread, users only want to see highlighted posts) etc.
How would it work, just a button at the top of the thread if there's highlighted posts to "Show highlights only"?
 
Aren't badges usually controlled by trophy accumulation or similar?
Sorry i meant post indicator i.e. when there is a new post it indicates that the post is new. If it has a star or a indicator saying its highlighted that would be great.
How would it work, just a button at the top of the thread if there's highlighted posts to "Show highlights only"?
Yes exactly that. That would be fantastic.

Can you tell me where, or shoot me a screenshot? I can't find what you're referring to.
The rebuild cache screen after you try to rebuild "Rebuild Reaction Score Post Highlights"

 
Theres a few bugs in the automatic post highlights based on reactions.
1. enabled reaction based automatic post highlighting and set the number of reactions and the reactions themselves.
2. ran the rebuild tools (reaction score post highlights with checkbox CHECKED and user post highlight cache).
3. i see posts with less than the minimum reactions set at 1 with post highlighted.

FTR i have minimum reactions set at 16, and i have a number of posts with say 3 reactions highlighted.

Screenshot 2025-02-13 at 8.41.59 pm.webp

ie these posts are highlighted.
Screenshot 2025-02-13 at 8.43.32 pm.webp

In my tests i did set the number of min number of reactions for highlight as 1 (to get a screenshot for you for the rebuild cache phrase issue else it ran too quick for me to get a screenshot), but its actually found an issue where the rebuild cache for min reaction and deleting the post highlights for posts that dont meet the criteria is not really working.
 
@Wutime , when I upgrade from 1.5.4 to 1.6.0 I get this during the upgrade:

Code:
XF\Db\Exception: MySQL query error [3988]: Conversion from collation utf8mb3_general_ci into utf8mb4_general_ci impossible for parameter in src/XF/Db/AbstractStatement.php at line 230

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 83
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 219
    XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1572
    XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1300
    XF\Mvc\Entity\Entity->save() in src/XF/AddOn/DataType/Phrase.php at line 102
    XF\AddOn\DataType\Phrase->importAddOnData() in src/XF/Job/AddOnData.php at line 112
    XF\Job\AddOnData->run() in src/XF/Job/Manager.php at line 275
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 205
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 121
    XF\Job\Manager->runByIds() in src/XF/Admin/Controller/ToolsController.php at line 146
    XF\Admin\Controller\ToolsController->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
    XF\App->run() in src/XF.php at line 806
    XF::runApp() in admin.php at line 15

Server error log

Code:
 XF\Db\Exception: MySQL query error [3988]: Conversion from collation utf8mb3_general_ci into utf8mb4_general_ci impossible for parameter src/XF/Db/AbstractStatement.php:230

Stack trace

INSERT  INTO `xf_phrase` (`addon_id`, `title`, `version_id`, `version_string`, `language_id`, `global_cache`, `phrase_text`, `phrase_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL query err...', 3988, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(83): XF\Db\Mysqli\Statement->getException('MySQL query err...', 3988, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(219): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1572): XF\Db\AbstractAdapter->insert('xf_phrase', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/AddOn/DataType/Phrase.php(102): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Job/AddOnData.php(112): XF\AddOn\DataType\Phrase->importAddOnData('Wutime/PostHigh...', Object(SimpleXMLElement), 0, 8)
#8 src/XF/Job/Manager.php(275): XF\Job\AddOnData->run(8)
#9 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#10 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#11 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#12 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#17 src/XF.php(806): XF\App->run()
#18 admin.php(15): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(45) "https://*********/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(127) "https://********/admin.php?add-ons/Wutime-PostHighlight/finalize&t=1739497442%2Ccfa774d3b14401ebf8df7c1a78d42d72&a=upgrade"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "162601"
  }
}

Thanks
 
You sure this isn't an issue with your database? No part of my addon specifically sets, attempts to set, or changes anything to do with collation.
 
In my tests i did set the number of min number of reactions for highlight as 1 (to get a screenshot for you for the rebuild cache phrase issue else it ran too quick for me to get a screenshot), but its actually found an issue where the rebuild cache for min reaction and deleting the post highlights for posts that dont meet the criteria is not really working.
I'm headed away on vacation on Sunday so I think for now, you might just want to disable this feature.

It's actually quite copmlicated and when I got 80% through I realized it was probably a bad idea, but went forward anyways. The issue is that post highlights were never intended to be automatic, and require separate tracking from user-set post highlights. I wanted to avoid adding yet another custom field to the xf_user table despite it likely being required.

With that said, it sounds like maybe the SQL calculation for reactions isn't calculating properly. Note, it does things based on "Reaction Score", not the "number of individual reactions".

I'll have to do more testing. I was testing with simple reaction settings to save spending hours on it.
 
utf8mb3_general_ci into utf8mb4_general_ci
Oh, I just realized what the issue is... you're running an ancient collation that doesn't support emoji's, and I used an emoji directly in the phrase for one of the new options. I'll release an update to remove the emoji. It should remove that install error.
 
In my tests i did set the number of min number of reactions for highlight as 1 (to get a screenshot for you for the rebuild cache phrase issue else it ran too quick for me to get a screenshot), but its actually found an issue where the rebuild cache for min reaction and deleting the post highlights for posts that dont meet the criteria is not really working.
I don't really understand what you're saying, but, if you previously ran this with something low, those posts would be highlighted, if you then change your settings to something higher, the previously highlighted posts would remain.

If you check the rebuild checkbox to "delete" previously set highlights they should get removed, but NOTE, you will remove any posts that you may have specifically highlighted manually (herein lies the issue with automatic post highlighting being tracked with one xf_user field).
 
I don't really understand what you're saying, but, if you previously ran this with something low, those posts would be highlighted, if you then change your settings to something higher, the previously highlighted posts would remain.

If you check the rebuild checkbox to "delete" previously set highlights they should get removed, but NOTE, you will remove any posts that you may have specifically highlighted manually (herein lies the issue with automatic post highlighting being tracked with one xf_user field).
I dont manually highlight any posts - so its not a problem for me. Only use automatic based on reaction score. As per my prior screenshots it did not remove highlighted posts below the minimum reaction score.
 
Back
Top Bottom