[Custom Page] - Are there any instructions or guides on how to retrieve information from EQDKP?

  • I tried to do internal search and google search to find this guide. I don't have any luck. Are there any ways to retrieve information from EQDKP? For example, I'd like to collect name, class, total points, 30 days, 90 days, last date recorded, and any other data. I thought SQL queries would be a way to go. I'm wondering if there is a class where I can call and access to information. I want to build a custom page on my server and supply those information on it.


    Thanks in advance,

    Matt

  • You can use the api, but it does not provide you all the information wanted.

    https://eqdkp-plus.eu/wiki/Plus_Exchange


    Also, you can include the eqdkp framework, like this: https://eqdkp-plus.eu/wiki/Vorlage_für_in_EQdkp_eingebundene_Seiten (just the part with the common.php). Then, you can use the plus data handler (pdh) https://eqdkp-plus.eu/wiki/Plus_Data_Handler to access the data you want.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    Amazon Wishlist | PayPal

  • Oh! Thank you. I'm little confused with pdh get methods... Can you explain more about that?


    Code
    1. define ( 'EQDKP_INC' , true );
    2. $eqdkp_root_path = './subdomain/' ;
    3. include_once ( $eqdkp_root_path . 'common.php' );
    4. $members = $pdh->aget('member', 'name', 0, array($pdh->get('member', 'id_list'))); //tried this example
    5. print_r($members);

    I tried the aget method above from the example. It threw error message... Message: Uncaught Error: Call to a member function aget() on null


    I feel like I don't understand parameters that method requires.

  • You have to init the pdh first. $pdh = register("pdh") ; should do the trick. For examples of using pdh, take a look at the source code of the exchange modules at core/exchange. But please keep in mind to not use $this, but $pdh in your own class.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    Amazon Wishlist | PayPal

  • Oh boy. It's going to take a bit time for me to figure out I want. Thank you for pointing me to right direction!


    Looks like I need to use member, points, and event attendance. I'll start with that and see how it goes! I may ask for assistance again if I get stuck.

  • Actually, I have a question... Is it possible to get more than one tags in a call?


    For example, I want to get name and class from member module.


    Code
    1. $pdh->aget('member', 'name', 0, array($pdh->get('member', 'id_list'))); //gives all list of member names
    2. $pdh->aget('member', 'classname', 0, array($pdh->get('member', 'id_list'))); //gives all list of class names
  • No, more than one is not possible. We normally take the id list first of the members we want, and than iterate over these members and take the info we want.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    Amazon Wishlist | PayPal

  • $members = $pdh->get('member', 'id_list', array($skip_inactive=false, $skip_hidden=false, $skip_special = true, $skip_twinks=false))


    this will outout an Array with all members. then you could use sorting to get what you want...


    a combined tag is not possible in aget ;)


    // edit: Godmod was faster ;)

  • I had to look at the examples again and I had to create $out to just collect all data I want. Just exactly as you said.


    Also, this code piece:

    Code
    1. Original:
    2. $pdh->get('member', 'id_list')
    3. Updated:
    4. $pdh->get('member', 'id_list', array($skip_inactive=true, $skip_hidden=false, $skip_special = true, $skip_twinks=false))


    I had no idea about those "skip" parameters!!! It really helps to identify that. But, how or where do I find those skip parameters? I looked at data handler class and it's not there. :P Too many hidden gems!! lol

  • Otherwise, you can go the table and point management page. There you have the possibility to create custom columns. But all tags are listed there, as well as params.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    Amazon Wishlist | PayPal

  • I managed to get name and class listing to work. I tried to do points but I'm not sure where to get dkp_id


    Code
    1. $points = $pdh->aget('points', 'earned', 0, array($pdh->get('member', 'id_list')), true);
    2. print_r($points);


    This throws an error: too few arguments. I assume that I need dkp_id. :o