Is there any chance in ACP or to run SQL querry to set all credits/"anything we set to be credits" to zero for all users on forum?
UPDATE xf_user SET dbtech_credits_credits = 0Replace
dbtech_credits_credits with your points column.Is there any chance in ACP or to run SQL querry to set all credits/"anything we set to be credits" to zero for all users on forum?
UPDATE xf_user SET dbtech_credits_credits = 0dbtech_credits_credits with your points column.Update highlights
This version fixes a performance problem with MySQL 5.6 and MariaDB 10.4, as well as introducing a few new minor features.
The description of a currency as set in the AdminCP is now displayed in the currency pop-up, above the tabs.
Lastly, it is now possible to link directly to a tab in the currency pop-up with a link such as/dbtech-credits/credits.1/?tab=purchase(if you have a Purchase event set up for that currency).
Complete...
Update highlights
This version features a major change to the way Thread and Post events work. The most frequent piece of feedback for DB Credits has always been "why do people lose credits when editing posts?" and the answer has always been "because of the 'amount per character' feature".
With this version, I aim to eliminate that confusion. The system will now look at the "Amount per character" / "Amount per word" setting for the Thread and Post events, and not apply any...
public function canReply(&$error = null)
{
//SBENNY START
$visitor = \XF::visitor();
$firstPost = $this->db()->fetchRow("
SELECT post_id, post_date, user_id, username, reactions
FROM xf_post
WHERE thread_id = ?
ORDER BY post_date
LIMIT 1
", $this->thread_id);
$this->first_post_id = $firstPost['post_id'];
$purchase = \XF::db()->fetchRow('SELECT * FROM xf_dbtech_credits_charge_purchase WHERE user_id = ? AND post_id = ?', [$visitor->user_id, $this->first_post_id]);
if ($purchase || $this->discussion_open && $visitor->user_id == $this->user_id)
{
return true;
}
TheUnfortunately all threads are invisible now. They only show the thread title and nothing more, what can I do to fix this issue?
Looks like this was caused by an edit I did in the Thread.php file of xenforo:
Code:public function canReply(&$error = null) { //SBENNY START $visitor = \XF::visitor(); $firstPost = $this->db()->fetchRow(" SELECT post_id, post_date, user_id, username, reactions FROM xf_post WHERE thread_id = ? ORDER BY post_date LIMIT 1 ", $this->thread_id); $this->first_post_id = $firstPost['post_id']; $purchase = \XF::db()->fetchRow('SELECT * FROM xf_dbtech_credits_charge_purchase WHERE user_id = ? AND post_id = ?', [$visitor->user_id, $this->first_post_id]); if ($purchase || $this->discussion_open && $visitor->user_id == $this->user_id) { return true; }
Disregard my message, thank you. I'll work on fixing it![]()
xf_dbtech_credits_charge_purchase table has changed. WHERE user_id = ? AND content_type = \'post\' AND content_id = ?Yes, if that add-on sets the "is automated" flag then that is the issue. You should ask the developer of that add-on to change the behaviour (or make it optional) if you need it to work differently, as this change is necessary to avoid awarding credits for truly automated actions.What do you mean by automated threads or posts exactly? I noticed users don't get a reward anymore after posting a thread using Advanced Forms add-on, could this be the reason?
[LIST]
[*]ErrorException: Template error: Illegal string offset 'donate'
[*]internal_data/code_cache/templates/l1/s1/public/dbtech_credits_currency.php:79
[/LIST]
Stack trace
#0 internal_data/code_cache/templates/l1/s1/public/dbtech_credits_currency.php(79): XF\Template\Templater->handleTemplateError(2, 'Illegal string .....', 79, Array)
#1 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(Snog\Doodle\XF\Template\Templater), Array)
#2 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('dbtech_credits_...', Array)
#3 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#4 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('DBTech\\Credits:...', 'public:dbtech_c...', Array)
#5 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('DBTech\\Credits:...', 'public:dbtech_c...', Array)
#6 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#9 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#10 src/XF.php(390): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}
<li class="{{ $tab.donate ? 'is-active' : '' }}"<li class="{{ $tab == 'donate' ? 'is-active' : '' }}"The template should have been marked as out of date if you had customised it prior to v5.4.0.I'm not quite sure it's because of the add-on, but whenever I try to donate credits, it goes through without problems, but this error is logged in the server:
Code:[LIST] [*]ErrorException: Template error: Illegal string offset 'donate' [*]internal_data/code_cache/templates/l1/s1/public/dbtech_credits_currency.php:79 [/LIST] Stack trace #0 internal_data/code_cache/templates/l1/s1/public/dbtech_credits_currency.php(79): XF\Template\Templater->handleTemplateError(2, 'Illegal string .....', 79, Array) #1 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(Snog\Doodle\XF\Template\Templater), Array) #2 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('dbtech_credits_...', Array) #3 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render() #4 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('DBTech\\Credits:...', 'public:dbtech_c...', Array) #5 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('DBTech\\Credits:...', 'public:dbtech_c...', Array) #6 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View)) #7 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View)) #8 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json') #9 src/XF/App.php(2178): XF\Mvc\Dispatcher->run() #10 src/XF.php(390): XF\App->run() #11 index.php(20): XF::runApp('XF\\Pub\\App') #12 {main}
Any ideas about what I should do to debug this error? I guess it's the dbtech_credits_currency template file, but my edits shouldn't affect the way it works, and the error started appearing after the last upgrade.
UPDATE
Looks like around line 36:
the previous:
<li class="{{ $tab.donate ? 'is-active' : '' }}"
caused the issue, while the following:
<li class="{{ $tab == 'donate' ? 'is-active' : '' }}"
fixed it.
Ok, disregard this then![]()
Not at this time, sorry.Can I set maximum CHARGE amount allowed for users ?
I got this error after upgrade to 5.3.2Not at this time, sorry.
Revert yourI got this error after upgrade to 5.3.2
dbtech_credits_currency template.Thank youRevert yourdbtech_credits_currencytemplate.
Sorry, no I can't. All I know is, I've heard multiple people come forward about this bug in MariaDB 10.4 causing performance issues on their forums, and setting that flag fixed it.Thank you
I'm now using mariadb 10.4 (which I told you before in #750)
Could you help me a little bit, about what "join-cache-level = 0" would affect to? My website always get lag after I save template or edit some phrases, it's very annoying
I tried to create a clone server with same website (which is running) for testSorry, no I can't. All I know is, I've heard multiple people come forward about this bug in MariaDB 10.4 causing performance issues on their forums, and setting that flag fixed it.
We use essential cookies to make this site work, and optional cookies to enhance your experience.