[TH] Credits [Deleted]

Absolutely, using the Audentio_Credit_Core_Model_Credit giveCredits method :)
That's great news. Can you provide a little more detail on how this would be coded? Our gateway would postback the amount of credits and the userid. Would we create a separate PHP file and use a key authentication and then call the above method? What else would need to be in the file?
 
Before i ask questions about the script.

Is there a forum where we can post pre-sales questions, general questions, suggestions about any of your current and upcoming add-ons? I went on your website but there is no forum. Or will we just write everything in this 1 thread?

I have many questions now and possibly questions in the future. All concerning add-ons and custom add-ons. Posting on your company forum would be alot easier.
 
Before i ask questions about the script.

Is there a forum where we can post pre-sales questions, general questions, suggestions about any of your current and upcoming add-ons? I went on your website but there is no forum. Or will we just write everything in this 1 thread?
We no longer have a forum, we closed it about a month ago because our new website is currently in progress and it was to much for us to maintain that due to some limitations with the way it is currently setup

I have many questions now and possibly questions in the future. All concerning add-ons and custom add-ons. Posting on your company forum would be alot easier.

If you have questions about existing, or future products you can submit a ticket, or post them here. If you have an inquery about custom work, you can submit a request here :)

That's great news. Can you provide a little more detail on how this would be coded? Our gateway would postback the amount of credits and the userid. Would we create a separate PHP file and use a key authentication and then call the above method? What else would need to be in the file?

That depends on what you need it to do. You'll want to verify the payment of course, and provide the users with the number of credits you want to give them based on how much they paid using
$creditModel->giveCredits($user, $credits, $currencyId)

$user can be either:
  • User ID
  • Entire User Array
then $credits is the amount you want to give, and $currencyId is of course the ID of the currency you want to use (default currency that is installed is adcredit)
 
That depends on what you need it to do. You'll want to verify the payment of course, and provide the users with the number of credits you want to give them based on how much they paid using
$creditModel->giveCredits($user, $credits, $currencyId)

$user can be either:
  • User ID
  • Entire User Array
then $credits is the amount you want to give, and $currencyId is of course the ID of the currency you want to use (default currency that is installed is adcredit)

I'll give it a shot. Thanks!
 
We've just updated the resource posting to include some features we had forgotten to mention:

  • Create resource: Triggers when using the XenForo Resource Manager and someone creates a resource
  • Rate a resource: Triggers when using the XenForo Resource Manager and someone rates a resource
  • Share media: Triggers when using the XenForo Media Gallery and someone posts any media
 
Unregistered members posting to a forum with guest posting allowed causes this error..

PHP:
Error Info
ErrorException: Argument 1 passed to XenForo_DataWriter::bulkSet() must be of the type array, null given, called in /home/xenboost/public_html/library/Audentio/Credit/Core/Event/Thread.php on line 88 and defined - library/XenForo/DataWriter.php:991
Generated By: Unknown Account, 9 minutes ago
Stack Trace

#0 /home/xenboost/public_html/library/XenForo/DataWriter.php(991): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/home/xenboost/...', 991, Array)
#1 /home/xenboost/public_html/library/Audentio/Credit/Core/Event/Thread.php(88): XenForo_DataWriter->bulkSet(NULL)
#2 /home/xenboost/public_html/library/Audentio/Credit/Core/Event.php(61): Audentio_Credit_Core_Event_Thread->run(Object(NFLJ_Showcase_ControllerPublic_Forum), Array, 'after', Array)
#3 /home/xenboost/public_html/library/Audentio/Credit/Core/ControllerPublic/Forum.php(15): Audentio_Credit_Core_Event::run('thread', Object(NFLJ_Showcase_ControllerPublic_Forum), 'after', Array)
#4 /home/xenboost/public_html/library/EWRporta2/ControllerPublic/Forum.php(22): Audentio_Credit_Core_ControllerPublic_Forum->actionAddThread()
#5 /home/xenboost/public_html/library/XenForo/FrontController.php(347): EWRporta2_ControllerPublic_Forum->actionAddThread()
#6 /home/xenboost/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/xenboost/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}

Request State

array(3) {
  ["url"] => string(54) "https://xenboost.com/forums/visitor-input.3/add-thread"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(11) {
    ["_guestUsername"] => string(21) "Veterans"
    ["recaptcha_challenge_field"] => string(270) "03AHJ_VusojsqRiScCD7WAQYFVIr55O1dXmY_Oc-Ntjv-T9rpxAo-1mN9L57KjyJtlYNLmSi5Id58yxWSRJ9VT2kNYs6wCge9mFsVsmjxwDE6qN-Q9xKfMJex6BBtLldZcsPb7Rsi3fTVC1ELho65qN0HJ4nVPbqYOtpGPF02bj06ShO5BZemj8mNsx6nhSTKk-Whr6Qah0MB47xvqP4skVXQW87HtqXPIy2g5tkm_oN2gUkN38BkiR02uc56j1s25w6GmtR52hJJy"
    ["recaptcha_response_field"] => string(4) "4836"
    ["title"] => string(11) "Cant log in"
    ["message_html"] => string(215) "<p>I tried to log in using the information I supplied to you when you requested new log in info from me a week ago but could not. Are you open for business and member logins or do you need a few more days?&nbsp;</p>"
    ["_xfRelativeResolver"] => string(57) "https://xenboost.com/forums/visitor-input.3/create-thread"
    ["poll"] => array(5) {
      ["question"] => string(0) ""
      ["responses"] => array(2) {
        [0] => string(0) ""
        [1] => string(0) ""
      }
      ["max_votes_type"] => string(6) "single"
      ["change_vote"] => string(1) "1"
      ["view_results_unvoted"] => string(1) "1"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(37) "/forums/visitor-input.3/create-thread"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Unregistered members posting to a forum with guest posting allowed causes this error..

PHP:
Error Info
ErrorException: Argument 1 passed to XenForo_DataWriter::bulkSet() must be of the type array, null given, called in /home/xenboost/public_html/library/Audentio/Credit/Core/Event/Thread.php on line 88 and defined - library/XenForo/DataWriter.php:991
Generated By: Unknown Account, 9 minutes ago
Stack Trace

#0 /home/xenboost/public_html/library/XenForo/DataWriter.php(991): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/home/xenboost/...', 991, Array)
#1 /home/xenboost/public_html/library/Audentio/Credit/Core/Event/Thread.php(88): XenForo_DataWriter->bulkSet(NULL)
#2 /home/xenboost/public_html/library/Audentio/Credit/Core/Event.php(61): Audentio_Credit_Core_Event_Thread->run(Object(NFLJ_Showcase_ControllerPublic_Forum), Array, 'after', Array)
#3 /home/xenboost/public_html/library/Audentio/Credit/Core/ControllerPublic/Forum.php(15): Audentio_Credit_Core_Event::run('thread', Object(NFLJ_Showcase_ControllerPublic_Forum), 'after', Array)
#4 /home/xenboost/public_html/library/EWRporta2/ControllerPublic/Forum.php(22): Audentio_Credit_Core_ControllerPublic_Forum->actionAddThread()
#5 /home/xenboost/public_html/library/XenForo/FrontController.php(347): EWRporta2_ControllerPublic_Forum->actionAddThread()
#6 /home/xenboost/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/xenboost/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}

Request State

array(3) {
  ["url"] => string(54) "https://xenboost.com/forums/visitor-input.3/add-thread"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(11) {
    ["_guestUsername"] => string(21) "Veterans"
    ["recaptcha_challenge_field"] => string(270) "03AHJ_VusojsqRiScCD7WAQYFVIr55O1dXmY_Oc-Ntjv-T9rpxAo-1mN9L57KjyJtlYNLmSi5Id58yxWSRJ9VT2kNYs6wCge9mFsVsmjxwDE6qN-Q9xKfMJex6BBtLldZcsPb7Rsi3fTVC1ELho65qN0HJ4nVPbqYOtpGPF02bj06ShO5BZemj8mNsx6nhSTKk-Whr6Qah0MB47xvqP4skVXQW87HtqXPIy2g5tkm_oN2gUkN38BkiR02uc56j1s25w6GmtR52hJJy"
    ["recaptcha_response_field"] => string(4) "4836"
    ["title"] => string(11) "Cant log in"
    ["message_html"] => string(215) "<p>I tried to log in using the information I supplied to you when you requested new log in info from me a week ago but could not. Are you open for business and member logins or do you need a few more days?&nbsp;</p>"
    ["_xfRelativeResolver"] => string(57) "https://xenboost.com/forums/visitor-input.3/create-thread"
    ["poll"] => array(5) {
      ["question"] => string(0) ""
      ["responses"] => array(2) {
        [0] => string(0) ""
        [1] => string(0) ""
      }
      ["max_votes_type"] => string(6) "single"
      ["change_vote"] => string(1) "1"
      ["view_results_unvoted"] => string(1) "1"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(37) "/forums/visitor-input.3/create-thread"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

This has been fixed for the next release. To fix this on your board add the following line in library/Audentio/Credit/Core/Event.php:
Code:
if (!XenForo_Visitor::getUserId()) return false;

After:
Code:
public static function run($eventId, $controller, $type='', array $params = array())
{
 
Audentio Design updated AD Credits - Multiple currencies, 20+ events, PayPal integration and more! with a new update entry:

Bug Fix Release 1.0.1

This update fixes a number of bugs that have been reported to us such as:
  • Missing Phrases
  • Error when deleting a credits package
  • Link to the event log
  • Cron Entry to clear the event log after X days
  • Ability to set the 'username' used when giving a user credits via the AdminCP - This will not take credits from an actual user, the alert and transaction will just display this name.
  • Wallet tab selected state when viewing a credit page
Everyone that has already...

Read the rest of this update entry...
 
the name "AD CREDITS" makes me think you can buy advertising credits on the site. At first, I thought that was what it was for, not a credit system.

I know it's for Audentio, but I totally thought it was something else at first!
 
Last edited:
getting a lot of these undefined index - global_permission_cache errors.

Code:
Server Error Log
 
 
 
 
Error Info
 
 
 
ErrorException: Undefined index: global_permission_cache - library/Audentio/Credit/Core/ViewPublic/Conversation/View.php:11
Generated By: userx, 10 minutes ago
 
 
Stack Trace
 
 
 
#0 /home/nzwarrio/public_html/www.xyz.com/library/Audentio/Credit/Core/ViewPublic/Conversation/View.php(11): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nzwarrio/...', 11, Array)
#1 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/ViewRenderer/Abstract.php(227): Audentio_Credit_Core_ViewPublic_Conversation_View->renderHtml()
#2 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'conversation_vi...')
#3 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/FrontController.php(586): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'conversation_vi...', NULL)
#4 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#5 /home/nzwarrio/public_html/www.xyz.com/index.php(13): XenForo_FrontController->run()
#6 {main}
 
 
Request State
 
 
 
array(3) {
  ["url"] => string(54) "http://www.xyz.com/conversations/hey-mate.2617/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
getting a lot of these undefined index - global_permission_cache errors.

Code:
Server Error Log




Error Info



ErrorException: Undefined index: global_permission_cache - library/Audentio/Credit/Core/ViewPublic/Conversation/View.php:11
Generated By: userx, 10 minutes ago


Stack Trace



#0 /home/nzwarrio/public_html/www.xyz.com/library/Audentio/Credit/Core/ViewPublic/Conversation/View.php(11): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nzwarrio/...', 11, Array)
#1 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/ViewRenderer/Abstract.php(227): Audentio_Credit_Core_ViewPublic_Conversation_View->renderHtml()
#2 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'conversation_vi...')
#3 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/FrontController.php(586): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'conversation_vi...', NULL)
#4 /home/nzwarrio/public_html/www.xyz.com/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#5 /home/nzwarrio/public_html/www.xyz.com/index.php(13): XenForo_FrontController->run()
#6 {main}


Request State



array(3) {
  ["url"] => string(54) "http://www.xyz.com/conversations/hey-mate.2617/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

I'm not able to replicate this error, you get this while viewing a conversation, correct?
 
Well i am finally getting around to asking some pre-sales questions and suggestions.
I don't use a lot of features from *******'s Credits Add-on. But there are several features on his credits-ad-on that are very useful and fun you will probably guess why i like the credits add-on so much. It's very fun! I read your info. I just want to double check some questions. Here goes and sorry it's so long!

Pre-Sale Questions.

XenForo
1. Possible to give Credits for Registration (Yes, right?)

2. Possible to give Credits for Posts and Creating Threads.(Yes, right?)

3. Does it give you Alerts when you earn credits?

This next one is a big one but it all works together.

4. Is it possible to set up your own fake currency. For example. I want to make my own "kitty cat dollars" so every time a member gets a "like" he will recieve 1000 kitty cat dollars. So after 4 "likes" he would have earned 4000 kitty cat dollars. So my next question is...

5. Possible to withdrawl your credits? (with a minimum limit and max limit So since the user has 4000 kitty cat dollars he can click "withdrawl" and the admin will recieve a message in the admin/moderator panel saying "pending withdrawl" Then when the admin sees this message. The admin will manually pay the member 4000 kitty cat dollars via paypal or whatever pay website he uses. which brings me to my next question..



6. While in the "withdrawl your credits" screen. Is there a conversion rate screen(which the admin can setup in the admin panel) The member will be able to see the conversion rate.


Example
How many credits do you want to withdrawl? (+) (-)
He Picks: 4000 Kitty Cat Dollars
He will see underneath: You will recieve 4 dollars USD

withdraw screen
withdrawl.webp


So after he presses withdrawl. The admin will see a "Pending Withdrawl" for 4dollars USD

Pending withdrawl admin screen
pending.webp


This is an example where the admin has setup the conversion rate in the admin panel as: 1000 Kitty Cat Dollars = 1 Dollar USD

exchange admin screen
exchange.webp


I thought always thought this feature was great. You can use it to give people fake currency after they withdraw it, or real money(if you're rich)

7. Is it possible to buy Credits? from paypal or any other paysite you add in the admin panel using my fake kitty cat dollars and conversion rate?

For example:
Member clicks on "Purchase Credits"
He sees a screen: How many credits do you want to purchase? (+) (-)
He picks: 4000 kitty cat dollars
Underneath he sees: It will cost you 4 USD
buy credits.webp


Media Gallery
8. Is it possible to Give Credits everytime someone views an image. (either videos or images)
Media Views.webp


9. Possible to give credits or take credits from users who download media?
10. Possible to give credits or take credits from users who view full size media?

11. I saw you post this "Share media: Triggers when using the XenForo Media Gallery and someone posts any media" What exactly does this mean? Would this be using the BB Code? So you mean that every time someone posts a BB Code and someclicks on it. They recieve credits?


Resource Manager.

I don't often use the Resource Manager so i got no questions for this!

Those are some of the main ones that i like to use/would like to use!

Here is some more unimportant questions
Future Additions for the Media Gallery

12. Do you plan to add more give or take credits events/actions? such as
upload media, like media, rate media, comment media,




Here's some suggestions for the future. Maybe some other members would think its cool and fun.


It would be cool if in the avatar area you could show some extra options or add extra options.

Credits Rank - This ranks the member based on the Highest Earner in the whole forum (including past credits earned)
Current Credits - This is the current credits the member has
Forum Credits - This is the % of credits the member has in the forum
Past Credits - This keep a total of all the credits a member had. Even after withdrawl
Credits.webp


13. Possible to use credits for "user usergroup upgrades"

If you don't have some of those features i inquired about. I hope you consider them in the future.

I love Brivum's credits add-on. It's full of featues. I'm not sure what my plan is.. or Birivum's plan.

But i want to investigate my alternatives.

Members often love getting credits. And you can make contests and make the members compete against each other.

Even if in the end you're not giving them real money. It's still fun!
 
Last edited:
I'm not able to replicate this error, you get this while viewing a conversation, correct?
Yes correct. Im having a hella lot server errors created as a result of this error. Can this please be looked into ASAP. Simply cannot use this addon+shop without this fixed.
 
I keep getting this when i click a member on a forum post.

Code:
Argument 3 passed to XenForo_Controller::responseView() must be of the type array, null given, called in /home1/esgnpro1/public_html/theclanpromotion/library/Audentio/Credit/Core/ControllerPublic/Member.php on line 18 and defined
XenForo_Application::handlePhpError() in XenForo/Controller.php at line 1049
XenForo_Controller->responseView() in Audentio/Credit/Core/ControllerPublic/Member.php at line 18
Audentio_Credit_Core_ControllerPublic_Member->actionIndex() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home1/esgnpro1/public_html/theclanpromotion/index.php at line 13

Any fixees?
 

Attachments

  • adcredits1.webp
    adcredits1.webp
    42.1 KB · Views: 21
  • adcredits2.webp
    adcredits2.webp
    71.3 KB · Views: 20
Last edited:
Getting errors as well since upgrading to 1.0.2 - whenever trying to view membercard or profiles, had to disable it for the time being.

Error Info
ErrorException: Argument 3 passed to XenForo_Controller::responseView() must be of the type array, null given, called in /public_html/library/Audentio/Credit/Core/ControllerPublic/Member.php on line 18 and defined - library/XenForo/Controller.php:1049
Generated By: Gemma, 10 minutes ago
Stack Trace
#0 /home/gemmagen/public_html/library/XenForo/Controller.php(1049): XenForo_Application::handlePhpError(4096, 'Argument 3 pass...', '/home/gemmagen/...', 1049, Array)
#1 /home/gemmagen/public_html/library/Audentio/Credit/Core/ControllerPublic/Member.php(18): XenForo_Controller->responseView('', NULL, NULL)
#2 /home/gemmagen/public_html/library/bdTagMe/XenForo/ControllerPublic/Member.php(12): Audentio_Credit_Core_ControllerPublic_Member->actionIndex()
#3 /home/gemmagen/public_html/library/XenForo/FrontController.php(347): bdTagMe_XenForo_ControllerPublic_Member->actionIndex()
#4 /home/gemmagen/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/gemmagen/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
["url"] => string(48) "http://www.+++.co.uk/members/gemma.1/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Error Info
ErrorException: Undefined property: XenForo_ControllerResponse_Reroute::$templateName - library/Audentio/Credit/Core/ControllerPublic/Member.php:18
Generated By: Gemma, 10 minutes ago
Stack Trace
#0 /home/gemmagen/public_html/library/Audentio/Credit/Core/ControllerPublic/Member.php(18): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/home/gemmagen/...', 18, Array)
#1 /home/gemmagen/public_html/library/bdTagMe/XenForo/ControllerPublic/Member.php(12): Audentio_Credit_Core_ControllerPublic_Member->actionIndex()
#2 /home/gemmagen/public_html/library/XenForo/FrontController.php(347): bdTagMe_XenForo_ControllerPublic_Member->actionIndex()
#3 /home/gemmagen/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/gemmagen/public_html/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
["url"] => string(48) "http://www.+++.co.uk/members/gemma.1/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Error Info
ErrorException: Undefined property: XenForo_ControllerResponse_Reroute::$params - library/Audentio/Credit/Core/ControllerPublic/Member.php:11
Generated By: Gemma, 11 minutes ago
Stack Trace
#0 /home/gemmagen/public_html/library/Audentio/Credit/Core/ControllerPublic/Member.php(11): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/home/gemmagen/...', 11, Array)
#1 /home/gemmagen/public_html/library/bdTagMe/XenForo/ControllerPublic/Member.php(12): Audentio_Credit_Core_ControllerPublic_Member->actionIndex()
#2 /home/gemmagen/public_html/library/XenForo/FrontController.php(347): bdTagMe_XenForo_ControllerPublic_Member->actionIndex()
#3 /home/gemmagen/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/gemmagen/public_html/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
["url"] => string(48) "http://www.+++.co.uk/members/gemma.1/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
A Suggestion too, for the Credit Packages, you should make it where we can add what the members are getting. Like a visible description of what they are paying for.
 
Issue when trying to view profiles on 1.0.2,

Code:
Argument 3 passed to XenForo_Controller::responseView() must be an array, null given, called in /var/www/vhosts/theforum.com/httpdocs/library/Audentio/Credit/Core/ControllerPublic/Member.php on line 18 and defined

XenForo_Application::handlePhpError() in XenForo/Controller.php at line 1049
XenForo_Controller->responseView() in Audentio/Credit/Core/ControllerPublic/Member.php at line 18
Audentio_Credit_Core_ControllerPublic_Member->actionIndex() in EWRutiles/Staff/ControllerPublic/Member.php at line 27
EWRutiles_Staff_ControllerPublic_Member->actionIndex() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/vhosts/theforum.com/httpdocs/index.php at line 13
 
Are you planning on adding...
1. support for user to user transactions
2. transaction history for users searchable by action

See screenshots
DZp1DOG.png


Wpx53lt.png
 
Top Bottom