Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Voodoo Tech and Scripter's Den of Scriptniquity > Add EPGP Data To Your Site - Updated!
Mottie (MVP) 8/27/2010 10:52 AM EST : Add EPGP Data To Your Site - Updated!
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Add EPGP Data To Your Site - Updated!

The original EPGP post used a method to web scrape data from the EPGPWeb website; As I said, it's not an ideal method, so I made this updated method which allows you to upload your epgp.lua file to your GuildPortal file area. The script does all the work of processing the epgp.lua file, but since the GP file storage domain is different from GuildPortal.com, you'll have to add it to your site using either the Embedded page widget or adding iframe code into a Free Form Text/HTML widget.

Thanks to Euvie of Fallout for providing me a lua file to use.

Setup

Overall Information

To start, you'll have to download the compressed files for the correct epgp addon version (v5.5.19 or v5.5.22). Modify (see below), then upload them to your site. Once everything is in place, all you'll need to do is upload your latest "epgp.lua" file from your "World of Warcraft/WTF/Account/{account name}/SavedVariables" folder.

Instructions:
  • Download the files
    Download & extract the necessary files from the zip file.
    If you don't have a way to do this, then grab my demo files (right click and save)

    Addon version 5.5.19: epgp-standings.htm, epgp-loot.htm, epgp.min.js, epgp-dark.css & epgp-light.css.
    Addon version 5.5.22: epgp1-2-standing.htm, epgp1-2-loot.htm & epgp1-2.min.js (no change in the CSS files).

  • Change the settings
    Settings for epgp standings table and epgp loot table are slightly different. The demo has two separate files for each table, but you could have both on the same page, if desired.

    EPGP Standings
    Open the "epgp-standings.htm" file in a non-rich text editor (e.g. notepad). The script has all of the default settings, so you could leave out a setting that you don't change.

    1. EPGP file (epgpfile): Most likely you won't need to change this option as the filename doesn't change, but it is included in case you are using my copy of "epgp.min.js" and you have your "epgp.lua" in your files.
    2. Guild (guild): Change this option to match your Guild's name. Include capital letters, special characters and spaces exactly as seen in the game.
    3. History (startEpgpHistory & startLootHistory): These settings are the initial settings of the EPGP and Loot history sliders found in the upper right corner of the page. The sliders are set to only go back 30 days. Sadly because of the size of the lua file, changing the settings is a little slow at times. So, if you decide to remove the sliders, just delete the HTML between the comments <!-- Start slider HTML --> and <!-- End slider HTML -->, then set these start history variables to lock amount of time to show.
    4. EPGP & Decay (baseGP, minEP & decay): These options were removed in the latest epgp addon, so these need to be set when using epgp1-2 files.
    5. Extras (extras): The lua contains the Decay, BaseGP, MinEP, but not the Extras. I couldn't figure out any way to calculate this value, so I just added it as an option you can set - I've never seen it at a value other than "100%" though.
    6. Loot Icon (lootIcon): The standing table include a "Last Item" column, but it also has an icon that you can hover over to see a more through loot list with time set by the loot slider.
    7. Sort (sort): Change the starting sort by modifying this option. The first number is the column to sort (start with zero on the left and count towards the right), so the "Name" column is 0, EP is 1, GP is 2, PR is 3 and Last Item is 4. The second number is the sort direction, 0 = ascending (low to high, a-z) and 1 = descending (high to low, z-a).
    8. Wowhead (wowhead): change the subdomain of wowhead to change the tooltip language. Default is 'www' for English. Change it to "de" for German, "es" for Spanish, "fr" for French or "ru" for Russian.

    Loot Standings
    Open the "epgp-loot.htm" file in a non-rich text editor. The script has all of the default settings, so you could leave out a setting that you don't change.

    1. EPGP file (epgpfile): Most likely you won't need to change this option as the filename doesn't change, but it is included in case you are using my copy of "epgp.min.js" and you have your "epgp.lua" in your files.
    2. Guild (guild): Change this option to match your Guild's name. Include capital letters, special characters and spaces exactly as seen in the game.
    3. History (startLootHistory): This setting is the initial setting of the Loot history.
    4. Loot Only (lootOnly): Set this to true to make the script output a loot table (versus the standings table).
    5. Raid Time (raidTime): Set to the approximate amount of time you raid. The script uses this number to ensure that loot from the night before is included (so it doesn't cut off at midnight).
    6. Fix Class (fixClass): The epgp.lua may not always have the character's class, so you can manually add the names. I've included an example (since there is only one undefined character class in the demo lua file) in the epgp-loot.htm file that fixes a fake name "Guild Bank". Otherwise, it will default to "unknown".
    7. Wowhead (wowhead): change the subdomain of wowhead to change the tooltip language. Default is 'www' for English. Change it to "de" for German, "es" for Spanish, "fr" for French or "ru" for Russian.

  • Page Style: Choose from either of the two CSS files I've provided in the zip. The "epgp-dark.css" or "epgp-light.css". Or, load either of these files into a text editor and modify the colors to match your site. I tried to comment all of the CSS so hopefully it isn't too confusing. The only images in the CSS are for the table sort arrows. By default, both css files use the white arrows, but if you want to use the black arrows for a lighter header background, you can get them here: sort ascending & descending. Once you have your css file selected, change the link href (in orange) in the "epgp-standings.htm" or "epgp-loot.htm" file (near the top of the page):
    <!--Choose from epgp-dark.css, epgp-light.css or make your own -->
    <link rel="stylesheet" href="http://www.axiomfiles.com/Files/258012/epgp-dark.css" type="text/css" />
  • Uploading
    Upload your selected css file, epgp-standings.htm, epgp-loot.htm, epgp.min.js and epgp.lua files through your GuildPortal File Manager (Control Panel > General Settings & Tools > File Manager). Now get and save the URL to the epgp-standings.htm and/or epgp-loot.htm file, it'll look something like this: http://www.axiomfiles.com/Files/######/epgp-standings.htm. It might even be a good idea to open the page to make sure it is all working properly.
  • Setup your site
    To make this page display on your site, you're going to have to add it to an iframe. You can either use an "Embedded page" type widget or a "Free Form Text/HTML" type widget (Control Panel > Pages & Content > Current Pages: {Pick a page} > Add Widget tab). Add the widget to the center of the page.

    1. Embedded Page:
      When you click edit inside the widget a new window will open and ask for the page URL (which you should have saved) and the height of the frame. Choose something like 700 (pixels) for the standings table and 580 (pixels) for the loot table, or whatever height best fits your data without needing to scroll the frame.

    2. Free Form Text/HTML:
      If you decided to use a free form widget to add the following iframe code, make sure the editor is in HTML mode (example below for the standings table):

      <iframe width="700" height="800" src="http://www.axiomfiles.com/Files/######/epgp-standings.htm" scrolling="auto" frameborder="0" align="top" allowtransparency="true"></iframe>

      Adjust the width and height (in red) as needed.
      Change the file url in orange to point to your newly uploaded epgp-standings.htm file.
Updating
This is really the easiest part  shocked
  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 "epgp.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 epgp data.
Edit (12/14/2010): Updated epgp files to work with the latest epgp addon version 5.5.22.
TopBottom

Euvie (New Admin) 8/27/2010 2:25 PM EST : RE: Add EPGP Data To Your Site - Updated!

Euvie
Posts: 1171
Zomgawsh Poster

It was a pleasure, Mottie.

For anyone who wants to see how it looks:  Fallout - Thunderhorn

Scroll down to the bottom of the homepage. 

ETA:  Mine is a little different, since I limited the info to loot drops, recipient and GP charged.  For the rest of the info, I have EPGPWeb embedded.  Using this code allowed me to show recent loot without having to use the calendar, which we don't utilize.
TopBottom

Midori (Norgannon) (New Admin) 8/28/2010 2:18 AM EST : RE: Add EPGP Data To Your Site - Updated!
Midori (Norgannon)
Posts: 1252
Zomgawsh Poster

YAY! Thanks Mottie, I'm super-excited to have a functioning EPGP box again. I'm having an issue though - I'm getting NaN in my GP and PR columns (check it out here). Any idea what the problem is?
TopBottom

Keilana55 (Guild Admin) 8/28/2010 3:52 AM EST : RE: Add EPGP Data To Your Site - Updated!
Keilana55
Posts: 4537
Zomgawsh Poster

Please tell me what all of this stuff means?  I would love to add some new stuff to the site to make it look different, but this is beyond me, so far, he he.

TopBottom

Mottie (MVP) 8/28/2010 9:35 AM EST : RE: Add EPGP Data To Your Site - Updated!
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Midori!

Ok I found the problem, without seeing other copies of the epgp.lua I didn't know that the BaseGP, MinEP and Decay values were saved differently. So, it should be fixed now.

I've updated the epgp.zip and epgp.min.js files to fix a problem. So since you already have it set up on your site, just download (right click and select Save As) the epgp.min.js file link above and replace it in your GuildPortal file area.

@Keilana55: This script is specifically for a World of Warcraft addon called EPGP which is similar to DKP in that it is a loot system. So this script shows the data from the addon and the latest loot which is included.
TopBottom

Mottie (MVP) 8/29/2010 12:30 AM EST : RE: Add EPGP Data To Your Site - Updated!
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Midori!

I was just checking to make sure you had the script working and noticed that the loot icon was missing. I changed the epgp-loot.htm to comment out the "lootIcon" variable, and replace it with the full loot icon image URL.

So, to get the loot icon to work for you, the easiest thing to do would be to comment out (add "//" in front, in red below) the lootIcon line.
$('#epgp').epgp({
 epgpfile         : 'epgp.lua',   // epgp.lua file name
 guild            : 'The Clique', // Guild name (include captial letters and any spaces in the name)
 startEpgpHistory : 7,            // EPGP Standings History - initial number of days to show prior to snapshot
 startLootHistory : 7,            // Loot History - initial number of days to show prior to snapshot
 extras           : '100%',       // Extras - set here because it's not in the lua
 
// lootIcon : 'icon-plus.gif',   // Icon to hover over to see a list of recent loot, styled in the css
 sort             : [3,1]         // sort table by 3rd column (PR column, 0 indexed) in descending order (1).
});

												
TopBottom

Peter/Nihilism (New Admin) 9/3/2010 11:45 AM EST : RE: Add EPGP Data To Your Site - Updated!
Peter/Nihilism
Posts: 71
Posts With Wolves

Worked perfectly (after I remembered to allow axiomfiles in my Firefox NoScript addon).  Results here.  Thanks a million!
TopBottom

KonstantinB (New Admin) 10/1/2010 12:38 PM EST : RE: Add EPGP Data To Your Site - Updated!
KonstantinB
Posts: 176
Posts With Wolves

Hello,
Thx for the new method of posting EPGP on our websites, however I have a problem for some time now: HERE

Our EPGP loot - is fine, but EPGP standings is not showing correctly. Please can u help me?

Thanks,
TopBottom

Mottie (MVP) 10/1/2010 2:30 PM EST : RE: Add EPGP Data To Your Site - Updated!
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi KonstantinB!

I can't see the EPGP page you linked above because the access level isn't set to public. If you want to just send me a link to your epgp-standings.htm page, I can look at it there.
TopBottom

KonstantinB (New Admin) 10/6/2010 1:04 AM EST : RE: Add EPGP Data To Your Site - Updated!
KonstantinB
Posts: 176
Posts With Wolves

Hey,
I fixed it Mottie, Thanks a lot anyway.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%