Author Topic: That BadgeHunter_Badge Template...  (Read 3723 times)

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
That BadgeHunter_Badge Template...
« on: September 23, 2011, 04:01:25 AM »
It's been quite some time since we were able to link to individual badges on BadgeHunter, which has made this template generate broken links for a long time now.

I can go in and modify it right now and just have every page point to the master list of all their badges and we can just be done with it.

Or, if someone knows of a way to parse the page's categories for things like "Accolades", "Accomplishment", etc, we could at least direct the links to the proper badge categories - until they reorganize their site and break the links for us again.

Any thoughts?
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Aggelakis

  • Elite Boss
  • *****
  • Posts: 3,001
Re: That BadgeHunter_Badge Template...
« Reply #1 on: September 23, 2011, 04:59:09 AM »
http://www.badge-hunter.com/index.php?/page/view_badge_bytype.php?type=#

where # corresponds to a badge category:

1 - Exploration
2 - History
3 - Accomplishment
4 - Achievement
5 - Accolade
6 - Gladiator
7 - Veteran
8 - Super Group
9 - PVP
10 - Inventions
11 - Defeats
12 - Events
13 - Ouroboros
14 - Wentworths
15 - Day Jobs
16 - Architect

It looks like the badge popups are javascripted and I can't drill down properly to find the html page that is called by the javascript. I'm still looking though.
Bob Dole!! Bob Dole. Bob Dole! Bob Dole. Bob Dole. Bob Dole... Bob Dole... Bob... Dole...... Bob...


ParagonWiki
OuroPortal

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: That BadgeHunter_Badge Template...
« Reply #2 on: September 23, 2011, 05:03:51 AM »
Right.

I'm just trying to think of a way to modify the template that won't require going back and editing every badge page.  If the template could look at the page category, it could translate it into those numbers for the types, ignoring any parameters it might be getting passed in.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Aggelakis

  • Elite Boss
  • *****
  • Posts: 3,001
Re: That BadgeHunter_Badge Template...
« Reply #3 on: September 23, 2011, 05:13:25 AM »
Oh, goodness, I thought you were asking if we could parse *BADGE-HUNTER'S* page for categories. I was like, "uh? that's easy!" lol

I am having trouble finding the html page for the badge popups. The URL is done really badly ... oddly.
Bob Dole!! Bob Dole. Bob Dole! Bob Dole. Bob Dole. Bob Dole... Bob Dole... Bob... Dole...... Bob...


ParagonWiki
OuroPortal

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: That BadgeHunter_Badge Template...
« Reply #4 on: September 23, 2011, 05:42:17 PM »
I am having trouble finding the html page for the badge popups. The URL is done really badly ... oddly.

Would it make you feel any better if I said I spent several hours over several days trying to figure it out and couldn't come up with anything?  Snow Globe checked and couldn't find any way to access the badges individually, either.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

GuyPerfect

  • Mary Poppins
  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,740
Re: That BadgeHunter_Badge Template...
« Reply #5 on: September 23, 2011, 06:54:51 PM »
Gah, who taught you guys how to hack?

The page uses some kind of base code provided by Invision Power Services that's all AJAX'd up, and which I couldn't find any documentation for. It creates a class on the window object called IPBoard. The exact specification of the resulting object isn't important, but it's extended by a _badgehunter class located in the following file:

http://www.badge-hunter.com/public/js/bh.badge.js

What happens when you click a link is that it runs some code to A) fetch the badge data from the server and B) display the badge data in a pop-up area. Again, the nuts and bolts aren't important, and the resulting badge data URLs look like this:

http://www.badge-hunter.com/index.php??s=9bc7fe16f00c53749972013bf96f85e6&/page/view_badge?id=246&faction=H&char=0

Swap out the ID number and faction (which is H or V) where appropriate, and you've got yourself a badge link.

Note, however, that without the surrounding pop-up element, it's some pretty bland, un-styled data on an white background. But at the end of the day, it still gives us the links we need.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: That BadgeHunter_Badge Template...
« Reply #6 on: September 23, 2011, 07:09:18 PM »
Man, those links are horrible.

Workable, but horrible.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Aggelakis

  • Elite Boss
  • *****
  • Posts: 3,001
Re: That BadgeHunter_Badge Template...
« Reply #7 on: September 23, 2011, 07:21:01 PM »
I actually don't think those links are usable, sadly. It doesn't have the name in there anywhere, and the "badge order number" (second link, with green symbol) doesn't function. Some of the popups are... somewhat lacking (example).

Plus it looks like crap and I doubt Beef Cake wants us to link to something on his fancy website that looks like crap.
Bob Dole!! Bob Dole. Bob Dole! Bob Dole. Bob Dole. Bob Dole... Bob Dole... Bob... Dole...... Bob...


ParagonWiki
OuroPortal

GuyPerfect

  • Mary Poppins
  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,740
Re: That BadgeHunter_Badge Template...
« Reply #8 on: September 23, 2011, 07:23:02 PM »
So I guess we can do one of two things. Either ask Badge-Hunter if they would implement a link-friendly badge display, or remove Badge-Hunter links (which don't work) from the wiki for now.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: That BadgeHunter_Badge Template...
« Reply #9 on: September 23, 2011, 07:29:35 PM »
So I guess we can do one of two things. Either ask Badge-Hunter if they would implement a link-friendly badge display, or remove Badge-Hunter links (which don't work) from the wiki for now.
Or (the direction I was heading in to begin with) simply have the template generate the same link for every badge.

http://www.badge-hunter.com/index.php?/page/view_badge_bytype.php

(I think that's the right, but blocked at work, so I can't check.)
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Aggelakis

  • Elite Boss
  • *****
  • Posts: 3,001
Re: That BadgeHunter_Badge Template...
« Reply #10 on: September 23, 2011, 10:18:34 PM »
http://paragonwiki.com/wiki/Template:BadgeHunter2

Created a new template instead of modifying the current template for testing purposes. If we agree to this format, I can sic AutoWikiBrowser on categories of badges at a time to update to their appropriate type.

Once that is done, we can move BadgeHunter2 over to BadgeHunter Badge, and I can then sic AutoWikiBrowser on pages that use {{BadgeHunter2|<type>}} to update it to {{BadgeHunter Badge|<type>}}
Bob Dole!! Bob Dole. Bob Dole! Bob Dole. Bob Dole. Bob Dole... Bob Dole... Bob... Dole...... Bob...


ParagonWiki
OuroPortal

Sekoia

  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 1,848
Re: That BadgeHunter_Badge Template...
« Reply #11 on: September 24, 2011, 03:58:28 AM »
Our badge category articles -- such as Hero Exploration Badges or Hero Gladiator Badges -- should contain links to the appropriate BadgeHunter category pages. (And it looks like at least some do, though I notice the Hero Exploration article doesn't link properly.)

All of our individual badge articles link to the corresponding badge category articles, which have those BadgeHunter category links already. I don't see a need to additionally link to those badge categories from all the individual badge articles. That feels excessive, like we're bending over backwards to make sure we find a way to link to BadgeHunter for the sake of linking to BadgeHunter.

I suggest we just remove the BadgeHunter template call from all the individual badge articles. If we really do feel a need to link to BadgeHunter for each badge, then I suggest someone ask BeefCake if he can update his site to make that possible. If he's not interested in doing so, then I don't see any reason why we should worry about it ourselves.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,292
Re: That BadgeHunter_Badge Template...
« Reply #12 on: September 24, 2011, 04:33:13 AM »
Our badge category articles -- such as Hero Exploration Badges or Hero Gladiator Badges -- should contain links to the appropriate BadgeHunter category pages. (And it looks like at least some do, though I notice the Hero Exploration article doesn't link properly.)

Ah.  I was unaware that we had the categories linked from those pages.

Well then, I'm totally in favor of nuking the links on the individual pages.  They've been broken for a long, long time, and no one from BadgeHunter has seemed to really care about it.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov