^
Login

or


Development Notes

1. Introduction



Over the years of developing Xu-Fu's Pet Guide, many ideas and suggestions accumulated. I have tried a few different tools like Trello or even Confluence to keep track of them together with my development notes, but these tools are way too clunky for this small project. And they all lack transparency.
This section aims to solve both problems: all my notes in one place, and making them visible to you, the hopefully curious reader!




2. Current Project:


Blizzard are updating the database connection to their armory (their API). It requires redoing many aspects of the page so they will continue working. They plan to switch over from the old to the new API on December 16th. It's a lot of work but if I manage to get everything done, you will not notice any difference in the page and things will just continue to work as they did before :-)


Todos:
new colors on discord for all roles
bug: opening a collection ID that does not exist defaults to landing page without error message


- Saving of pets in strategy, should use and save the Species ID! Currently still using NPC ID. Other parts already working fine (?)

anywhere else?
cronjob: update collection
functions: get_collection_stats needs update to new all_pets as well - check everywhere where allpets is used!
mandatory ping against /status every 30d + deletion

exchange token for new client token!?


$allpets go through all files in:
AJAX / adm_update_pet.php
classes
index
root
data



Blocked Tasks:
- Spell importing full rework (API not ready)
- icon picker profile - char avatars (API not ready)
- profile - change of region and grabbing of wow characters (API not ready)
- oauth (pending response from blizzard)
- NPC ID manual entry form + ajax




Completed Tasks

DONE - Collection Viewer
DONE - cronjob for realm list updater
DONE - cronjobs for class and race import
DONE - Update pet needs to use new API and import new fields as well
DONE - XLS export of collection
DONE - pet colleciton view on viewing others profile page
DONE - Battletable and strat editing
DONE - script to move all "User Attempts" from NPC ID to Species ID
DONE - article editor (pet selection)
DONE - tooltip settings and profile settings => collection border around the avatar is not showing (not using new collection format)
DONE - excel export from ac_viewuser fix
DONE - pet collection view on my profile page
DONE - Alternatives table - PetID1,2,3 write script to move them from NPC ID to Species. Consider that ids 0-20 are reserved for special pets!


Rollout:

Full backup
Maintenance on
run script dbqueries for all collections
run script to move all Alternatives
run script to move all icons
wipe the entire user attempts table :/
make blizzard_api beta.php the main one - note down all function names that used _beta
make all _beta functions in functions the standard one (remove old ones)
Keyword API2 and COL2 in:
- ac_viewuser
- functions
- ac_collection
- Util
- battletable2
- alternatives_tooltip
- index
- article editor everywhere
- news article editor
- functions.js create_rematch?
- collection_viewer.php
- data/blizzard_api_beta.php - also look for "_beta" for json!
- cronjob/realmlist update
- cronjob/race class update
- classes/admin_petimport
- classes/ADMIN
- ajax adm_update_pet
- classes/export excel.php

then:
scan all files for _beta functions and return to main ones
Remove $allpets entirely, function and call at beginning of index
delete all KR and TW collections from collection viewer
delete token cache file _beta


Test:
- Logged in and logged out:
- Battletable
- Alternatives tooltip
- Collection viewer
- Profile import of collection
- XLS export col viewer as well as profile
- add strategy
- change pets within strategy
- article editor



3. Backlog:



Cleanup tasks:
- notifications on comments for news writer?
- category filtering, buttons showing the color coding somewhere
- Make sure error messages via growl are working when dead links redirect to Home. Currently broken
- go through all old news entries and sort them into the categories, small/main and fix formatting

Open tasks:

- BUG PRIO 1: Translation tool for fight names currently overwrites work of others => Version history + warning if changes were made
- TASK PRIO 2: internal notes - notification for curators ("admin (2)" ) - how? where?
- TASK PRIO 3: Detail Strat check stopped at ID 244
- TASK PRIO 1: Move PHP to Version 7 before March 2020
- TASK PRIO 3: Make comments of all languages visible in strategies
- TASK PRIO 3: battle tag in user profiles needs EU / US switch
- TASK PRIO 3: translation for "swap to your Family x"
- TASK PRIO 3: Admin button to reset rating/favourites on a strategy - suggested by Remte
- TASK PRIO 3: For Family Battler (BfA) - Add the names of the trainers as tooltips to the menu
- TASK PRIO 3: review alternatives sorting, Tags are higher rated than Ratings - swap it around?
- TASK PRIO 3: When a strategy is unpublished, will the favourites be cleared? What happens to the favs in that case or when users open up the page?
- TASK PRIO 3: article editor - Bullet points break formatting
- TASK PRIO 3: article editor - expandable text blocks
- TASK PRIO 3: Tags menu has icons with descriptions. It would be nice if these icons where clickable to toggle icons on and off

- BUG PRIO 3: When the creator comment has an unclosed tag like on it, it carries over to the first strategy line - add protection against unclosed tags
- BUG PRIO 3: Level slider in attempt recording doesn't work in some cases (tested with level pet)
- BUG PRIO 3: in profiles, btag and discord can be way too long. needs a way to display it properly
- BUG PRIO 3: article editor: when editing an article that is restricted to only ENglish and your own language is not english, it saves info into the localized part nevertheless and does not default to the EN version
- BUG PRIO 3: Reported by Jaguar: Alternatives tooltip sometimes shows a foreach error - for example on yula strategy
- BUG PRIO 3: Reported by Stan: Family Battler tooltips of family icons show sometimes the wrong achievement name
- BUG PRIO 3: comment preview on landing page cuts off comments with "COntinue reading" - if that hits a link at the same spot, it doesn't work, the continue reading becomes the link from the comment

- SUGGESTION By Irayna: Add XP Values to link list on left (like EU/US appearances of Menagerie). To see which fights give more XP than usual (espcially for legion world quests)
- SUGGESTION By Flatluigi: 21.03.2018: minor sort of request: for the pets that don't have a level/can't battle, take them out of the calculations for number of pets at max level/at rare quality
- SUGGESTION By Remte: I'd like to have fresh comment responses notifications cleared out when I visit them independently.
- SUGGESTION By Panseit: message system, put an icon next to the user profile icon when new messages are there.
- SUGGESTION By Irayna: When viewing other peoples collection, add a column for your own pets to compare the collections.
- SUGGESTION By Remte: A notice on the landing page when Squirt day is up on EU or US with a quick link
- SUGGESTION y Prudentius: Setting for each user to have child comments sort ASC or DESC (depending on preference)
- SUGGESTION By Remte: When substitute finder is used, the description of the fight changes pets aswell.
- SUGGESTION By Remte: Allowing non-family substitutes in non-specific fights
- SUGGESTION By Darkgroob: Longest day achievement in an article with links to the individual fights
- SUGGESTION By Unknown: tool suggestion - compare pets of users and see what duplicates could be traded between them to optimize both collections
- SUGGESTION By Grainne: A tool similar to Rufa's tables http://web.archive.org/web/20150405233814/http://signature.neflin.net/wowpets/pets.php
- SUGGESTION By Ragath: Refactor the fight selection menu and include additional info, such as XP values or "Repeatable" fight






4. Upcoming Project: Database Restructure (0%)


The database supporting Xu-Fu's different categories and menus is very old and is not set up properly. It is very difficult to create features with it, like for example the possibilty to move strategies or some of the other projects here including rematch mass export or the new ready-check tool.




5. Upcoming Project: New Ready-Check Tool (0%)


The Legion Ready Checker was one of the most popular tools on Xu-Fu. The addition of user strategies and breeds made this tool non-functional. To bring this back, a new tool showing the list of ALL pets could be created, showing how often the pet appears in each fight, broken down by breed. This could automatically cross-check with the saved collection. In a second step, a selector or sliders could be used to apply the table only on specific battling sections.




6. Upcoming Project: New Pet Tables in Articles (0%)


Every category article (like "Legion world quests") has a table on it that shows the required pets. This table is not using the new alternatives system and is therefore outdated.
This project is to create a new table that picks the best strategy for each fight in the category, based on the same criteria as the alternatives tooltip (favourite, ratings, tags..) and lists those pets. This should also include required or missing breeds. The table will most likely have a longer loading time and should therefore be hidden behind a "Load Pet Table" button that dynamically loads the table only on request.
Suggestion by Remte: tooltip showing which battles the pet appears in, make this interactable and the list of fights clickable to the respective strategy page





7. Upcoming Project: Rematch Mass Export (0%)


One of the most requested features is to mass export strategies to Rematch. Rematch can already import multiple strategies at once, but XuFu currently has no such export feature. That is mostly due to the existance of alternatives. Until user strategies and favourites, the page had no way of knowing which strategy is the best for you. This new tool will make use of those features and give you options from which section you cant to export strategies from, and if only your favourites or also the top pick for you should be exported.




8. Upcoming Project: New Dungeon Tool (0%)


Due to Teroclaw-Hatchling changes, the hardmode guides for Wailing Critters and Deadmines have been removed. Also, because of the addition of user strategies, the Celestial Tournament Planner is not working anymore. A new tool should be created that can be applied to any of the dungeons and to find the optimal strategies based on user collection for non-healing dungeons.




9. Upcoming Project: Pet Cards (0%)


Xu-Fu already has a database of all available pets with their skills, stats and additional info. This could be used to replace wowhead tooltips with built-in Xu-Fu pet tooltips that show more details about each pet, reduce loading times and give additional value to the tooltips.
Additional idea with it: Capture source of pets more clearly. Where are pets coming from? Add more tags as well that go along with it: Premium (for pets like baby winston - not in the shop but was a bought pet technically). Seasonal => Only available during specific seasonal events.






10. Possible Future Projects


- hyperlink preview texts and images
- comment-section: show more info about the threads in tooltip? maybe the top comment + 2 or 3 additional ones with [..] and a "X more messages" ?
- comment-section: for "Votes", maybe add together all votes from the thread from your comments? Otherwise a +50 subcomment might be hidden because it's not the first one
- Email notifications
- Tools: Top X pets of all strategies
- "Your profile has been viewed X times."
- Add friend (what effects?)
- user setting how many comments to display per page (currently set site wide)
- better brute force protection (pw reset)
- rework all tooltips to use tooltipster
- comment moderation features directly on page, including display of reports
- allow bnet connected accounts to unlink from bnet
- comment statistics (how many, how often per month, average upvotes etc.)
- article about fun stuff with pets, what they can do:
der stinker und eine schwarze katze spielen warner bros. nach
katzen können sich auf deinen schoß setzen
bäume trinken wasser, wenn sie nahe dran sind
der schreckliche oozling gibt dir einen kosmetischen debuff...





11. Finished Projects



11.1 Current Project: News 2.0 (finished October 18, 2019)


The news section now supports different topics and different users posting news. It shows a quick overview and is more easily searchable. Articles can be edited with the article editor for news writers and each article opens up in a separate page showing the full view + comments.

11.2 Project: Article Editor (finished April 16, 2018)


The page hosts many different articles and supports localization into 9 languages. This editor makes it easy for other users to add, edit or translate articles.
It is fully integrated into the user system, UAC, and allows on-page editing.


11.3 Project: Battletable 2.0 (finished June 02, 2018)


The battle tables were the first thing created on Xu-Fu. They are mostly static and not up to the standards of the current page.
This project was to fully re-create them, to integrate the user system, user collections and to add many more features such as breeds, coordinates, new Rematch formatting, an automated substitute finder and the option to record your attempts to make the strategy more accurate through crowd intelligence.


The substitute finder uses this logic:
no requirements => all substitutes are fine, based on skills and family
only a breed => creator pet, only show the selected breed(s). For substitutes, ignore breeds
only a stat => use the stat to determine which creator pet breed is OK. and use the stat for substitutes and their breeds
breed and stats => for the creators pet, only show the breed he activated. for substitutes, use the stat to show them or not.

11.4 Project: Dynamic Alternatives (finished July 01, 2018)


There should not be a limit to the amount of alternatives saved for any given fight. They should not have a fixed order either. The order should be dynamic and follow a logic that could include user settings, if the pets are in your collection, strategy upvotes, favourites, amount of pageviews, records of successful attempts or other factors.
The interface should use AJAX to reduce loading times and give a clear preview of the pets used.


The order in which strategies are shown is determined by 4 factors. Each factor supercedes the next. From top to bottom:

1. Favourited by user
If you set a strategy as favourite, it will be shown on top always

2. Pets missing from collection
The sorting will prioritize based on how many pets from the strategy you do not have in your saved collection:
No pets missing > one pet missing > two pets missing > three pets missing

3. Tags - optional
In the user settings, you can set the order of importance for all tags. Preferred tags move the strategy up, unfavored tags move it down in priority.

4. Rating and Favourites
Ratings and Favourites are calculated together into one single score. The calculation is:
- One favourite counts exactly the same as one 5* rating
- The stars are transformed into the numerical sequence -2, -1, 0, 1, 2
- The average is calculated and multiplied by a factor that is determined on the amount of votes+ratings:
1-10 ratings: Factor = 0.5
11-20 ratings: Factor = 0.8
20+ ratings: Factor = 1
This calculation makes sure that a single 5* vote on a strategy is not counted more important than an average of 4.8* from a large amount of voters, for example.
Likewise, a strategy that received many below average votes will be considered worse than one that received only a single 1* rating.

The first three factors only apply to registered users. If you are visiting without a user account, only factor 4 decides the sorting.

11.5 Project: User Strategies (finished August 01, 2018)


Users should be able to add and edit their own strategies. The editing options should be integrated into the Battletables without adding more pages. Most if not all options should be dynamic using AJAX to minimize page reloading.





13 Comments (EN)

Show first:


You must be logged in to vote on comments

1

You must be logged in to vote on comments

JestersTear

wrote on 12/05/2019

I don't know if something like this is possible, but a suggestion -

For the pet dungeons, instead of just spitting out the optimal strategy for each encounter based on our pet list, make a dungeon optimal strategy list all at once? What I mean is I look up, let's say, Gnomeregon, and it tells me for optimal strategies to use the same pet in 5 fights. Maybe something where it starts at the last fight and works backwards, so your best pets are used for the last fight (let's say it's fight #10), then it goes back to fight 9 and looks for an optimal strategy that doesn't use the 3 pets you'll be using in the final fight unless you have 2+ of one of them. This way you don't get to fight 8 and it says to use Ikky, but all 3 are either dead or too wounded from fights 2, 4 and 5 to be used again.
(edited)
You must be logged in to vote on comments

2

You must be logged in to vote on comments

Aranesh

wrote on 12/05/2019

Hey JestersTear!

That's definitely planned :) It's currenty listed as "Upcoming Project: New Dungeon Tool" and what you are suggesting is *exactly* what I'm planning to do ^^
Hope I'll be through this current database rework soon so I can jump on cooler stuff like this one.
Thanks for the suggestion! If you have any other ideas, always happy to hear them
You must be logged in to vote on comments

1

You must be logged in to vote on comments

JestersTear

wrote on 12/05/2019

Thanks, your hard work is definitely appreciated!
You must be logged in to vote on comments

1

You must be logged in to vote on comments

ZoroarkRonan

wrote on 09/08/2019

i have a question. when i was looking at my strat it said OP what does that mean?
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Gráinne

wrote on 09/08/2019

OP = Original Poster, which as the poster of the strat, refers to you.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

ragath

wrote on 05/20/2019

I would suggest GitHub or GitLab for maintaining and developing this project. These 2 tools are no overkil for this "small project" as you called it in the beginning. Both offer free code versioning for private repositories, Issue Tracking and more. Personally I prefer GitLab as it has more features.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Aranesh

wrote on 05/21/2019

Hey ragath!
I know about both and what they do, but have never used them to work on a software product. I'm very much a novice in this field and in the creation of this page I made many mistakes that make it very hard to move it to a repository, mostly security details (hardcoded passwords yay!). The effort to make everything ready for such a move is probably quite high, and a big unknown to me. So it's part not wanting to invest the time and part not wanting people to see the code behind this page that keeps me from doing it ^^'
You must be logged in to vote on comments

1

You must be logged in to vote on comments

ragath

wrote on 05/22/2019

I'm a professional software developer and I work with GitHub everyday. So in case you are interested in learnig how to get to a "new Level" I could give you some tips. With private repositories your code is not public and not visible to others. In case of hard-coded passwords and stuff there are simple methods how to handle it, e.g. using .env files or simple array files. But I also understand that it's a bit of work to migrate this project to GitLab etc
You must be logged in to vote on comments

1

You must be logged in to vote on comments

shybobcat

wrote on 03/20/2019

I’d like to report a bug, hope this is the right place. A linked group of similar crabs, starting with Kelp Scuttler, does not have their abilities aligned. For example, if the Kelp Scuttler is listed with the skills 1 1 2, when you scroll through the rest of the group, they are all listed as skills 2 2 2, while they should be the same as the first one. You can see it in this strategy:

https://www.wow-petguide.com/index.php?Strategy=1352

Would also like to add that this site is amazing! I’m very impressed with both how it looks and especially how well done the coding behind it! Thank you!
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Remte

wrote on 03/20/2019

Thank you for your kind words :)
I reuploaded the pet and told our master tinkerer, and it seems it's okay now. Hopefully it was not a signal of something more severe ^^
You must be logged in to vote on comments

1

You must be logged in to vote on comments

shybobcat

wrote on 03/21/2019

Thank you for a quick fix! It works fine now :)
You must be logged in to vote on comments

2

You must be logged in to vote on comments

Ekire

wrote on 12/28/2018

Wondering - now that they changed the way pet battles work, would it be doable to add the pet trainer names in brackets beside the quest name? Not everyone knows the WQ name if it isnt up, but the trainer name is easy to reference.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Ekire

wrote on 12/30/2018

Meaning stuff like Family Battler - IE: Zuldazar quest for "Small Beginnings" - Show it as either "Zujai - Small Beginnings", or "Small Beginnings (Zujai)"
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Remte

wrote on 12/06/2018

Not too soon: To avoid duplicates, any achievement-specific (Plushie, Family and as it was suggested The Longest Day) strategy could be automatically linked in the "global" encounter list (still redirecting to family section after clicking). To prevent clutter, they could be displayed only via user input to show more.
If this is not worth it, just expand the duplicate warning to all sections of the page… though it could be problem when someone decides to apply a strat the other way i.e. from globals to specific ones :P
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Seira

wrote on 10/16/2018

I love the "Incl. Steps" toggle. if somehow "Incl. TD Script" would be possible, my life would be almost complete :)
You must be logged in to vote on comments

1

You must be logged in to vote on comments

gsanta

wrote on 10/20/2018

I was flipping this back and forth to see what changed and didn't notice anything. What does the Incl. Steps toggle do?
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Seira

wrote on 10/21/2018

On the website, you can see the steps it takes to defeat the tamer. If you flip this before importing the Team into the game, you will see these steps in pet battle (in a note)
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Amber1019

wrote on 10/13/2018

Implementing a mention feature like I've seen you talk about sounds fantastic.
Another thing I've thought would be great would be adding a "date posted" and/or "date updated" to strategy pages. That way if/when Blizzard nerfs and makes changes to battle pets again, we'll be able to see when the strategy was posted, and whether or not it's been updated since the changes Blizzard made, so we know to alert others in the comments about it or to just look into finding a more recent strategy.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

NIteowl1970

wrote on 09/26/2018

Just found this page of upcoming projects. A lot of great stuff there. Just a couple requests.Under #10, you asked "Add a friend (what effects)" I would love to be able to add a friend and compare our pets, to see which ones they have that I still need. Also I would love a category on the pet lists that tells me how rare my pets are compared to the rest of the wow population, something like "Pet name = Ikky: Owned by 25% of other players"
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Nebs

wrote on 09/22/2018

Hey! Long time user here, love love love your work :)
Have seen few suggestions similar to mine, relating high XP battles leveling pet fights.
I was thinking of a list of fights for Pet battle week (bonus event) when you get that lovely +200% XP, focusing to those battles that give high XP.
So my idea was to have a list categorized by areas, where you can find those battles that give high XP, so most beneficial to do on the bonus week. It could be a pet leveling strat at the same time even on the weeks where the bonus XP isn't on.
You must be logged in to vote on comments

0

You must be logged in to vote on comments

Pike wrote on 08/25/2018

I love the site and have used it religiously for several years, thanks for all your hard work.

If I could give one little bit of feedback. I copy the turn instructions and paste them into the Rematch notes for each saved team. Previously the copied notes would paste with each turn on one line (with the turn number and description separated by whitespace). However, sometime between mid-Legion and today the page structure has changed so that copy and paste now loses the formatting and each cell is on its own line (so the turn number is on its own line then the description on the next line and so on).

I'd love to see the old table structure return (maybe just for the popout?) although tbh its not a major problem to manually fix the notes after pasting.

Thanks again for the site.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Aranesh

wrote on 09/10/2018

Hey Pike! I'm aware of this and one of the next things I'll work on is to include the strategy steps into rematch notes directly, so you won't have to do 2 copy pastes anymore, and this formatting issue will be gone at the same time :-)
You must be logged in to vote on comments

0

You must be logged in to vote on comments

Pike wrote on 09/22/2018

Just saw the steps copy feature, amazing work, thanks Aranesh!
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Cole#13497

wrote on 07/27/2018

Not sure where to put suggestions but here's mine.

Allow users to link pets when typing comments so you could use your links you want for wowhead on your own site as well. Also the links would allow you to say prevent people from link beast pets on the Aquatic Assault page etc. Additionally, it could eventually even help you import strategies from comments.
You must be logged in to vote on comments

2

You must be logged in to vote on comments

Aranesh

wrote on 07/28/2018

Hey :) Thanks a lot for the suggestion. That is planned as part of the "Pet Cards" project. At the same time I will most likely add a "mention" feature, like on many other platforms, where you put an @ and start typing a username and can then select a name to be mentioned and they get a ping about it.
You must be logged in to vote on comments

1

You must be logged in to vote on comments

Cole#13497

wrote on 07/30/2018

Sounds perfect!