• 0

    posted a message on DKPmon & Bidder v2.0
    Quote from hypetech »

    I'm having trouble importing from eqdkp to dkpmon. Here is our current version of eqdkp+

    http://www.eidolonguild.org/eqdkp/

    My dkpMon2Export.php file currently looks like this:

    http://rafb.net/p/dkQMt418.html

    The output from that files comes out as this:

    http://rafb.net/p/NRwqb052.html

    That doesn't contain any member names or dkp values, but when I try to import it anyway I get a couple of errors:

    : DKPmon_eqDKP\importdata.lua:27:
    unexpected symbol near '<'

    and the line 89 error that was mentioned earlier in this thread.

    I also tried to use Weeladdie's custom PHP script for eqdkp+ and it seemed to export my members wonderfully, but would not grab their DKP values, and I'm not sure why. Any suggestions or pointers to some documentation on the process would be much appreciated.


    Hypetech,

    The version of dkpMon2Export.php that I put together is designed to work when you have the multiDKP Pools option in EqDkp Plus active. I found that the standard version of the file would bring down a single set of dkp values with no problems.

    Your links to your export files etc no longer work, please can you refresh them and I can take a look.

    Wee
    Posted in: General AddOns
  • 0

    posted a message on DKPmon & Bidder v2.0
    I'm using eqDKP Plus with MultiDKP-Pools to manage our DKP.

    I really wanted to use Dahn's dkpMon2Export.php to dump the dkp data from the site into the importdata.lua file. However, despite repeated attempts I couldn't get it to work, as eqDKP Plus assigns the Pools 'on the fly' based on which instances you specify are in which pools.

    So I decided to hack together Dahn's work and Corgan's getdkp.php (which does work in eqDKP Plus) to produce the output file.

    **WARNING** I am not a php coder at all therefore this code has been put together on a trial and error basis.

    Note: I have coded it to produce the importdata.lua file on the server and provide a link to it, so you can right click the link and save the file direct rather than copy and paste.

    Anyway, here you go...hope it helps.

    Weeladdie

    <?php
    /******************************
     * GetDKP Plus
     *
     * ? Corgan @ Server Antonidas PvE German -> [url]www.seniorenraid.de[/url]
     * ------------------
     * getdkp.php
     *
     * Version 2.4
     ******************************/
    
    /******************************
    Name: DKPmon2Export.php
    Revision: $Revision$
    Author(s): Dahn (dahnwow@mac.com)
    Description: Dumps DKP data from eqDKP into a csv based table
    Dependencies: eqDKP
    
     ******************************/
    
    /******************************
    Hacked together for eqDKP Plus
    by Weeladdie
    ******************************/
    
    ########################
    ##Edit to reflect your setup##
    ########################
    
    $poolcount = 2;
    $poolNames[0] = "10 Man";
    $poolNames[1] = "25 Man";
    
    ############# you dont have to change anything below !!!! ######################################
    #################################################################################################
    
    $myFile = "importdata.lua";
    $fh = fopen($myFile, 'w+') or die("can't open file");
    
    $version = "2.6";
    $total_players = 0;
    $total_items = 0;
    $total_points = 0;
    $eqdkp_version = "1.3.x";
    $date_created = date("D M d H:i:s Y");
    $startString = "--[START]\n";
    $endString = "\n--[END]";
    $member_count = 0;
    $mcount = 0;
    $pname = 0;
    define('EQDKP_INC', true);
    $eqdkp_root_path = './';
    include_once($eqdkp_root_path . 'common.php');
    
    #################################################
    ##This is the text info which appears at the top of the file##
    #################################################
    
    // Output headers to force plain text
    header("Content-type: text/plain");
    header("Cache-Control: no-store, no-cache");
    
    fwrite($fh, "--[[\n");
    fwrite($fh, " This file was generated by dkpMon2Export.php.\n");
    fwrite($fh, "\n"); 
    fwrite($fh, " Each entry in the table corresponds to a member record your database.\n");
    fwrite($fh, " The data included in each entry in the table is:\n");
    fwrite($fh, " \"<name>:<class>:<level>:<race>:<pool 0 points>:<pool 1 points>:<pool 2 points>:... etc\"\n");
    fwrite($fh, "  where <class> must be the English name of the class\n");
    fwrite($fh, "   ie: one of 'WARRIOR', 'MAGE', 'HUNTER', 'PRIEST', 'PALADIN', 'SHAMAN', 'ROGUE', 'DRUID', or 'WARLOCK'\n");
    fwrite($fh, " The point value for each pool can be any floating point number so long as it\'s not in exponential format.\n");
    fwrite($fh, "]]\n");
    fwrite($fh, "\n");
    fwrite($fh, "\n");
    
    fwrite($fh, "-- DKP eqDKP dump generated " . $date_created . "\n\n");
    
    fwrite($fh, 'DKPmon_eqDKP = {}' . "\n");
    fwrite($fh, 'DKPmon_eqDKP.dkpMonVersion = ' . $version . "\n");
    
    fwrite($fh, "DKPmon_eqDKP.poolCount = " . $poolcount . "\n");
    fwrite($fh, "DKPmon_eqDKP.poolNames = {\n");
    	$curpool=0;
    	while ($curpool < $poolcount)
    	{
    		if ($curpool > 0)
    			fwrite($fh, ",\n");
    		fwrite($fh, "\t\t" . '[' . $curpool . '] = "' . $poolNames[$curpool] . '"');
    		$curpool++;
    	}
    fwrite($fh, "\n\t}\n");
    
    fwrite($fh, 'DKPmon_eqDKP.timestamp = "' . $date_created . "\"\n");
    fwrite($fh, 'DKPmon_eqDKP.fileid = ' . time() . "\n");
    
    fwrite($fh, "	\n");
    fwrite($fh, "	\n");
    
    fwrite($fh, "DKPmon_eqDKP.Import_Data = {\n");
    
    
    ##################
    # Output Multi DKP##
    ##################
    
    $sql = "SELECT *,
    		m.member_name,
        		c.class_name as member_class,
    		r.race_name as member_race,
    		m.member_earned + m.member_adjustment - m.member_spent as current_dkp
    	FROM
    		".$table_prefix."members m, ".$table_prefix."classes c, ".$table_prefix."races r
    	WHERE
    		m.member_class_id = c.class_id AND r.race_id = m.member_race_id
    	GROUP BY
    		m.member_name
    	ORDER BY
    		member_name ASC";
    
    
    	if ( !($result = mysql_query($sql)) ) {
    		print $sql ;
    		message_die('Could not obtain member DKP information', '', __FILE__, __LINE__, $sql);
    	}
    
    	define(TAB, "\t");
    	define(CRLF, "\r\n");
    
    {
    	$format_multidkp = '%s';
    	if(mysql_num_rows($result) >= 1)
    		{
    		$sql_num_rows=(mysql_num_rows($result));
    		$html = new htmlPlus(); // plus html class
    		while ($row = $db->fetch_record($result)) # member row
    			{
    			$rc_sql = 'SELECT count(*)
       			FROM ' . RAIDS_TABLE . ' r, ' . RAID_ATTENDEES_TABLE . " ra
       			WHERE (ra.raid_id = r.raid_id)
       			AND (ra.member_name='".$row['member_name']."')";
    
       			if ( ($result_lifetime = mysql_query($rc_sql)) )
       				{
       	 				$individual_raid_count_all = $db->query_first($rc_sql);
    					$row['raid_count'] = $individual_raid_count_all ;
    				}
    
    			$outputdkp .= sprintf(TAB.'[' . $member_count . '] = {' . "\n");
    			$outputdkp .= sprintf(TAB.TAB.TAB.'charInfo = { name = "');
    			$outputdkp .= sprintf($row['member_name']);
    			$outputdkp .= sprintf('", class = "');
    			$outputdkp .= sprintf(strtoupper($row['member_class']));
    			$outputdkp .= sprintf('", level = ');
    			$outputdkp .= sprintf($row['member_level']);
    			$outputdkp .= sprintf(', race = "');
    			$outputdkp .= sprintf(strtoupper($row['member_race']));
    			$outputdkp .= sprintf('" },' . "\n". TAB.TAB.TAB.'DKP = { ');
    
    			$member_multidkp = $html-> multiDkpMemberArray($row['member_name']) ; // create the multiDKP Table
    
    			if(!empty($member_multidkp[$row['member_name']]))
    				{
    			 		foreach ($member_multidkp[$row['member_name']] as $key)
    			 			{
    							$outputdkp .= sprintf('['.$pname.'] = ');	
    							$outputdkp .= sprintf($format_multidkp, $key['current'] );
    							if ($pname < ($poolcount - 1))
    								{
    									$outputdkp .= sprintf(',');
    								}
    							$outputdkp .= sprintf(' ');
    							$pname++;
    						}
    				}
    			$outputdkp .= sprintf('}'."\n".TAB.TAB.'}');
    			$member_count++;
    			$mcount = $member_count;
    			if($mcount < $sql_num_rows)
    				{
    					$outputdkp .= sprintf(','."\n");
    				}
    			else
    				{
    					$outputdkp .= sprintf("\n");
    				}
    
    			$pname = 0;
    		}	
    		fwrite($fh, $outputdkp);
    	}
    }
    
    fwrite($fh, "}");
    $db->free_result($result);
    fclose($fh);
    
    ?>
    Click this link and save the importdata.lua file in your World of Warcraft/Interface/Addons/DKPmon_eqDKP folder
    <a href="[url]http://www[/url].[UPDATE WITH THE PATH TO YOUR SITE]/eqdkp/importdata.lua">importdata.lua</a>
    Posted in: General AddOns
  • 0

    posted a message on DKPmon & Bidder v2.0
    Quote from Kelem »

    Quote from weeladdie »

    There are several posts that ask for the ability to export the dkp values out of EQDKP into a CSV format, to then be imported by DKPmon.

    The php file (dkpMon2Export.php) provided by the DKPmon_eqDKP module seems to have this functionality, but like others I can't get it to work.

    I don't know php, but the dkpMon2Export.php file includes code to deal with 'DKP Pools' (i.e. separate dkp lists for each instance). I'm pretty sure this is a facility provided by EQDKP-PLUS, but is not part of the standard EQDKP system.

    The question is, would it be possible for someone who knows php and sql to re-work this code to work with standard EQDKP??


    That is the exact file I use to export my eqDKP system to then take in game to import into DKPMon.
    It isn't csv, it's LUA.

    You run the file as a webpage, copy the entire page, then paste it into the file: \addons\dkpmon_eqdkp\importdata.lua
    Save it, start up the game (you didn't try to modify the file while the game was loaded did you?) and then go to import, and import it.
    It will give you feedback on how many were imported and if any errors were detected.

    And, I don't use eqDKP-PLUS, I use normal eqDKP. The pools are defined in the php file, by you, before you run it.

    All of this is detailed in the docs


    Ok...still can't get this to work for me....I might be missing something obvious but I can't find the documentation on this. Any ideas where it is?
    Posted in: General AddOns
  • 0

    posted a message on DKPmon & Bidder v2.0
    There are several posts that ask for the ability to export the dkp values out of EQDKP into a CSV format, to then be imported by DKPmon.

    The php file (dkpMon2Export.php) provided by the DKPmon_eqDKP module seems to have this functionality, but like others I can't get it to work.

    I don't know php, but the dkpMon2Export.php file includes code to deal with 'DKP Pools' (i.e. separate dkp lists for each instance). I'm pretty sure this is a facility provided by EQDKP-PLUS, but is not part of the standard EQDKP system.

    The question is, would it be possible for someone who knows php and sql to re-work this code to work with standard EQDKP??
    Posted in: General AddOns
  • To post a comment, please or register a new account.