Help coding a Roster Page for EQDKP

EQDKP integration forum

Help coding a Roster Page for EQDKP

Postby Greenoaf » Thu Sep 07, 2006 12:51 am

My EQDKP Install

Roster Install

Using:

Mod: rpgo-GuildProfiler_1.6.0
EQDKP: 1.3.1
Roster: 1.7.0
My database meets all the requirements for the Roster install.

I want to create an EQDKP page that pulls the data from the Roster database, I already have all the CSS and integration setup for the EQDKP site, I don't want to have to work the whole Roster page over.... just to get it to match...

Posted in the Forums is:

Code: Select all

<?php
require("includes/config.php"); // This is where my MYSQL connection is THE SAME DATABASE AS WOWROSTER INSTALLED
require("header.php"); // Everything in the file "header.php" will be displayed BEFORE the content

$getroster1 mysql_query("SELECT guild_title FROM roster_members GROUP BY guild_title ORDER BY guild_rank ASC");
// Query that groups the GUILD TITLES of the members (so you dont have more than one block per title) ORDER them by GUILD ID Meaning that the importantest persons are on top

while($r=mysql_fetch_array($getroster1)){ // While your rows from the table

$getroster2 mysql_query("SELECT name,level,class,guild_title FROM roster_members WHERE guild_title='".$r['guild_title']." ORDER BY level DESC'");
// Get all of the information u are willing to display the block of the Guild Rank ORDERED by level (HIGHEST ONES ON TOP)

echo("<table width='100%'  border='0' cellpadding='4' cellspacing='0' class='content'>
  <tr>
    <td width='100%' colspan='4' class='content-top'><b>"
.$r['guild_title']."</b></td>
  </tr>
  <tr>
    <td width='25%' class='content-contents4'><strong>Name:</strong></td>
    <td width='25%' class='content-contents4'><strong>Level: </strong></td>
    <td width='25%' class='content-contents4'><strong>Class: </strong></td>
    <td width='25%' class='contents-bottom'><strong>Rank:</strong></td>
  </tr>"
); // While The beginning of the block with the name of the Rank ur about to display..

while($rt=mysql_fetch_array($getroster2)){ // Get all of the information u are willing to display inside the block of the Guild Rank
extract($rt);//remove the $r so its just $variable
echo("<tr>
    <td width='25%' class='content-contents4'>$name</td>
    <td width='25%' class='content-contents4'>$level</td>
    <td width='25%' class='content-contents4'>$class</td>
    <td width='25%' class='contents-bottom'>$guild_title</td>
  </tr>"
);
// Close While information

echo("</table>
<br>"
);

// Close While Block

require("footer.php"); // Everything in the file "footer.php" will be displayed AFTER the content
?>


I want to do the same fuction, I can handle all the header and footer coding, but I am still having some issues. The includes/config.php doesn't exist in the install of the Roster anymore, or it has moved and been renamed....

Can I get some help with this, I'm sure it is very simple, but PHP isn't my niche.....

I just want to reach into the Roster database and pull the Name, Rank, Level, Class, and Last_Online to enter into a PHP page that I integrate into my EQDKP site, the only reason I need the install is for the database build and to have the ability to update the roster.

Can anyone help me please.
Green
User avatar
Greenoaf
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Sep 06, 2006 10:07 pm

Re: Help coding a Roster Page for EQDKP

Postby Greenoaf » Sun Sep 10, 2006 2:48 pm

Anyone?

I guess I might try an include on one of my PHP pages and then gut the roster page I pull in to meet needs.... hand't thought of that....

Green
User avatar
Greenoaf
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Sep 06, 2006 10:07 pm

Help coding a Roster Page for EQDKP

Postby zanix » Sun Sep 10, 2006 5:39 pm

Theoredically, that code should work

I don't anything EQDKP so I can't help much on how to build additional pages into to, or how to integrate the data from roster into eqdkp
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Help coding a Roster Page for EQDKP

Postby Greenoaf » Sun Sep 10, 2006 6:18 pm

Here is my issue, I'm not sure what goes in the

includes/config.php

there is an EQDKP config.php in the includes folder of the EQDKP install, but my roster and EQDKP are in seperate databases. So create a configroster.php identical to the EQDKP except with the database info for the roster database?

like ~
Code: Select all
require("includes/configroster.php");
 


I'll play with this tonight, but I'm not sure how to source the page from the EQDKP structure and grab the data from the WoWRoster Database.

Thanks for the response,
Green
User avatar
Greenoaf
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Sep 06, 2006 10:07 pm

Help coding a Roster Page for EQDKP

Postby zanix » Sun Sep 10, 2006 6:24 pm

oh, use the conf.php file from roster
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Help coding a Roster Page for EQDKP

Postby Greenoaf » Sun Sep 10, 2006 6:36 pm

So just use the full path to pull it from the roster

Code: Select all
require("http://roster.libertas-manus.net/admin/config.php");
 


and then update the table *prefix* to match my table structure...

So the end result:

Code: Select all

<?
require("http://roster.libertas-manus.net/admin/config.php"); // This is where my MYSQL connection is THE SAME DATABASE AS WOWROSTER INSTALLED
require("header.php"); // Everything in the file "header.php" will be displayed BEFORE the content

$getroster1 mysql_query("SELECT guild_title FROM *prefix*_members GROUP BY guild_title ORDER BY guild_rank ASC");
// Query that groups the GUILD TITLES of the members (so you dont have more than one block per title) ORDER them by GUILD ID Meaning that the importantest persons are on top

while($r=mysql_fetch_array($getroster1)){ // While your rows from the table

$getroster2 mysql_query("SELECT name,level,class,guild_title FROM *prefix*_members WHERE guild_title='".$r['guild_title']." ORDER BY level DESC'");
// Get all of the information u are willing to display the block of the Guild Rank ORDERED by level (HIGHEST ONES ON TOP)

echo("<table width='100%'  border='0' cellpadding='4' cellspacing='0' class='content'>
  <tr>
    <td width='100%' colspan='4' class='content-top'><b>"
.$r['guild_title']."</b></td>
  </tr>
  <tr>
    <td width='25%' class='content-contents4'><strong>Name:</strong></td>
    <td width='25%' class='content-contents4'><strong>Level: </strong></td>
    <td width='25%' class='content-contents4'><strong>Class: </strong></td>
    <td width='25%' class='contents-bottom'><strong>Rank:</strong></td>
  </tr>"
); // While The beginning of the block with the name of the Rank ur about to display..

while($rt=mysql_fetch_array($getroster2)){ // Get all of the information u are willing to display inside the block of the Guild Rank
extract($rt);//remove the $r so its just $variable
echo("<tr>
    <td width='25%' class='content-contents4'>$name</td>
    <td width='25%' class='content-contents4'>$level</td>
    <td width='25%' class='content-contents4'>$class</td>
    <td width='25%' class='contents-bottom'>$guild_title</td>
  </tr>"
);
// Close While information

echo("</table>
<br>"
);

// Close While Block

require("footer.php"); // Everything in the file "footer.php" will be displayed AFTER the content
?>


Then edit the CSS and I should be good, does this look right?

Green
Last edited by Greenoaf on Sun Sep 10, 2006 6:37 pm, edited 1 time in total.
User avatar
Greenoaf
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Sep 06, 2006 10:07 pm

Help coding a Roster Page for EQDKP

Postby zanix » Sun Sep 10, 2006 7:33 pm

it needs to be a local path to that file, not a url path
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Help coding a Roster Page for EQDKP

Postby Greenoaf » Sun Sep 10, 2006 7:57 pm

mmkai, thanks a bunch for the help, I'll work on this tonight, if it works ok, I'll post the code here for anyone in the future that wants to use it.

Green
User avatar
Greenoaf
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Sep 06, 2006 10:07 pm

Re: Help coding a Roster Page for EQDKP

Postby Khazin » Wed Sep 27, 2006 10:48 pm

any further action on this?
Khazin
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Wed Sep 27, 2006 7:17 am


Return to EQDKP

Who is online

Users browsing this forum: No registered users and 0 guests