[DBTech] DragonByte Credits

[DBTech] DragonByte Credits [Paid] 5.9.0

No permission to buy ($14.95)
Suggestions @DragonByte Tech

1. The [CHARGE=X] BBCodes: and Content charge event should be supported outside the forum threads, ie. XFRM and other add-ons.

Add new events: (with charge support)

2. XenForo Resource Manager Update View - Viewing an update to a XenResource resource.
3. XenForo Resource Manager Resource View - Viewing a XenResource resource.
 
1. The [CHARGE=X] BBCodes: and Content charge event should be supported outside the forum threads, ie. XFRM and other add-ons.
Ground work for that has been laid in the current version, though I don't think I would be able to automatically support it in other add-ons. Not only does it depend on the add-ons passing a proper context to the BBCode parser in the template, but I also have to extend the entity to update the hashed content between charge tags.

---
If you re-post feature requests @ our site in the Credits sub-forum here: https://www.dragonbyte-tech.com/support/categories/dragonbyte-credits.414/ I can look at it for future versions :)
One thread per request makes it easier to flag them as implemented in the future.
 
Hi, I just installed your latest beta with 2.15a and i'm getting this error when trying to edit a message, what should i do?

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'content_type' in 'where clause' in src/XF/Db/AbstractStatement.php at line 228

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 292
  6. XF\Db\AbstractAdapter->delete() in src/addons/DBTech/Credits/XF/Entity/Post.php at line 122
  7. DBTech\Credits\XF\Entity\Post->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
  8. XF\Mvc\Entity\Entity->save() in src/XF/Service/Post/Editor.php at line 187
  9. XF\Service\Post\Editor->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
  10. XF\Service\Post\Editor->save() in src/XF/Pub/Controller/Post.php at line 135
  11. XF\Pub\Controller\Post->actionEdit() in src/XF/Mvc/Dispatcher.php at line 350
  12. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
  13. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  14. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  15. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  16. XF\App->run() in src/XF.php at line 391
  17. XF::runApp() in index.php at line 20
 
Hi, I just installed your latest beta with 2.15a and i'm getting this error when trying to edit a message, what should i do?

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'content_type' in 'where clause' in src/XF/Db/AbstractStatement.php at line 228

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 292
  6. XF\Db\AbstractAdapter->delete() in src/addons/DBTech/Credits/XF/Entity/Post.php at line 122
  7. DBTech\Credits\XF\Entity\Post->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
  8. XF\Mvc\Entity\Entity->save() in src/XF/Service/Post/Editor.php at line 187
  9. XF\Service\Post\Editor->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
  10. XF\Service\Post\Editor->save() in src/XF/Pub/Controller/Post.php at line 135
  11. XF\Pub\Controller\Post->actionEdit() in src/XF/Mvc/Dispatcher.php at line 350
  12. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
  13. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  14. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  15. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  16. XF\App->run() in src/XF.php at line 391
  17. XF::runApp() in index.php at line 20
There was an issue with a fresh install, I've patched the files. If you re-download the latest Beta, uninstall the add-on then reinstall it, it should work.
 
There was an issue with a fresh install, I've patched the files. If you re-download the latest Beta, uninstall the add-on then reinstall it, it should work.
i did that, when i try to reinstall it i get this error:


XF\Db\InvalidQueryException: xf_dbtech_credits_charge: MySQL query error [1072]: Key column 'post_id' doesn't exist in table in src/XF/Db/AbstractStatement.php at line 228

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 151
  5. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 186
  6. XF\Db\SchemaManager->createTable() in src/addons/DBTech/Credits/Setup.php at line 47
  7. DBTech\Credits\Setup->installStep1() in src/XF/AddOn/StepRunnerInstallTrait.php at line 60
  8. DBTech\Credits\Setup->installStepRunner() in src/XF/AddOn/StepRunnerInstallTrait.php at line 27
  9. DBTech\Credits\Setup->install() in src/XF/Admin/Controller/AddOn.php at line 398
  10. XF\Admin\Controller\AddOn->actionInstall() in src/XF/Mvc/Dispatcher.php at line 350
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  15. XF\App->run() in src/XF.php at line 391
  16. XF::runApp() in admin.php at line 13
 
i did that, when i try to reinstall it i get this error:


XF\Db\InvalidQueryException: xf_dbtech_credits_charge: MySQL query error [1072]: Key column 'post_id' doesn't exist in table in src/XF/Db/AbstractStatement.php at line 228
Ugh, sorry about that 😣 I've added another patch just now.
 
A question about this criteria:

• User has fewer than X DBTech Credits:

Does it include Credits stored in the bank? If not, wouldn't it be a good idea to take into consideration the banked credits too, or a separate criteria for it?

Thank you :)
 
A question about this criteria:

• User has fewer than X DBTech Credits:

Does it include Credits stored in the bank? If not, wouldn't it be a good idea to take into consideration the banked credits too, or a separate criteria for it?

Thank you :)
It currently doesn’t, as banked credits are a separate entity entirely. That info isn’t loaded during the normal user fetching process, so there would be additional server load to check that.

If you post it @ our site as a feature request in the Credits forum, I can look into it for future versions :)
 
DragonByte Tech updated [DBTech] DragonByte Credits with a new update entry:

5.4.0 Gold

Update highlights

This version fixes a few minor issues discovered in the previous version, based on reports from our community.


Complete Change Log

Fix: Birthday event phrases used the wrong phrase key
Fix: Purchase event alert phrases did not work as intended
Fix: Worked around a race condition where the points column was deleted
Fix: Fixed clean installation not having the correct columns

Read the rest of this update entry...
 


Hi , Thank your new update. I just upgraded my system, it show some error on server log .

The function looks like normal, do you have any idea about the reason of error log, thank again.


  • ErrorException: Template error: Illegal string offset 'purchase'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:196

  • ErrorException: Template error: Illegal string offset 'adjust'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:125

  • ErrorException: Template error: Illegal string offset 'donate'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:70
 
HI, I fixed by change template "dbtech_credits_currency "

from

<li class="{{ $tab.donate ? 'is-active' : '' }}"

to
<li class="{{ $tab == 'donate' ? 'is-active' : '' }}"

from

<li class="{{ $tab.adjust ? 'is-active' : '' }}"
to
<li class="{{ $tab == 'adjust' ? 'is-active' : '' }}"

and go on for five tabs
 
Hi , Thank your new update. I just upgraded my system, it show some error on server log .

The function looks like normal, do you have any idea about the reason of error log, thank again.


  • ErrorException: Template error: Illegal string offset 'purchase'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:196

  • ErrorException: Template error: Illegal string offset 'adjust'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:125

  • ErrorException: Template error: Illegal string offset 'donate'
  • internal_data\code_cache\templates\l2\s1\public\dbtech_credits_currency.php:70
HI, I fixed by change template "dbtech_credits_currency "

from

<li class="{{ $tab.donate ? 'is-active' : '' }}"

to
<li class="{{ $tab == 'donate' ? 'is-active' : '' }}"

from

<li class="{{ $tab.adjust ? 'is-active' : '' }}"
to
<li class="{{ $tab == 'adjust' ? 'is-active' : '' }}"

and go on for five tabs
I updated yesterday too and i didn't get any errors, after i saw your post here about errors i logged in with admin but nothing, after that i performed all kinds of actions with the credits system and still no errors, after all night i checked in the morning, no errors... I have latest xenforo and php 7.3 btw...
 
Last edited:
I updated yesterday too and i didn't get any errors, after i saw your post here about errors i logged in with admin but nothing, after that i performed all kinds of actions with the credits system and still no errors, after all night i checked in the morning, no errors... I have latest xenforo and php 7.3 btw...
The errors were caused by a customised template the other users had not reverted, so if you had no customised templates you would not get any errors.
 
Hi there , I just see some security issues here ,

if my username is fionatony in the forum , I just need post below url link in the forum ,

dbtech-credits/currency/2/Donate?username=fionatony&amount=10&message=thank you

any user in the forum , if click above the link , immediately donate $10 credit to fionatony.

And you just need change the username and amount to do what you want to mess up the whole credit system.

Also , I see same issues with other event too.
 
Hi there , I just see some security issues here ,

if my username is fionatony in the forum , I just need post below url link in the forum ,

dbtech-credits/currency/2/Donate?username=fionatony&amount=10&message=thank you

any user in the forum , if click above the link , immediately donate $10 credit to fionatony.

And you just need change the username and amount to do what you want to mess up the whole credit system.

Also , I see same issues with other event too.
This is not a security issue, as "security issue" would imply gaining unauthorised access either to your AdminCP or your server itself. If this was a security issue, disclosing it in public would be very bad, as it would allow others to exploit the issue :)

That being said, in a future version I'll add measures to ensure certain actions can only be taken via POST (i.e. when submitting a form).
 
This is not a security issue, as "security issue" would imply gaining unauthorised access either to your AdminCP or your server itself. If this was a security issue, disclosing it in public would be very bad, as it would allow others to exploit the issue :)

That being said, in a future version I'll add measures to ensure certain actions can only be taken via POST (i.e. when submitting a form).
Damn, I just tested that bug above, this need to be fixed soon
 
Top Bottom