![]() |
Automated Thread Prefixes
I was presented an idea and have been racking my brain trying to figure out how to pull it off.
I need to find a way to have Automated Thread Prefixes for a specific forum, according to thread views. For instance, if a particular thread reaches 100 views... Then the thread prefix automatically becomes "Title 1"; then if it reaches 500 views it becomes "Title 2". Any ideas? |
Create a new plugin hooked at "cron_script_cleanup_hourly" with the following code:
PHP Code:
PHP Code:
In the lines: PHP Code:
Note: I haven't tested this, but it is based on a plugin from one of my products I use at MHB. Please let me know if you have any issues with it. :) |
Quote:
|
You could also do it a completely different way (in real time) by having some code on a reply hook that checks the reply count and updates the prefix as required.
|
Quote:
|
Views ? oh, I didnt notice that. Strange thing to base it on, very easily abused.
Still, yeah, same thing, different hook. |
Quote:
|
If you are using my cron-based approach, then change all instances of $v_thread['views'] to $v_thread['replycount'].
|
Quote:
--------------- Added [DATE]1474160516[/DATE] at [TIME]1474160516[/TIME] --------------- Quote:
--------------- Added [DATE]1474160680[/DATE] at [TIME]1474160680[/TIME] --------------- PHP Code:
|
Did you manually run the cron job, or wait for it to run?
|
All times are GMT. The time now is 07:11 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|