Monday, April 29, 2019

(4-29) Final Steps

This week, I solved the card issue. The problem involved the data being inserted into the database not matching that of the TCG server (the application IDs didn't match). I'm currently unsure why exactly this happened, but I'm working on figuring it out so it won't happen again.

Additionally, this week I implemented the base code to support card stacking (multiple instances of the same card will appear in a "stack" in the cardbook) and a "share to Facebook" button to each card. To have the cards stack, I first read all the cards into a PHP array of objects. Then, when echo-ing the resulting html, I check to see how many instances of the card exist in the array. For each instance, I add another card div with a higher z-index, shift it right and down, and decrease its size. As for the share button, Facebook made the sharing button incredibly difficult due to their (rather recent) changes to the feature involving security. Since the TCG game site doesn't use HTTPS, I could not have a share button that shares a link to the card (so the user can share the card they earned) and have it redirect to the game site so others may play. My workaround was sharing the image itself, and having a link to the game server displayed as a "comment" in the share box.

This week, I plan on adding the entire card (not just the image, but also stats) to the cardbook. Additionally, I plan on making the site in its entirety more aesthetically pleasing, for at the moment it is rather rudimentary.

No comments:

Post a Comment