Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Raids > Add Suicide Kings Data to your site
Mottie (SuperAdmin) 10/7/2010 9:16 PM EST : Add Suicide Kings Data to your site
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Add Suicide Kings Data to your site

GuildPortal admin site link to the original post

The Suicide Kings addon for World of Warcraft (WoW) outputs a lua file which can be parsed and displayed by this script. Four columns (Weapon/Trinket, Accessories, Armor & Tier) of names are displayed in rank order.



Setup
  • Overall Information
    To make this work for your guild sitem you will have to download the necessary files, modify then upload them to your site. Once everything is in place, all you will need to do is upload the latest "SuicideKings.lua" file from your "World of Warcraft/WTF/Account/{account name}/SavedVariables" folder.

  • Download the Files
    Download and extract the necessary files from the SuicideKings.zip file.
    If you don't have a way to extract zipped files, then grab my demo files: SuicideKings.htm, suicideKings.min.js, sk-dark.css and sk-light.css.


  • Step-by-step instructions:

    1. Download the SuicideKings.zip file (links above).
    2. Extract the folder contained within to your desktop.
    3. Copy your "SuicideKings.lua" file from your "World of Warcraft/WTF/Account/{account name}/SavedVariables" folder to your SuicideKings folder on your desktop along with the other files you just downloaded - be sure to replace the lua file that was inside the zip file.
    4. Open the "SuicideKing.htm" file in your browser to see the results.
    5. Now open the SuicideKing.htm file in a non-rich text editor (e.g. notepad). You will find the following script:
    6. var fix = [];
      fix['Æpic'] = 'mage';
      fix['Skeetles'] = 'druid';

      $('#sKings').suicideKings({
       skFile      : "SuicideKings.lua",
       ranksToShow : 60,
       fixClass    : fix
      });
    7. If you see any character names in grey, this means the lua file doesn't know what class they are. So you can permanently add a reference using the fix variable. Simply follow this format:
      fix['character name'] = 'class';
      You can replace the two examples.

    8. If you need to change the name of the "SuicideKings.lua" file, then replace the name in orange.

    9. To change how many rows (ranks) to display, adjust the ranksToShow value in red.

    10. Now you can change the style of the list. By default it is set to "sk-dark.css" at the top of the "SuicideKings.htm" file. If you want to change it to the light style, change the file to "sk-light.css" or load either one of these files into your text editor and modify the colors yourself:
      <link rel="stylesheet" href="sk-dark.css" type="text/css" />
    11. Last thing to do is to upload all of these files to your GuildPortal file area.

      • Go to Control Panel > General Settings & Tools > File Manager.
      • Click [ Upload File(s) ].
      • Click [ Select ] to open the file selector and pick each file: SuicideKings.htm, SuicideKings.lua, suicideKings.min.js & sk-####.css (or your custom css file).
      • Click [ Add ] to add more select buttons.
      • When done, click [ Upload ].
      • Once the files have uploaded, find and click on the "SuicideKings.htm" file to open it in the browser to make sure it works.
      • Keep the "SuicideKings.htm" file open in your browser, for now.

    12. Now add a Free Form Text/HTML type widget to your site (Control Panel > Pages & Content > {pick a page} > Add Widget tab).

      • Title: Suicide Kings (or whatever)
      • Type of Widget: Free Form Text/HTML
      • Location on Page: Center of Page (preferred location)

    13. Click "Edit" inside the newly added widget.

    14. Switch the editor to <>HTML mode

    15. Copy (Ctrl-C) the following HTML and paste (Ctrl-V) it into the widget editor:

      <iframe width="570" height="500" src="http://www.axiomfiles.com/Files/######/SuicideKings.htm" scrolling="auto" frameborder="0" align="top" allowtransparency="true"></iframe>

    16. Find the url of your "SuicideKings.htm" file and replace the url of the iframe (in orange)

    17. Adjust the height & width of the iframe (in red) to match your site (you can use percentages).

    18. Once done, click [ Save ].

    19. Reload your page and check your outcome. Edit and adjust the iframe as desired.
Updating
  1. Open up your GP File Manager (Control Panel > General Settings & Tools > File Manager).
  2. Click the [Upload File(s)] button.
  3. Click [Select].
  4. Now find the latest copy of your "SuicideKings.lua" in your WoW SavedVariables folder (World of Warcraft/WTF/Account/{account name}/SavedVariables), then click [Open]
  5. Click [Upload].
  6. Reload the page on your site with your Suicide Kings data.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%