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
Mottie (MVP) 2/17/2010 12:21 AM EST : Add EPGP Data To Your Site
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Add EPGP Data To Your Site


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


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.
TopBottom

Mottie (MVP) 2/20/2010 11:59 AM EST : RE: Add EPGP Data To Your Site
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

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
TopBottom

Sindaryn02 (Guild Admin) 2/20/2010 1:53 PM EST : RE: Add EPGP Data To Your Site

Sindaryn02
Posts: 9
Getting Started!

okay i finally got onto 000space.com and i have followed all your directions but when i try to pull up http://lastcall02.000space.com/epgp/epgp.php and http://lastcall02.000space.com/epgp/epgp-loot.php they are not working

what am i doing wrong?
TopBottom

Mottie (MVP) 2/20/2010 2:40 PM EST : RE: Add EPGP Data To Your Site
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Sindaryn02 said:
okay i finally got onto 000space.com and i have followed all your directions but when i try to pull up http://lastcall02.000space.com/epgp/epgp.php and http://lastcall02.000space.com/epgp/epgp-loot.php they are not working

what am i doing wrong?
Hi Sindaryn02!

Hmmm, well two things.
  1. Did you set up your site properly? If I try to access your index page (http://lastcall02.000space.com/index.htm), it doesn't work. I think maybe your domain name "lastcall02" may be wrong? When it is set up properly, you'll get a page with this message at the very top

    Congratulations! Your free hosting account has been activated.
    Replace this index.html file with your website using FTP or the file manager.

  2. My instructions need to be fixed I think, I didn't add in the instructions to make a subdirectory called "epgp" so your page addresses should be as follows:

    http://lastcall02.000space.com/epgp.php
    http://lastcall02.000space.com/epgp-loot.php


TopBottom

Sindaryn02 (Guild Admin) 2/20/2010 2:50 PM EST : RE: Add EPGP Data To Your Site

Sindaryn02
Posts: 9
Getting Started!


lol... i am a noob... i forgot to set up a sub domain name

thank you so much
TopBottom

JChaps (Guild Admin) 2/25/2010 3:41 PM EST : RE: Add EPGP Data To Your Site

JChaps
Posts: 4
Getting Started!

Thanks for this guide.

I'm running into one small problem that I was hoping you might be able to help with.  The javascript that you have called from http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js   is screwing with some of the other scripting on my Joomla site.  I was wondering if it would be possible to include just the functions you need locally rather than including the full library.

You can find my site at http://www.legendaryraiders.com

What I've done is take the epgp-loot.php and integrate it into a joomla module instead of having a separate page and running it in an iframe.  (I hope it's ok that I've reused some of your code.  If this is not ok, please let me know and I will remove it.)

If I include the script library it screws up the article editor and a number of other features on my site.

Please let me know if you can help.

TopBottom

Mottie (MVP) 2/25/2010 5:11 PM EST : RE: Add EPGP Data To Your Site
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi JChaps!

Of course it is okay to reuse, modify or do whatever to the code I have provided. Oh btw, I've updated the code since you've used it (I think) - the newer code removes the raid time (using 24 hour time and adding AM/PM on the end is kind of silly).

I believe you are having a conflict error with mootools. All you need to do is add one line and modify one line in both the epgp.php and epgp-loot.php
  • Directly under the jquery line, add the following line in blue.

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript">jQuery.noConflict();</script>

  • In the script at the bottom, replace this line:

    $(document).ready(function(){

    with this:

    jQuery(function($){
And hopefully that will resolve your problems.
TopBottom

emjhpq (Guild Admin) 2/26/2010 6:12 AM EST : RE: Add EPGP Data To Your Site

emjhpq
Posts: 2
Getting Started!

Hi Mottie,

I've run into an issue with the current version of this script. For the life of me I cannot seem to get it to work. I've even tried using a space account and following your directions exactly. I've also used the default epgpweb address included to make sure it wasn't just an error there.

http://emjh.000space.com/epgp/epgp.php

This is using the latest epgp.zip you have hosted and default values for everything. All file permissions are proper.

TopBottom

Mottie (MVP) 2/26/2010 1:06 PM EST : RE: Add EPGP Data To Your Site
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

emjhpq said:
Hi Mottie,

I've run into an issue with the current version of this script. For the life of me I cannot seem to get it to work. I've even tried using a space account and following your directions exactly. I've also used the default epgpweb address included to make sure it wasn't just an error there.

http://emjh.000space.com/epgp/epgp.php

This is using the latest epgp.zip you have hosted and default values for everything. All file permissions are proper.
I just went to the page and it worked for me... I even checked the epgp-loot page and it worked as well... what problem were you having?



TopBottom

emjhpq (Guild Admin) 2/26/2010 5:36 PM EST : RE: Add EPGP Data To Your Site

emjhpq
Posts: 2
Getting Started!

Mottie said:
emjhpq said:
Hi Mottie,

I've run into an issue with the current version of this script. For the life of me I cannot seem to get it to work. I've even tried using a space account and following your directions exactly. I've also used the default epgpweb address included to make sure it wasn't just an error there.

http://emjh.000space.com/epgp/epgp.php

This is using the latest epgp.zip you have hosted and default values for everything. All file permissions are proper.
I just went to the page and it worked for me... I even checked the epgp-loot page and it worked as well... what problem were you having?





Odd. It works fine now. Last night it was just blank. I'll let you know if it breaks again!

TopBottom

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