Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Archive > Add EPGP Data To Your Site
Mottie (SuperAdmin) 2/17/2010 12:26 AM EST : Add EPGP Data To Your Site
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Add EPGP Data To Your Site


This post is outdated! - please go to this thread.


GuildPortal admin site link to the original post

Using this method to web scrape the data from the EPGPWeb site may be against their ToS, so I can't guarantee it will work forever. Some time in the future they may decide to take measures to prevent this method from working, so follow these instructions knowing these facts.

These instructions are not going to be easy to follow, so I'm going to try my best to make step-by-step instructions. If you get stuck at any point or find the instructions don't follow what you are seeing, please post the question here so I can help and maybe improve upon these instructions.

The result will be two pages: one contains the EPGP data and the second will be the loot (if available), both derived from the EPGPWeb page.

EPGP Data
 EPGP Loot
   

Instructions
  1. You are going to need to set up a php web site. So far I've had good luck with 000space.com (it's free) for hosting the server status scripts. If you already have a web hosting site that supports php then you can skip this step.

    • Fill out the signup form:

      • Add subdomain.
      • Enter a password.
      • Enter your email address (don't use yahoo, ymail, msn, mynet.com, live, or hotmail - it will kick it back, gmail is okay).
      • Site Category: Hobby.
      • Site Language: choose English/Non-english.
      • Enter the security code seen the line above.
      • Click [ Register ].

    • Now click [ Click Me to Continue ].
    • Fill out the image verification form (Captcha), click [ Register ].
    • Now check your e-mail to continue registration, click the link there to continue.
    • Fill out the image verification form again (Captcha), click [ Register ].
    • Now save the information from the "Free Hosting Order Confirmation" - you can click the flashing text at the bottom to open up a PDF with the same information or you can find it in the confirmation e-mail. The most important is your user name and password.

  2. Log into your hosting site's control panel (VistaPanel). For 000space, it's http://cpanel.000space.com.

  3. Get the needed files here (right click and choose Save As; no need to extract the files from the zip).

  4. Upload the files to your host:

    • Go to the File Manager, click the Online File Manager link (under File Management).
    • Click on the "htdocs" directory link to go into it. This is the main directory which will contain all your files.
    • Add an epgp directory:
      • Click on [ New dir ] to add a new directory
      • Type in "epgp" (without the quotes) into the first "New directory name:" line
      • Click the large green check mark.
      • Click the large blue left arrow (you should see a message "Directory epgp was successfully created." below it).
    • Click on the "epgp" sub-directory to enter it.
    • Click the [ Upload ] button (not the Java or Flash buttons).
    • Make sure the "Upload to directory:" box shows "/htdocs/epgp", if not click on the button on the right and [ Choose ] the epgp directory.
    • On the right side, under "Archives (zip, tar, tgz, gz)" click the [ Browse... ] button and locate your "epgp.zip" file, then click [ Open ].
    • Now click the large green check mark to complete the upload.
    • You should now see a message saying checking files "OK" and four files were copied to your "/htdocs/epgp" directory.
    • Click the large blue left arrow (next to the green check mark) to return to your main directory.

  5. Set File Permissions:

    • Check the boxes to the left of "epgp-loot.php" ,"epgp.htm" and "epgp.php".
    • Click the [ Chmod ] button at the top right.
    • In the "Chmod value:" box type in "755" for both the epgp-loot.php and epgp.php.
    • Enter "777" for epgp.htm.
    • Check the large green check mark to complete.
    • Now check the large blue left arrow to return to the main directory.

  6. Point the pages to your EPGP site:

    • Find the "epgp-loot.php" file and click "Edit" on the far right side.
    • Scroll down in the file and find the two variables "$myepgp" and "$refresh". Set the $myepgp variable to point to your epgpweb.com page (replace the URL in orange). Then you can adjust the page refresh time (in red). It is set as a default to refresh every 360 minutes ( I wouldn't make it every 10 minutes because I doubt you'll need the update that ofter, but you adjust it to whatever you want, depending on how often you raid ). But, I've added the blue ( 0 * ) in the code below to show you that you need to set the $refresh variable to zero, but only in one of the files and only the first time you run the script. The reason is because when you first load at the page, it needs to retrieve the data from the epgpweb site, otherwise you'll have to wait 6 hours for it to update. After you have completed step 7, go back and remove the ( 0 * )!!

       $myepgp = 'http://www.epgpweb.com/guild/eu/Sunstrider/The Crazy EightyEights/';
       $refresh = 0 * 60 * 6; // 360 minutes (6 hours)

    • Click the blue disk at the top to save the changes - make sure the status in the upper right shows that the file was saved.
    • Click on the large blue left arrow to return to the main directory.
    • Repeat the above steps for your "epgp.php" file.

  7. Now go back to your confirmation e-mail or PDF and find your Domain name. For me it is "http://motty.000space.com". Now just add a "epgp/epgp.php" or "epgp/epgp-loot.php" to the end and load that page. These are my test pages:
    http://motty.000space.com/epgp/epgp.php and http://motty.000space.com/epgp/epgp-loot.php
  8. You can go back and modify the "epgp.css" file to better match your site style now or later. Just edit the file from your computer (in a non-rich text editor like notepad) and re-upload it (make sure it overwrites the file) or just edit it online like you did when you changed the site URL.

  9. You are basically done with this part, so you can log out of your Hosting site.

  10. To add these pages to your GuildPortal site, add an iframe pointing to these pages:

    EPGP DATA
    <iframe width="450" height="450" src="http://motty.000space.com/epgp/epgp.php" scrolling="auto" frameborder="0" align="top" allowtransparency="true"></iframe>

    EPGP LOOT
    <iframe width="500" height="450" src="http://motty.000space.com/epgp/epgp-loot.php" scrolling="auto" frameborder="0" align="top" allowtransparency="true"></iframe>

    Notice that the width is a little larger than some side columns, so you may need to add these to the center or a wider than normal side column. Adjust the frame height (in red) as desired.


Alternate Method (using FTP) - if you don't use the Hosting site's file manager.
  1. Follow steps 1-3 above; for step 4 you'll need your own FTP software.
  2. But first, you'll need to unzip the four files from the zip file you downloaded, and put them on your desktop. If you don't have an unzip program, try WinZip or MacZip.
  3. Now you'll have to edit the files as described in step 6 of the instructions above:

    • Change the epgp site and refresh time variables (see step 6 above about setting the $refresh to zero, but only the first time you run the code):

      $myepgp = 'http://www.epgpweb.com/guild/eu/Sunstrider/The Crazy EightyEights/';
      $refresh = 60 * 6; // 360 minutes (6 hours)

  4. Go to http://filezilla-project.org/ and download FireZilla.
  5. Install the program, then run it.
  6. Across the top, fill in the following:

    • Host: ftp.000space.com
    • Username: space_####### ( your unique user ID should be in place of the #'s )
    • Password: (enter your password)
    • Port: (leave blank)

      *Note: ftp.000space.com applies to the 000space hosting site only, you should find the "ftp" hostname for your hosting service if it differs.

  7. Click [ Quickconnet ]
  8. On the left column you should see "Local site". Navigate your way to your desktop.
  9. Now, in the right column you will see "remote site" in the top panel. One more panel down you'll see "htdocs" and "DO NOT UPLOAD...". Double Click on "htdocs" and go to that directory.
  10. You'll see a couple of files there ".override", "files for ....." and "index.htm". Don't touch these files.
  11. Click click in this area and pick "Create directory"
  12. Type in "epgp" in the box so you should see the full directory of "/htdocs/epgp", click [ OK ].
  13. Double click on the "epgp" directory to enter it. When you have you should see "<Empty directory listing>".
  14. Now drag and drop the four "epgp" files from your desktop to the right side directory panel.
  15. At the bottom of the FireZilla window you should see it transferring these files.
  16. Now it's time to set the file permissions, but you'll have to do it one file at a time.

    • Right click and choose "File Permissions..." for "epgp-loot.php" and "epgp.php" and set the "Numeric value:" to 755.
    • Right click and choose "File Permissions..." for "epgp.htm" and set the Numeric value to 777.

  17. Continue on with steps 7-10 in the instructions above to test and add the pages.
Edited (2/17/2010): Added an alternative method to upload files to your host.
Edited (2/20/2010): Fixed various problems, there is a new epgp.zip.
Edited (2/20/2010): Added instructions to include making a sub-directory named "epgp".
Edited (3/1/2010): The php code (in the zip file) was updated to fix a problem that occurs when you don't have a loot table. When you loaded the "epgp-loot.php" page, it used to show the whole page including the ads - thanks for the heads up JChaps.

This topic was moved from forum Instructions to forum Archive on 8/27/2010 11:11 AM by Mottie.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 2/20/2010 11:58 AM EST : RE: Add EPGP Data To Your Site
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Updated the code with the following changes:
  • Increased refresh time to 6 hours ( 6 * 60 = 360 minutes = 6 hours ).
  • Fixed the problem with race, class and unknown icons not showing up.
  • Fixed character name link to epgpweb website.
  • Removed the time ( 24 hour time with AM/PM on the end is silly, and I don't think you need a time ) from the loot table. This made the table a little narrower. 
  • Fixed Wowhead links to include the item icon and link. There was a problem with epgpweb item history, so I removed the item history link. If you need to see this, go to the epgpweb page with all the data.
  • Adjusted the frame widths in the original post
  • A new epgp.zip file was uploaded with these changes
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 3/1/2010 5:38 PM EST : RE: Add EPGP Data To Your Site
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

  • Updated the zip file to fix a problem with the "epgp-loot.php" file. If your epgpweb site did not include a loot table, the entire saved page would display, ads and all.
  • I also added some comments about setting the $refresh variable to 0 so it would load the data properly the first time you ran the script.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Midori (Norgannon) (Applicant) 3/21/2010 11:01 PM EST : RE: Add EPGP Data To Your Site
Midori (Norgannon)
Posts: 1252

0
Like

0
Dislike

Hey Mottie, I'm trying to slim down the EPGP box so that it fits nicely in a side column while still having the important stuff visible.  I've hidden the race/class images and the EP/GP differential numbers (the ones in red and green), so the actual table is now nicely sized, but I can't figure out how to adjust the table headings to match.  The "EP", "GP", and "PR" headings are all set to colspan="2", and I have no idea how to change that, because I am an utter noob (but an utter noob who is intensely grateful for your awesome site and tutorials!)  Any tips?
TopBottom

Mottie (SuperAdmin) 3/21/2010 11:50 PM EST : RE: Add EPGP Data To Your Site
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Midori!

I don't think there is a CSS method to change the colspan, well I found one, but it doesn't work across all browsers. So I think an easier solution would be to just make those two columns have zero width. So try adding this CSS:
.diff-number-data {
 display: block;
 width: 0;
 overflow: hidden;
 padding: 0 !important;
}

Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Midori (Norgannon) (Applicant) 3/30/2010 4:07 PM EST : RE: Add EPGP Data To Your Site
Midori (Norgannon)
Posts: 1252

0
Like

0
Dislike

Hey Mottie, just wanted to let you know that I had some trouble with that solution - IE apparently reads the "width" property as "min-width" instead, and doesn't recognize max-width either.  *rolls eyes*  I played around with various things (like javascript setAttribute, which I was SO SURE I was going to be able to get working... grrr), but IE pretty much hated them all.  I ended up using font-size: 0%, which still displays the numbers in IE but at a teensy size (like 1-2 pixels).  It annoys the hell out of me because I know they're there (it just FEELS messy!), but when they're set to the background color they're at least not visible

Also, I would like to stab IE now kthxbai.
TopBottom

Mottie (SuperAdmin) 3/30/2010 5:28 PM EST : RE: Add EPGP Data To Your Site
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Midori!

Darn that IE!!... Hmmm, how about trying this?
.diff-number-data {
 text-indent: -9999em;
}
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Midori (Norgannon) (Applicant) 4/1/2010 2:35 PM EST : RE: Add EPGP Data To Your Site
Midori (Norgannon)
Posts: 1252

0
Like

0
Dislike

That works, and without the annoying invisible pixels... it's still obnoxious that we can't just get rid of the columns entirely, but it looks like we have a workable solution!  Yay!  Thanks Mottie
TopBottom

Jesamine125 (Applicant) 8/26/2010 6:05 PM EST : RE: Add EPGP Data To Your Site
Jesamine125
Posts: 45

0
Like

0
Dislike

Hey Mottie,

Is there a problem now with getting the data from the epgp site? Up until about 2 weeks ago it seemed to be working fine, but now all I get is:

No Data Available
Last cached: August 26 2010 10:18:56

Here's a link: http://waywardenforcers.guildportal.com/Guild.aspx?GuildID=119171&TabID=3046444

Thanks!
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%