Author Topic: ListBySupergroup?  (Read 9536 times)

Greysteele

  • Minion
  • **
  • Posts: 31
ListBySupergroup?
« on: November 24, 2008, 05:27:42 PM »
Hey, been away awhile and it looks like lots has changed here on Planet Titan

Back in the "olden days" we had externally accessible methods that allowed us to pull our SG data for use on our SG web sites.  I know that not many used it, but my SG (Starforce on Guardian) did and would like to use it again.

Are those old methods still supported?  Specifically, what about ListBySupergroup?

Thanks in advance...

IceHeart

  • Boss
  • ****
  • Posts: 173
  • a.k.a 'Ice' - Shadow Souls' Top Cat
    • Shadow Souls
Re: ListBySupergroup?
« Reply #1 on: November 25, 2008, 09:25:55 PM »
This would be nice..
Something I was kinda wondering earlier about.. if not a fancy API or such.. but maybe, how about a 'slimmed down' version of the SG page that can be embedded in other sites to use as a 'roster'..

take a look at my SG's website to get an idea of what I mean...
Shadow Souls Homepage
and go either the 'Shadow Souls' or 'Shadow Souls-Illuminati' tabs
(pardon the mess - we always in construction :)  )

What I was thinking is a lighter version of the page that includes basically the list, a header with the CIT logo/link and a footer with the titan tm etc., and having all links forced as a new window/tab...

Guildportal is a fairly decent site, but their character management tools.. well, pretty much sucks.
So I'd say this works both ways.. the SG can have a better automated tracking tool for its members, We have a full 150 SG - with about 40 individual accounts, but barely 5 or 6 track with CIT-  and by having that I can get more SG members to Titan to track their stuff too...

Just $2 inf..



SuckerPunch

  • Elite Boss
  • *****
  • Posts: 1,608
    • Titan Network
Re: ListBySupergroup?
« Reply #2 on: November 25, 2008, 10:48:56 PM »
Once I get the new version of TNT wrapped up, I'll be heading back to CIT to clean it up some. This will be one of the things I'll try to work in.

Steiner

  • Elite Boss
  • *****
  • Posts: 1,602
    • Steinerd.com
Re: ListBySupergroup?
« Reply #3 on: November 25, 2008, 11:10:22 PM »
Well, I got a few things I'm spinning out right now, Grey's first post along the line of adding additional info to the XML field. (I only have the % of lvl completion to finish, which is quite simple)

And I actually "jumped the gun" and started working on a SG xml feed. It won't be private and won't need the password string in the URI, BUT I also found how to incorporate user's hidden status on both characters and visible characters' Influ and XP, making it so, if they don't want them visible, they won't even be visible here.


Lastly, after speaking with Mav-X... it was decided that the ability to hide influe and xp should be character based, not global, HOWEVER, he brought up the brilliant idea of utilizing both. If you character doesn't have a decision made on weather XP & influ should be hidden, than it will ask the global settings for the right answer. Making the character tier the dominant query.

(Ask IceHeart to translate my geek-speak if you don't get what I'm saying, lol)
~Steinerd

IceHeart

  • Boss
  • ****
  • Posts: 173
  • a.k.a 'Ice' - Shadow Souls' Top Cat
    • Shadow Souls
Re: ListBySupergroup?
« Reply #4 on: November 26, 2008, 06:29:21 PM »
Somebody hand me the Steiner-to-English dictionary, please??!!!   ;D

cool! .. Looking forward to see those implemented.
Might I also suggest defaulting the character-based flag to the global one upon creation as well?


Catharctic

  • Guest
Re: ListBySupergroup?
« Reply #5 on: November 26, 2008, 07:30:12 PM »
Steiner can be understood by only one person in the known universe.


Unfortunately, that person is . . . Steiner.  :P

Tazhyngarth

  • Elite Boss
  • *****
  • Posts: 2,085
    • Titan Network
Re: ListBySupergroup?
« Reply #6 on: November 26, 2008, 08:27:40 PM »
LOL!

Suzumebachi

  • Minion
  • **
  • Posts: 24
Re: ListBySupergroup?
« Reply #7 on: November 29, 2008, 01:09:53 PM »
Cool, I'm really looking forward to seeing this back. 

I too used this for my SGs website so thanks in advance!   :D

Steiner

  • Elite Boss
  • *****
  • Posts: 1,602
    • Steinerd.com
Re: ListBySupergroup?
« Reply #8 on: November 29, 2008, 08:05:41 PM »
Steiner can be understood by only one person in the known universe.


Unfortunately, that person is . . . Steiner.  :P

Your quote says different, MUAHAHAHA!



ANYWAY, It's done... in the world of code, although NOT LIVE yet. For security reasons I can't release the location of the test script to anyone but the Titan Mods. (Most should already know where to go).

REMINDER: THIS IS NOT LIVE!!! Just what I have done, and waiting for admin approval before it can be launched.
Changes (To XML Feed):
  • Supergroup Name
      [0]If the Tracker scripts found you to be on one.
  • Hidden Experience/Influence & Character
      [0]The new setup here is that you can now have specific characters hide their influe and exp OR refer to the account global settings. ALSO, Setting your character to "hidden" will now HIDE your character from ALL lists, including the xml feeds.
  • Added Supergroup Char Lists
      [0]That's right I said FEEDS on the last one. There is now a SG xml feed. Gotten to be either the id or the name. It is case
    insensitive, however space and character sensitive. Meaning if you have an apostrophe or other characters that are normally invalid in a URL might have issues. ( don't worry, it will be figured out before we release it)
  • Added Level Progress %
      [0]There are two new items in the list for each character;

    lvl_progress which is the percentage of the current level you have progressed.
    lvl_progress_num which is the same number, but left as a decimal for those who want to use the real number for custom scripts. 
  • Vanity Titles
      [0]Also added the Vanity Titles.
  • JSON Compatability
      [0]There will also be JSON usable feeds as well! HURRAY FOR JSON!
[/list]

I'm also setting up a little library of examples on how to use the XML feeds, full example scripts and the JSON feeds (Using jQuery ONLY... any other framework you'll have to figure out yourself, lol). The whole 9 yards.

Gotta wait 'till an admin sees my work before it's put anywhere. Keep ya'll posted.
« Last Edit: November 29, 2008, 11:46:31 PM by Steiner »
~Steinerd

Greysteele

  • Minion
  • **
  • Posts: 31
Re: ListBySupergroup?
« Reply #9 on: December 01, 2008, 03:46:23 AM »
Oh, *snap*.  You are the MAN.  If you need a tester for the SG feed, give me a yell.  I can't wait for this to go live...

Is there any documentation for the XML feedS?  I was able to build my current web mechanism (ASP Classic) by just looking at the XML output, but some may need it spelled out a bit more.  There used to be some decent docs and examples for the old methods.  I'd be happy to contribute some example ASP code to the effort.


SuckerPunch

  • Elite Boss
  • *****
  • Posts: 1,608
    • Titan Network
Re: ListBySupergroup?
« Reply #10 on: December 05, 2008, 02:16:45 AM »
Just a quick FYI - this stuff is live now.

Greysteele

  • Minion
  • **
  • Posts: 31
Re: ListBySupergroup?
« Reply #11 on: December 17, 2008, 10:06:35 PM »
Umm, I assume that the "stuff" you're talking about being live is the new data elements for the XML feed (not sure why we're talking about those in this topic, BTW). 

What about the new XML feed by SuperGroup?  Is that ready yet?  Last I heard Steiner had to take a step back when I brought up same SG names on different servers...


SuckerPunch

  • Elite Boss
  • *****
  • Posts: 1,608
    • Titan Network
Re: ListBySupergroup?
« Reply #12 on: December 17, 2008, 10:43:58 PM »
The Supergroup feeds are live.  If you go to My Account -> My Data feeds, you should see them all there.  You have your choice between XML and JSON as well. 

http://cit.cohtitan.com/manage/myfeeds

Quote
Last I heard Steiner had to take a step back when I brought up same SG names on different servers...

Steiner even took care of that too. There are individual feeds per server, and a consolidated feed per name.

The feeds are also available directly from the supergroup pages, at the top of the table:

http://cit.cohtitan.com/supergroup/5588

IceHeart

  • Boss
  • ****
  • Posts: 173
  • a.k.a 'Ice' - Shadow Souls' Top Cat
    • Shadow Souls
Re: ListBySupergroup?
« Reply #13 on: December 20, 2008, 12:37:21 PM »
Lovely Supergroup feeds, Steiner :)

Suggestion/Request:   

I wonder if you could perhaps add one extra little field to the Sg feed, (and likely to the character as well)..  identifying the character as 'Hero' or 'Villain' .. perhaps <Orientation/>  ?    or something like that.. not really sure how to call it.. maybe just <Type> with a or <Hero> with Yes no Value ..  anyways

Im asking just because we have both Hero and Villain SGs, and currently I maintain separate XSLTs for these.. including an xslt: choose by archetype ...  which is kinda clunky... where the rest of the xslts are pretty much identical... my guess is that you already have that out there and should be rather simple to extract that from the DB as well.. allowing me/us/other users to simplify and use a general XSLT for most cases...

I know I know I'm lazy...  :)


Steiner

  • Elite Boss
  • *****
  • Posts: 1,602
    • Steinerd.com
Re: ListBySupergroup?
« Reply #14 on: December 20, 2008, 04:35:05 PM »
Well. simplest way,
You'll see that every Character has a "game_id" element...

1 = COH
2 = COV
nothing = something went wrong, let a mod know.... :D

Ya know, If you have any nice XML scripts for our members to learn from, I'd be happy to post is on the Script Example page I've been making (A page that lets users have mutiple different way to utilize the XML and JSON feeds) And you will most definitely be fully credited for it.
~Steinerd

IceHeart

  • Boss
  • ****
  • Posts: 173
  • a.k.a 'Ice' - Shadow Souls' Top Cat
    • Shadow Souls
Re: ListBySupergroup?
« Reply #15 on: December 20, 2008, 05:22:38 PM »
Ah excellent.. Thanks Steiner,
eh sorry I think It was a long night .. i totally missed putting 2 and 2 together on that game-id tag, heh.. I should've seen it

I'd be happy to share my XML/XSLT dabblings of course.. maybe by end of weekend I'll have a cleaner one :)


Steiner

  • Elite Boss
  • *****
  • Posts: 1,602
    • Steinerd.com
Re: ListBySupergroup?
« Reply #16 on: December 20, 2008, 07:01:44 PM »
cool!

Looking forward to it!

:D lol on the first part of the reply, it's easy to miss, because at a glance it seems irrelevant to the character being a hero or villain.

If you want you can post it here between to code tags or send it to my email steiner@cohtitan.com.
~Steinerd

Greysteele

  • Minion
  • **
  • Posts: 31
Re: ListBySupergroup?
« Reply #17 on: January 15, 2009, 05:05:20 AM »
I'm in the process of "cleaning up" my Classic ASP code so y'all can post it as an example of pulling the SG feed and displaying it.  My actual code stores it in a local DB in case Titan is down (What? That never happens!!!), so I have to mod it a bit for general use.




Steiner

  • Elite Boss
  • *****
  • Posts: 1,602
    • Steinerd.com
Re: ListBySupergroup?
« Reply #18 on: January 15, 2009, 06:36:36 PM »
Kewl, Looking forward to it... the support script is almost done to post these on.
~Steinerd

Greysteele

  • Minion
  • **
  • Posts: 31
Re: ListBySupergroup?
« Reply #19 on: January 20, 2009, 08:58:18 PM »
Here's the stripped-down version of the Classic ASP code that I used for the StarForce web site (http://greysteele.com/starforce/grouplist.asp).  Our code does quite a bit more (backs up data to local DB, allows sorting by column, displays avatars, links to character detail pages, etc.) but I wanted to provide a simplified version as a code example.

<table ID="Table1">
   <tr>
      <th>Hero</th>
      <th>Level</th>
      <th>Progress</th>
      <th>Origin</th>
      <th>Archtype</th>
      <th>Influence</th>
      <th>Primary Powerset</th>
      <th>Secondary Powerset</th>
      <th>Last Updated</th>
      </tr>
   <%

   'use whatever URL is supplied for your SG in your "My Datafeeds"
   strURL = "http://cit.cohtitan.com/xml/sg/1152"

    '-Get HTML Page
    Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
    objXMLHTTP.Open "GET", strURL, False
    On Error Resume Next
   objXMLHTTP.Send
   OK = True
   If (Err.Number <> 0) then
      OK = False
      end if
      
   if instr(1,objXMLHTTP.ResponseText,"Server Error") > 0 then
      OK = false
      end if
   On Error Goto 0
   strReturn = objXMLHTTP.ResponseText
   Set objXMLHTTP = Nothing

   Set oXMLParser = Server.CreateObject("Microsoft.XMLDOM")
   If (oXMLParser.LoadXML(strReturn)) and (Instr(strReturn, "Error") =0) Then
      Set objLst = oXMLParser.getElementsByTagName("character")
      'StopPoint = objLst.length
      For i = 0 to (objLst.length - 1)
         Response.Write ("<tr>")
         response.Write ("<td align=center>" & oXMLParser.documentElement.getElementsByTagName("name").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & FormatNumber(oXMLParser.documentElement.getElementsByTagName("security_level").Item(i).Text,0,false,false,true) & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & oXMLParser.documentElement.getElementsByTagName("lvl_progress_num").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & oXMLParser.documentElement.getElementsByTagName("origin_name").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & oXMLParser.documentElement.getElementsByTagName("archetype_name").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & FormatNumber(oXMLParser.documentElement.getElementsByTagName("influence").Item(i).Text,0,false,false,true) & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & oXMLParser.documentElement.getElementsByTagName("primary_name").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & oXMLParser.documentElement.getElementsByTagName("secondary_name").Item(i).Text & "</td>")
         Response.Write ("<td valign=""middle"" align=""center"">" & FormatDateTime(oXMLParser.documentElement.getElementsByTagName("last_update").Item(i).Text,2) & "</td>")
         response.Write ("</tr>")
         Next
      end if

%>
</table>


Hope that helps any who are looking to take advantage of this new data feed.