Time stamp a specific update?

Put your EQRoster related questions/feedback/requests in here...
Forum rules
All the forums on this site are meant for either general or game specific discussions/questions/feedback.
This is NOT the place for spam, flames or fighting, and posts that don't follow this simple rule will be removed by the board moderator(s).

Enjoy our games, utils, tools and these forums...
Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Time stamp a specific update?

Postby Jonkiley » Tue Jul 31, 2007 4:18

Hello, and thanks for having me.

I got the EQ Roster about 2 weeks ago, faught to get it set up on a capable server, and have been playing with it since.. having no PHP or MySQL knowhow whatsoever, but self taught HTML and C++ diploma, i took on the challenge to set this up for my guild hehe. I must say, it is a God send comparred to the HTML post i was maintaining, every update being emailed to me and being entered by hand.

I have the roster set up now, and have made a few alterations. Made a few bits of text larger so people can find certian links, adding text here and there to better explain what certian flags and keys are from.. I was even able to add the other 7 PoR flags for Deathknell access ! Im so jazzed about this, but OMG that was a chore ! ( btw, those are " Saga_Skins, Preparing_Skins, Become_the_Vessel, Berzerker_Bones, Daosheen, Suchun, and Inspiration" ) hehe, had to type that so much today i know them in my sleep now... I added them directly to the ToB table and display page.

I intend to Edit the Veeshans Peak key , Adding the 5 bits needed for the New key ( Drained Cipher, Chardok essence, Howlling stones essence, Sebilis essence, and Brood dragon blood ). Im confident i can do this after having done the 7 PoR flags..

What i REALLY need help with however.. is a key feature that will make this roster nearly complete.. a place to list 1 Epic Raid fight.. What i plan to do, is have a pull down list ( like the race or class list ), but with about 40 or so of the 1.5 and 2.0 epic raid targets.. I dont see too much trouble adding this, but im still too nieve to know how much pain that will cause me lol.. the tricky bit i see, is that I want another field, to hold and display a Time Stamp, set at the time the member chooses thier raid target.

So essentially, each member will have 1 slot selected by pull down list. they pick a fight, and thier profile gets a time stamp at the time of thier request. So i can list the epic raids that have been requested, and sort them by the date requested. A member completes thier fight, selects thier next fight, and thier new request is time stamped, putting them in the proper place on ' The List '.

From what I see of the Character edit screen, updating Anything on that page, would trigger the time stamp if i placed the items there? Purhaps putting this Epic Request + Time stamp on its own window? Any suggestions, help, tips would be VERY much appreciated.

PS. here is a link to the roster i have set up. Incase youd like a look. Pardon the banner at the top.. the server im on puts that there i think. i dont see any code for it on the page.. but when i first set this up, that banner was in EACH page of the frame, which really made things difficult.
http://xaoscreations.profusehost.net/EQRoster

PPS. oh, if you happen to know some line of code i could put in that would make that very top bit ( roster.header i believe ) scroll to the bottom automattically, i could fix that banner issue on my page, by scrolling down past it to the EQ Roster logo.

User avatar
GamePlayHeaven
Site Admin
Posts: 562
Joined: Sun Feb 06, 2005 8:50

Postby GamePlayHeaven » Tue Jul 31, 2007 10:36

Welcome to the forums Jonkiley, and I'm glad you're enjoying the roster.
I know what a pain it is to maintain a sucky one, which is what triggered me to code the EQRoster in the first place :)

Looks like you quickly got the hang of it, according to the adjustments you made. I'm sure you're gonna like doing stuff in PHP/MySQL compared to pure html editing.

Let me go through your questions.
The header still seems in place, but the code looks adjusted. What you could try is changing the nHeaderHeight variable in the index.html to 0. That should remove the header totally from view.

And then the big question, the epic fights.
How I would probably implement it, is by adding a "request epic fight" button to the character modify screen. Assuming that a character can only have 1 epic fight requested (not sure if you allow 1 epic 1.5 AND 1 epic 2.0).

Upon clicking that button, I would check if the user had an epic fight selected for one of his characters already. If that's the case, I'd just give either a warning screen, saying that he had "mob x" selected already, and continuing to select a different target would put him at the bottom of the list again.

Then I would show a list of Epic targets for that class, and let him choose one.

Upon choosing one, he would be added to the list of requested epic targets with the current time stamp.

This would require 2 new tables in the database: EpicHits and EpicTargets.
EpicHits would have the following fields: CharID, TargetID, DateRequested.
EpicTargets would have the following fields: TargetID, Class, Description.

The description is not necessary, but might help identifying the targets and setup the info page.

Let me know if you need help/more info.


Regards,
Michaël

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Tue Jul 31, 2007 16:44

MadButch wrote:Let me go through your questions.
The header still seems in place, but the code looks adjusted. What you could try is changing the nHeaderHeight variable in the index.html to 0. That should remove the header totally from view.

I'll try that, and hope the server doesnt decide to slip the banner into the next frame lol.

MadButch wrote:And then the big question, the epic fights.
How I would probably implement it, is by adding a "request epic fight" button to the character modify screen. Assuming that a character can only have 1 epic fight requested (not sure if you allow 1 epic 1.5 AND 1 epic 2.0).

Each Character only needs 1 epic fight since most of them must be done in sequence. However there are a few places where they have a choice of 2 or 3 that can be done in any order, its just simpler this way.

MadButch wrote:Upon clicking that button, I would check if the user had an epic fight selected for one of his characters already. If that's the case, I'd just give either a warning screen, saying that he had "mob x" selected already, and continuing to select a different target would put him at the bottom of the list again.

I like this, but would want it to check that Character, NOT the User. In our guild some people run 4 toons at a time, and all have epic fights. Each character can be on the request list, but with just thier next fight.

MadButch wrote:Then I would show a list of Epic targets for that class, and let him choose one.

Upon choosing one, he would be added to the list of requested epic targets with the current time stamp.

This would require 2 new tables in the database: EpicHits and EpicTargets.
EpicHits would have the following fields: CharID, TargetID, DateRequested.
EpicTargets would have the following fields: TargetID, Class, Description.

The description is not necessary, but might help identifying the targets and setup the info page.

Let me know if you need help/more info..

Thank you much for the tips.
Last edited by Jonkiley on Tue Jul 31, 2007 18:46, edited 1 time in total.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Tue Jul 31, 2007 18:45

I have just finished making the 2 new tables. And i hope i got each set right .

I used the same values for the EpicHits CharID as was in the Other Tables, and set CharID as the primary. TargetID i wasnt posative about, so used those same values again, assuming if it worked for the Character #s, it would work for the Target ones too lol. DateRequested i set the same as the LastUpdate from Characters table.

For the EpicTargets table, TargetID same as above, but marked as Primary. Class the same as from the Characters table. And Description i set up the same as the LastName from Characters. If i cant give a decent descritpion in 30 characters, i guess ill just have to adjust that value up lol.

Now to dig in to the actual Coding... And entering each target into the tqable.. Fun fun fun.

ps. I get how the EpicHits works, CharID with 1 TargetID selected from the EpicTarget table, and timestamped on update, ok. But the EpicTargets table has me a little confused. Just looking at it, it seems that the User selects thier class, then would enter a descrition of thier target, then the table gives that target a TargetID? If this is right, I suppose that would work.. but leaves it open for them to have different Descriptions for the same target, and therefor different TargetIDs for the same fight?

What im specifically looking to do, is for them to have a Pulldown list, of the Epic Raid Targets ( which i would allready have in the table ), they select the one they need, and that Target ID gets stored with the CharID and Timestamp.. Hmm, OHH, ok, I see an option here.. because I do the coding, and can set this up how i want it LOL ( duh ). when they click the ' Request Raid Fight ' button from the Character screen. The Epic Request page, only grabs the Descriptions ( which i allready have in the table) of the fights matching thier Class. they pick the one they want , and that TargetID gets passed.. ok, fine. But to do this, will i have to change the Desccription feld to an Enum, like the Class field to get the Pull down list??

I dont need the EpicTargets table to be changed by the User, it essentially will just be a lookup, they pick the target they need, and it sends the TargetID back and timestamps it.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Ramble on

Postby Jonkiley » Wed Aug 01, 2007 0:38

Sorry for all the ramble hehe. sometimes i think with my fingures. I see i had the concept skewed, and im working it out. Most of the time with code like this i dont know, i play with it till i break it, then learn thru putting it back together lol. Thats how i taught myself HTML.

Anyway..

EpicHits Table
CharID - thier CharID
TargetID - Passed from the Targets table.
DateRequested - Stamp at time of updating to this table

EpicTargets Table
TargetID - Actual Raid target names
Class - Used to sort the TargetIDs by CharID's Class i assume.
Description - Additonal information about the Target

Im still working all this out. with no PHP or MySQL understanding its been mostly cut / paste / edit so far. Thats how i added the 7 PoR flags. Added the 7 flags to the PoR table, scrolled thru the display page and added the 7 flags to Every Place that used the other PoR flags, Edited the Character edit page that same way, and modified the tables to allow for them. Then realized i had to do the same thing to the Characters.inc so they would pass thru.

That took some time and patience, but didnt take a lot of understanding of the actual coding.. But setting up this Epic Request from scratch.. ill have to figure out what all the code is actually doing, so i can figure out which bits of code i have to copy and chop to fit my needs LOL.

Anyway, thanks for letting me think.

User avatar
GamePlayHeaven
Site Admin
Posts: 562
Joined: Sun Feb 06, 2005 8:50

Postby GamePlayHeaven » Wed Aug 01, 2007 1:04

You're definitely on the right track now.

You mentioned the enum, I was thinking that to t first. But if you'd use an enum there, there would be no way to tell what class that fight belonged to.
So that's why there's the 2nd table. Maybe the 2nd table should have a name field as well, then you can leave the TargetID a nr (just like CharID).

That would make it:
EpicTargets Table
TargetID - Unique nr generated when you add a Target to the table.
TargetName - Actual Raid targets name
Class - This should be the same enum as in the Character table
Description - Additonal information about the Target

You manually enter a couple of EpicTargets to the table. You can either keep doing this, since it's Administrator work only, or you can create your own modify page for this later (to make it easier on yourself).

Now you enter a few dummy records into the EpicHits table, so you have something to display.

Next I would start with the overview/list page.
Use one of the existing overviews/lists as an example.
What you are going to do, is loop through the EpicHits table, sorted on date requested. The CharID is used to retrieve the CharName from the Chracter table and the TargetID is used to retrieve the TargetName from the EpicTargets table. (all in one SQL statement).

Then all left to do is add the button to the character modify page and you're all set.

Well, apart from the page where you have to select the target for that character, which seems to be the hardest one to code yourself (since there's no ready made example in there).

You could fill a dropdown box with all the hits for that class in the targets table, or you could create a table with radio buttons in the first row. I would probably prefer the later, since you get a better overview at first glance, plus you could do some extra stuff in there (more control). For example, you could remember someone's last EpicHit, and change the text color of the ones that are no longer of use to that character. But that's all fancy schmancy, you want it to work first.

Either way, you will loop to the EpicTargets table, sorted on TargetName and with a where clause specifying that the Class should be the same as the class of the character that clicked the button to get to the page.

Once the user has selected a target, he has to click the "request hit" button, and you enter the record in the EpicHits table.


Hopefully it sounds a lot less daunting now :)

If you get stuck, just mail me what you created so far and I'll take a look at it.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Wed Aug 01, 2007 5:52

MadButch wrote:You're definitely on the right track now.

You mentioned the enum, I was thinking that to t first. But if you'd use an enum there, there would be no way to tell what class that fight belonged to.
So that's why there's the 2nd table. Maybe the 2nd table should have a name field as well, then you can leave the TargetID a nr (just like CharID).

That would make it:
EpicTargets Table
TargetID - Unique nr generated when you add a Target to the table.
TargetName - Actual Raid targets name
Class - This should be the same enum as in the Character table
Description - Additonal information about the Target


LOL, thats exaclty what ive done ! i dropped the description for now, and made it TargetName.

MadButch wrote:You manually enter a couple of EpicTargets to the table. You can either keep doing this, since it's Administrator work only, or you can create your own modify page for this later (to make it easier on yourself).

Now you enter a few dummy records into the EpicHits table, so you have something to display.


Again, exactly what i did, I realized id be at this forever, so i put in a couple records, did an export in phpMyadmin so i was able to get a snip of the code needed, then copied that to a new file ive been adding to for the rest.

MadButch wrote:Next I would start with the overview/list page.
Use one of the existing overviews/lists as an example.
What you are going to do, is loop through the EpicHits table, sorted on date requested. The CharID is used to retrieve the CharName from the Chracter table and the TargetID is used to retrieve the TargetName from the EpicTargets table. (all in one SQL statement).

Then all left to do is add the button to the character modify page and you're all set.


I havnt started the overview page yet, i went with putting a space on the Character Edit page for the button ( just the Statistics icon ) and a place for the current TargetName for this CharID. ei
Epic Raid Requested
:!: 2.0 Zordak Ragefire ( TD )


MadButch wrote:Well, apart from the page where you have to select the target for that character, which seems to be the hardest one to code yourself (since there's no ready made example in there).

You could fill a dropdown box with all the hits for that class in the targets table, or you could create a table with radio buttons in the first row. I would probably prefer the later, since you get a better overview at first glance, plus you could do some extra stuff in there (more control). For example, you could remember someone's last EpicHit, and change the text color of the ones that are no longer of use to that character. But that's all fancy schmancy, you want it to work first.


I am liking that idea, will be easier than trying to figure out how to sort the Tagets by class, and then fill them into a pull down list.. I can do tables, the query code will do my head in lol. And it lets them see what order things are donw in. also, I can put other steps in there, that we would Not take a raid to do, and only the Raid targets are selectable for Raid HRequests.

MadButch wrote:Either way, you will loop to the EpicTargets table, sorted on TargetName and with a where clause specifying that the Class should be the same as the class of the character that clicked the button to get to the page.

Once the user has selected a target, he has to click the "request hit" button, and you enter the record in the EpicHits table.

I think the looping and sorting and wheres are the spots ill have the difficulty in, but ill get it hehe. ill force it till it breaks, and patch it with putty.

ps. cant figure out why the quotes ate working now. oh well, hope its not too hard to read.. but after reading this roster code.. this is kindergarden lol

User avatar
GamePlayHeaven
Site Admin
Posts: 562
Joined: Sun Feb 06, 2005 8:50

Postby GamePlayHeaven » Wed Aug 01, 2007 12:15

Hehe, it ain't that bad /wink


ps / instead of \

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Wed Aug 01, 2007 13:40

MadButch wrote:Hehe, it ain't that bad /wink


ps / instead of \

Of course it is, lol. What did i say about this being kindergarden? I couldnt tell you a thing i learned in there.. except how to play in sand with clothespins.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Wed Aug 01, 2007 16:39

Im using the SSRA_Keys overview as a guide, since it has the fewest flags to deal with , and therefor less code to wade thru hehe. But this part still has me a bit confused.
$strSelectQuery = "SELECT CharName, NameMain, SSRA_Emperor_Key, Taskmasters_Pouch, Zazuzhs_Idol, Ring, Insignia, OldMember \n" .

"FROM SSRA_Emperor_Key \n" .
"LEFT JOIN Characters ON (SSRA_Emperor_Key.CharID = Characters.CharID) \n" .
"LEFT JOIN `Keys` ON (SSRA_Emperor_Key.CharID = Keys.CharID) \n" .
"WHERE ( SSRA_Emperor_Key > 0 OR \n" .
"Taskmasters_Pouch > 0 OR \n" .
"Zazuzhs_Idol > 0 OR \n" .
"Ring > 0 OR \n" .
"Insignia > 0 ) \n";

Im sure i need to
$strSelectQuery = "SELECT CharName, NameMain, TargetID, DateRequested, TargetName, Description, OldMember \n" .
But the other bit, im unsure of, since im pulling from 3 different tables. When i added the PoR flags before, i had just added them to the same PoR table, so it wasnt any trouble to just add the key names to the list. Ive looked at the Character Edit screen, since its the only screen i could think of that pulls from more than 1 table, but I didnt see this bit of code there. Im still unsure how this works LOL.

User avatar
GamePlayHeaven
Site Admin
Posts: 562
Joined: Sun Feb 06, 2005 8:50

Postby GamePlayHeaven » Thu Aug 02, 2007 0:10

You select the records from the new table, and join the characters and EpicTargets table because you want to lookup/add some fields of those tables as well.

So it would look like:

Code: Select all

$strSelectQuery = "SELECT CharName, DateRequested, TargetName, Description, OldMember \n" .

"FROM EpicHits \n" .
"LEFT JOIN Characters ON (EpicHits.CharID = Characters.CharID) \n" .
"LEFT JOIN EpicTargets ON (EpicHits.TargetID = EpicTargets.TargetID) \n";


In the select part you only have to put fields that you want to select. You will receive those fields in variables, and use them to display the record.
You don't need any IDs there, because you won't display them.
You only need OldMember is you are going to show the EpicHits requested by old members in red for admins only (just like how the other overviews do it).

You only have to put the table name in front of the variable name if it's not unique. CharID and TargetID are used in more then 1 table in the query, so you have to specify what table it's in by using TableName.FieldName (EpicHits.CharID).

And I don't think there is a where clause necessary for this statement, because you want to show all records from the table.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Thu Aug 02, 2007 1:15

Thank you very much, thats more clear to me now.

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Thu Aug 02, 2007 5:52

Woo, over another hurdle !

I have the Epic_Requests overview working, with 4 dummy files.

Just 1 problem, the Query you showed me, didnt have the NameMain in it, so i took that out, thinking i wouldnt need it.. so now, i dont get the edit character icon on the left.. well _I_ do, but thats cuz im the admin and can edit anyone. And im not sure where to put it back in LOL. Oh well, not a big problem, they have a ton of other places to go if they want to edit. I'll probably put a button on the overview page , like the one ill put on the character edit page, that sends them to the Request page.

I havnt started that one yet, ill work on it tomorrow.. But i was having a thought about the Discription field.. Thinking I will put a Link in there to a page for that Fight.

Anyway. Thank you for that Query tip, cleared things up so much and opened the flood gates, was able to get a bit done today.

http://xaoscreations.profusehost.net/EQRoster/

User avatar
GamePlayHeaven
Site Admin
Posts: 562
Joined: Sun Feb 06, 2005 8:50

Postby GamePlayHeaven » Thu Aug 02, 2007 7:24

Just re-add NameMain to the query, it only exists in the Character table which your already linking to, and will work automatically after adding it (somethings are really easy) :)

You should make sure you add a delete icon to it for admins, that way you can delete hits from the list after you did them. Check the User list to see an example of how to do that.

I would add the url in a separate field in the EpicTargets table. Then you can show a little info icon in a column (or behind the name) if the field is filled, and attach the url to the info icon.

You're almost there :wink:

Jonkiley
Posts: 12
Joined: Tue Jul 31, 2007 4:01

Postby Jonkiley » Thu Aug 02, 2007 21:04

Havnt started the Request Raid page yet. After getting the Epic Requests running, and displaying the dummy records. I decided to go back to the Character Edit page and adjust the code i have there. I didnt want to strugle with actally trying to figure out the code involved when i set it up, so I just had it using Class where i wanted the TargetName. So i had a variable i knew it understood, so i could see it showing something and get the placement right.

So, since i might have it display the TargetName and the DateRequested, im not sure yet, i was sure to add both of those fields to the page. in each appropriate section. But im having a problem now. I am getting an error :

Code: Select all

(Column 'Class' in field list is ambiguous)

Im assuming this has to do with Class being used in the Character table And the EpicTargets table. I tried putting in a

Code: Select all

"LEFT JOIN Characters ON (EpicTargets.Class = Characters.Class) \n" .
But that gave me

Code: Select all

(Not unique table/alias: 'Characters')

I tried Adding in another

Code: Select all

"LEFT JOIN EpicTargets ON (Characters.Class = EpicTargets.Class) \n" .

and got

Code: Select all

(Not unique table/alias: 'EpicTargets')


so Im stumped.

PS. hmm, seems i got confused in my pages. .I was working on the character.inc file. but those are the errors i get when trying to load the Character Modify page


Return to “EQRoster”

Who is online

Users browsing this forum: No registered users and 1 guest

cron