EVGA

How-to: Dynamic Sig using GPU Tracker V2, EOC stats, EOC Graph

Page: 12345.. > >> Showing page 1 of 7
Author
unhappyelf
iCX Member
  • Total Posts : 320
  • Reward points : 0
  • Joined: 2008/09/24 19:55:01
  • Location: Houston, Tx
  • Status: offline
  • Ribbons : 1
2011/01/20 07:33:28 (permalink)
 
Change Log:
6/7/11 - Link for techmasterjoe's Windows 7 Desktop Gadget added
4/8/11 - Created EOC Graph in Section 5
3/27/11 - Created a Pre-made EOC Stats signature in Section 4
2/14/11 - Fixed error in db refreshing(would not display new values until second refresh)
2/12/11 - Reorganized How-To
2/6/11 - Added EOC stats section
 
Section 1 - Jedi GPU Tracker Signature
Section 2 - adding EOC Stats to the Jedi Tracker Signature
Section 3 - Just EOC stats Signature
Section 4 - Pre-made EOC Signature(On Page 5)
Section 5 - Pre-made EOC graph (On Page 6)
 
 


Section 1
 
 
Before you start you must have:
1. A png file for use as your background
2. A server with Apache and PHP or a IIS server with PHP
3. Either Access from FTP or Over your network to the server.
4. Be using Jedi's Tracker (available here: http://forums.evga.com/tm.aspx?m=219556)
 
If your using HFM.net there is a separate how-to here:
http://forums.evga.com/tm.aspx?m=809019

You need 2 files to do this:
1. Intial PNG or JPEG picture to use as the background
2. A PHP file disguised as a Png file to process the xml and take the initial picture and input the data.

My signature below is a example of what I'm talking about. The info is coming from jedi95's folding tracker. In my case I upload the xml file using his tracker to my FTP server. This xml file is processed with this code
function simpleXMLToArray($xml,                                     
                    $flattenValues=true,
                    $flattenAttributes = true,
                    $flattenChildren=true,
                    $valueKey='@value',
                    $attributesKey='@attributes',
                    $childrenKey='@children'){

        $return = array();
        if(!($xml instanceof SimpleXMLElement)){return $return;}
        $name = $xml->getName();
        $_value = trim((string)$xml);
        if(strlen($_value)==0){$_value = null;};

        if($_value!==null){
            if(!$flattenValues){$return[$valueKey] = $_value;}
            else{$return = $_value;}
        }

        $children = array();
        $first = true;
        foreach($xml->children() as $elementName => $child){
            $value = simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey);
            if(isset($children[$elementName])){
                if($first){
                    $temp = $children[$elementName];
                    unset($children[$elementName]);
                    $children[$elementName][] = $temp;
                    $first=false;
                }
                $children[$elementName][] = $value;
            }
            else{
                $children[$elementName] = $value;
            }
        }
        if(count($children)>0){
            if(!$flattenChildren){$return[$childrenKey] = $children;}
            else{$return = array_merge($return,$children);}
        }

        $attributes = array();
        foreach($xml->attributes() as $name=>$value){
            $attributes[$name] = trim($value);
        }
        if(count($attributes)>0){
            if(!$flattenAttributes){$return[$attributesKey] = $attributes;}
            else{$return = array_merge($return, $attributes);}
        }
      
        return $return;
    }

 
This provides you with a easy way to access the info in PHP. The initial picture looks like this
 

 
The code below is the complete file that is used to create the rest of info on the picture.
<?php                                     

$results = simpleXMLToArray(simplexml_load_file("Status.xml"));

$oldppd=0;
$k=0;
$onoff=0;
for($i=0 ;$i<=9;$i++){
    $newppd = $results['clients']['client'][$i]['ppd'];
    if($newppd > $oldppd){
        $oldppd=$newppd;
        $k=$i;
    }
}
if($k == 0){
    for($i=0 ;$i<=9;$i++){
        if($results['clients']['client'][$i]['points'] > 0){
            $k=$i;
        }
    }
}

$image = "FoldingSig.png";
$im = imagecreatefrompng($image);
$wc = ImageColorAllocate ($im, 255, 255, 255);
$green = ImageColorAllocate ($im, 0, 255, 0);
$red = ImageColorAllocate ($im, 223, 56, 5);
$yellow = ImageColorAllocate ($im, 255, 255, 0);
if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 530, 10, "Running", $green);}
if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 530, 10, "Paused", $yellow);}
if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 530, 10, "Stopped", $red);}
if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 530, 10, "Disabled", $wc);}
ImageString($im, 35, 300, 10, $results['clients']['client'][$k]['name'], $wc);
ImageString($im, 4, 262, 60, $results['clients']['client'][$k]['project'], $wc);
ImageString($im, 4, 328, 60, $results['clients']['client'][$k]['points'], $wc);
ImageString($im, 4, 402, 60, $results['clients']['client'][$k]['percent'], $wc);
ImageString($im, 4, 475, 60, $results['clients']['client'][$k]['ppd'], $wc);
ImageString($im, 4, 555, 60, $results['clients']['client'][$k]['tpf'], $wc);
header("Content-Type: image/png");
Imagepng($im);
ImageDestroy ($im);


    function simpleXMLToArray($xml,
                    $flattenValues=true,
                    $flattenAttributes = true,
                    $flattenChildren=true,
                    $valueKey='@value',
                    $attributesKey='@attributes',
                    $childrenKey='@children'){

        $return = array();
        if(!($xml instanceof SimpleXMLElement)){return $return;}
        $name = $xml->getName();
        $_value = trim((string)$xml);
        if(strlen($_value)==0){$_value = null;};

        if($_value!==null){
            if(!$flattenValues){$return[$valueKey] = $_value;}
            else{$return = $_value;}
        }

        $children = array();
        $first = true;
        foreach($xml->children() as $elementName => $child){
            $value = simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey);
            if(isset($children[$elementName])){
                if($first){
                    $temp = $children[$elementName];
                    unset($children[$elementName]);
                    $children[$elementName][] = $temp;
                    $first=false;
                }
                $children[$elementName][] = $value;
            }
            else{
                $children[$elementName] = $value;
            }
        }
        if(count($children)>0){
            if(!$flattenChildren){$return[$childrenKey] = $children;}
            else{$return = array_merge($return,$children);}
        }

        $attributes = array();
        foreach($xml->attributes() as $name=>$value){
            $attributes[$name] = trim($value);
        }
        if(count($attributes)>0){
            if(!$flattenAttributes){$return[$attributesKey] = $attributes;}
            else{$return = array_merge($return, $attributes);}
        }
      
        return $return;
    }

?>

 
This code will work for you but you must change the file location of your xml file and the orginal picture file.
The lines Imagestring is what pastes the info from the xml file into the png file. The code above will display the Clients stats that have the highest PPD. If all the PPD's are 0 then is will display the client with the highest points.
 
Unfortunatly, EVGA forums does not let you use PHP code directly. So to get it to be a picture in your sig you have to name the PHP file a PNG file.
For Apache:
To get the PHP code to run within a PNG file you must set your Apache server to parse all PNG files though the PHP parser.
To do this I placed a .htaccess file in the folder with the PNG/PHP files with this code
 
AddHandler application/x-httpd-php .png

 
*In IIS:
You need to add a Handler Mapping as a module mapping. Like this. 
  
In IIS in the Actions pane, click Add Module Mapping.... In the Add Module Mapping dialog box, specify the configuration settings as follows: 
  • Request path: *.php
  • Module: FastCgiModule Executable: "C:\[Path to your PHP installation]\php-cgi.exe" Name: PNG as PHP    
    Note: you need to have php installed as well but when you enable IIS in Win7, Server 2003, 2008, ETC... you can then download the MS Web Platform Installer that has a auto installer for PHP and it will install it in IIS and configure it auto matically. You can get the Web Platform Installer Here 
    http://www.microsoft.com/web/downloads/platform.aspx
     
    *Thanks Bowenac 
                 
    So to recap step by step:
     
    1. Must have or setup a Web/FTP Server.
    2. Setup Jedi's client to upload its xml file to your server.
    3. Create your Picture file you want to put your folding info on.
    4. Use my complete code above but change the location of your original png file
    5. Set the folder on your server to process png files as php files using the code above.
     
    Some explanation on the code(untested with these remarks):
    <?php                                

    $results = simpleXMLToArray(simplexml_load_file("/media/shared/Status.xml"));    //Opens the xml file a variable $results

    $oldppd=0;                                                        //All this stuff from here
    $k=0;
    $onoff=0;
    for($i=0 ;$i<=9;$i++){
        $newppd = $results['clients']['client'][$i]['ppd'];
        if($newppd > $oldppd){
            $oldppd=$newppd;
            $k=$i;
        }
    }
    if($k == 0){
        for($i=0 ;$i<=9;$i++){
            if($results['clients']['client'][$i]['points'] > 0){
                $k=$i;
            }
        }
    }                                                                //To here find the Highest PPD or the highest points client

    $image = "FoldingSig.png";                                         //From here
    $im = imagecreatefrompng($image);
    $wc = ImageColorAllocate ($im, 255, 255, 255);//creates colors from the rbg color scale
    $green = ImageColorAllocate ($im, 0, 255, 0);
    $red = ImageColorAllocate ($im, 223, 56, 5);
    $yellow = ImageColorAllocate ($im, 255, 255, 0);
    if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 530, 10, "Running", $green);}//changes the display for if its running, paused, stopped or disabled
    if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 530, 10, "Paused", $yellow);}
    if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 530, 10, "Stopped", $red);}
    if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 530, 10, "Disabled", $wc);}
    ImageString($im, 35, 300, 10, $results['clients']['client'][$k]['name'], $wc);//displays a string. the format is(picturename, font size(1-5), x-coor, y-coor, string, color)
    ImageString($im, 4, 262, 60, $results['clients']['client'][$k]['project'], $wc);
    ImageString($im, 4, 328, 60, $results['clients']['client'][$k]['points'], $wc);
    ImageString($im, 4, 402, 60, $results['clients']['client'][$k]['percent'], $wc);
    ImageString($im, 4, 475, 60, $results['clients']['client'][$k]['ppd'], $wc);
    ImageString($im, 4, 555, 60, $results['clients']['client'][$k]['tpf'], $wc);
    header("Content-Type: image/png");
    Imagepng($im);
    ImageDestroy ($im);                                             //To here manipulates the image
     

    I know this process is unclear and I will be refining the info above, but if you need help just ask.
     


    Section 2

    New Updated 3/6/11 - EOC Stats
     
    If you want your own EOC stats in the banner as well, here are the instructions
     
    Requirements: 
    Already Working Stats Banner as described above 
    MySQL 
      
    1. Paste All of this above the rest of your program in your php file and change the variables $eoc_id, $db_user and $db_pass. 
      
      
      
                           
    //****************************************************************************************************************************** 
    //Everything From Here to the starts is for the mysql database 
    //eoc id 
    $eoc_id = "Put Folding # here";  
    //mysql information 
    $db_ip = "localhost"; 
    $db_user = "Put Database Username here"; 
    $db_pass = "Put DataBase password heref"; 
    //connect to database 
    $con = mysql_connect($db_ip,$db_user,$db_pass); 
    if (!$con) 
      { 
      die('Could not connect: ' . mysql_error()); 
      } 
    //does datatbase exist 
    mysql_query("CREATE DATABASE IF NOT EXISTS my_db",$con); 
    //does table exist 
    mysql_select_db("my_db", $con); 
    $sql = "CREATE TABLE IF NOT EXISTS Time(Lasttimequeried int,Username varchar(15),Points int,PointsToday int, PointsWeek int, PointsAvg int, TeamRank int, Workunits int)"; 
    // Execute query 
    mysql_query($sql,$con); 
    //PHP time and insert time 
    $time = time(); 
    $result = mysql_query("SELECT * FROM Time"); 
    $row = mysql_fetch_array($result); 
    if($row['Lasttimequeried'] == NULL){ 
    $eoc = simpleXMLToArray(simplexml_load_file("http://folding.extremeoverclocking.com/xml/user_summary.php?s=&u=$eoc_id")); 
    $un = $eoc['user']['User_Name']; 
    $pts = $eoc['user']['Points']; 
    $ptsday = $eoc['user']['Points_Today']; 
    $ptsweek = $eoc['user']['Points_Week']; 
    $ptsavg = $eoc['user']['Points_24hr_Avg']; 
    $teamrank = $eoc['user']['Team_Rank']; 
    $wu = $eoc['user']['WUs']; 
    mysql_query("INSERT INTO Time(Lasttimequeried, Username, Points, PointsToday, PointsWeek, PointsAvg, TeamRank, Workunits) VALUES('$time', '$un', '$pts', '$ptsday', '$ptsweek', '$ptsavg', '$teamrank', '$wu')"); 

    if($time > ($row['Lasttimequeried']+10800)){ 
    $eoc = simpleXMLToArray(simplexml_load_file("http://folding.extremeoverclocking.com/xml/user_summary.php?s=&u=$eoc_id")); 
    $pts = $eoc['user']['Points']; 
    $ptsday = $eoc['user']['Points_Today']; 
    $ptsweek = $eoc['user']['Points_Week']; 
    $ptsavg = $eoc['user']['Points_24hr_Avg']; 
    $teamrank = $eoc['user']['Team_Rank']; 
    $wu = $eoc['user']['WUs']; 
    mysql_query("UPDATE Time SET Lasttimequeried=$time"); 
    mysql_query("UPDATE Time SET Points=$pts"); 
    mysql_query("UPDATE Time SET PointsToday=$ptsday"); 
    mysql_query("UPDATE Time SET PointsWeek=$ptsweek"); 
    mysql_query("UPDATE Time SET PointsAvg=$ptsavg"); 
    mysql_query("UPDATE Time SET TeamRank=$teamrank"); 
    mysql_query("UPDATE Time SET Workunits=$wu"); 
    $result = mysql_query("SELECT * FROM Time"); $row = mysql_fetch_array($result); 

    mysql_close($con); 
    //***********************************************************************************************************************************
       
     
     
    2. Now Put this in with the rest of your ImageStrings 
     
       //***********************************************************************************************************************************                       
    //this is also for the database 
    ImageString($im, 3, 420, 5, "Total Points", $wc); 
    ImageString($im, 3, 420, 20, "24h Points", $wc); 
    ImageString($im, 3, 420, 35, "Weekly Points", $wc); 
    ImageString($im, 3, 420, 50, "Team Rank", $wc); 
    ImageString($im, 3, 420, 65, "WUs", $wc); 
    ImageString($im, 3, 520, 5, $row['Points'], $wc); 
    ImageString($im, 3, 520, 20, $row['PointsToday'], $wc); 
    ImageString($im, 3, 520, 35, $row['PointsWeek'], $wc); 
    ImageString($im, 3, 520, 50, $row['TeamRank'], $wc); 
    ImageString($im, 3, 520, 65, $row['Workunits'], $wc); 
    //***********************************************************************************************************************************


    3. Change above numbers to suit your banner 

    4. Done Enjoy  


    Section 3  
     
    Requirements
    1. Initial png file to put your stats on
    2. Server or someone willing to host it(I will if you ask nicely)
    3. Mysql on your server or your friends  
     
    This is the entire code required to make a EOC signature save it as a png file and change the values indicated

    <?php           
    //******************************************************************************************************************************
    //Everything From Here to the starts is for the mysql database
    //eoc id
    $eoc_id = "EOC number"; 
    //mysql information
    $db_ip = "localhost";
    $db_user = "Put Username Here";
    $db_pass = "Put Password Here";
    //connect to database
    $con = mysql_connect($db_ip,$db_user,$db_pass);
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    //does datatbase exist
    mysql_query("CREATE DATABASE IF NOT EXISTS my_db",$con);
    //does table exist
    mysql_select_db("my_db", $con);
    $sql = "CREATE TABLE IF NOT EXISTS Time(Lasttimequeried int,Username varchar(15),Points int,PointsToday int, PointsWeek int, PointsAvg int, TeamRank int, Workunits int)";
    // Execute query
    mysql_query($sql,$con);
    //PHP time and insert time
    $time = time();
    $result = mysql_query("SELECT * FROM Time");
    $row = mysql_fetch_array($result);
    if($row['Lasttimequeried'] == NULL){
    $eoc = simpleXMLToArray(simplexml_load_file("http://folding.extremeoverclocking.com/xml/user_summary.php?s=&u=$eoc_id"));
    $un = $eoc['user']['User_Name'];
    $pts = $eoc['user']['Points'];
    $ptsday = $eoc['user']['Points_Today'];
    $ptsweek = $eoc['user']['Points_Week'];
    $ptsavg = $eoc['user']['Points_24hr_Avg'];
    $teamrank = $eoc['user']['Team_Rank'];
    $wu = $eoc['user']['WUs'];
    mysql_query("INSERT INTO Time(Lasttimequeried, Username, Points, PointsToday, PointsWeek, PointsAvg, TeamRank, Workunits) VALUES('$time', '$un', '$pts', '$ptsday', '$ptsweek', '$ptsavg', '$teamrank', '$wu')");
    }
    if($time > ($row['Lasttimequeried']+10800)){
    $eoc = simpleXMLToArray(simplexml_load_file("http://folding.extremeoverclocking.com/xml/user_summary.php?s=&u=$eoc_id"));
    $pts = $eoc['user']['Points'];
    $ptsday = $eoc['user']['Points_Today'];
    $ptsweek = $eoc['user']['Points_Week'];
    $ptsavg = $eoc['user']['Points_24hr_Avg'];
    $teamrank = $eoc['user']['Team_Rank'];
    $wu = $eoc['user']['WUs'];
    mysql_query("UPDATE Time SET Lasttimequeried=$time");
    mysql_query("UPDATE Time SET Points=$pts");
    mysql_query("UPDATE Time SET PointsToday=$ptsday");
    mysql_query("UPDATE Time SET PointsWeek=$ptsweek");
    mysql_query("UPDATE Time SET PointsAvg=$ptsavg");
    mysql_query("UPDATE Time SET TeamRank=$teamrank");
    mysql_query("UPDATE Time SET Workunits=$wu"); $result = mysql_query("SELECT * FROM Time"); $row = mysql_fetch_array($result);
    }
    mysql_close($con);
    //***********************************************************************************************************************************
    //Fonts
    $font = 'Location of Font 1.ttf';
    $font2 = 'Location of Font 2.ttf';
    //Image and Color Allocation
    $image = 'Location of initial Picture.png';
    $im = imagecreatefrompng($image);
    $wc = ImageColorAllocate ($im, 255, 255, 255);
    $green = ImageColorAllocate ($im, 0, 255, 0);
    $red = ImageColorAllocate ($im, 223, 56, 5);
    $yellow = ImageColorAllocate ($im, 255, 255, 0);
    //***********************************************************************************************************************************
    //EOC stats imagettftext(image, font size, angle, x-int, y-int, color, font, text);
    imagettftext($im, 8, 0, 10, 140, $wc, $font, "Total Points");
    imagettftext($im, 8, 0, 60, 180, $wc, $font, "Points Today");
    imagettftext($im, 8, 0, 110, 160, $wc, $font, "Weekly Points");
    imagettftext($im, 8, 0, 160, 160, $wc, $font, "Team Rank");
    imagettftext($im, 8, 0, 210, 160, $wc, $font, "WUs");
    imagettftext($im, 12, 0, 40, 140, $wc, $font2, $row['Points']); 
    imagettftext($im, 12, 0, 90, 210, $wc, $font2, $row['PointsToday']); 
    imagettftext($im, 12, 0, 140, 190, $wc, $font2, $row['PointsWeek']);
    imagettftext($im, 12, 0, 190, 190, $wc, $font2, $row['TeamRank']); 
    imagettftext($im, 12, 0, 240, 190, $wc, $font2, $row['Workunits']);
    //***********************************************************************************************************************************
    //Time Last Update
    $timeMin = (time() - $row['Lasttimequeried'])/60;
    if($timeMin > 59){$timeMin = $timeMin/60;imagettftext($im, 6, 0, 630, 240, $wc, $font2, "Last Updated ".round($timeMin)." hour(s) Ago");}
    else{imagettftext($im, 6, 0, 630, 240, $wc, $font2, "Last Updated ".round($timeMin)." min(s) Ago");}
    header("Content-Type: image/png"); 
    Imagepng($im); 
    ImageDestroy ($im);
    ?>
     
    Unfortunatly, EVGA forums does not let you use PHP code directly. So to get it to be a picture in your sig you have to name the PHP file a PNG file. 
    For Apache: 
    To get the PHP code to run within a PNG file you must set your Apache server to parse all PNG files though the PHP parser. 
    To do this I placed a .htaccess file in the folder with the PNG/PHP files with this code 
      
    AddHandler application/x-httpd-php .png
      
    *In IIS: 
    You need to add a Handler Mapping as a module mapping. Like this.  
       
    In IIS in the Actions pane, click Add Module Mapping.... In the Add Module Mapping dialog box, specify the configuration settings as follows:   
  • Request path: *.php
  • Module: FastCgiModule Executable: "C:\[Path to your PHP installation]\php-cgi.exe" Name: PNG as PHP     
    Note: you need to have php installed as well but when you enable IIS in Win7, Server 2003, 2008, ETC... you can then download the MS Web Platform Installer that has a auto installer for PHP and it will install it in IIS and configure it auto matically. You can get the Web Platform Installer Here  
    http://www.microsoft.com/web/downloads/platform.aspx 
      
    *Thanks Bowenac
    post edited by unhappyelf - 2011/06/07 12:12:46


  • #1

    197 Replies Related Threads

      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 08:30:44 (permalink)
      I'd be very interested in setting this up :) PM coming your way :D

      My Affiliate Code: GL1IAAFWJF
      #2
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 08:47:28 (permalink)
      replied


      #3
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 08:52:13 (permalink)
      re-replied :P
       
      Bit confused haha.
       
      What about the xml file, does that also need to go to my web\folding folder?

      My Affiliate Code: GL1IAAFWJF
      #4
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 09:02:41 (permalink)
      It can, but it doesnt have to just as long as you change the the location of the xml file on this line
      $results = simpleXMLToArray(simplexml_load_file("/media/shared/Status.xml"));

      change whats in bold to the location of your xml file


      #5
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 09:13:24 (permalink)
      Ah right :D With the drive letter im assuming?
       
      Also, is it possible to have all the WUs that are currently running show on the same pic as opposed to just the top one? :)
      post edited by Sleinous - 2011/01/20 09:15:31

      My Affiliate Code: GL1IAAFWJF
      #6
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 09:46:16 (permalink)
      Sleinous

      Ah right :D With the drive letter im assuming?

      Also, is it possible to have all the WUs that are currently running show on the same pic as opposed to just the top one? :)

       
      Yes the full file location.
       
      And also yes but It would entail rewriting a lot of the display code.
       
      Instead of this:
        $oldppd=0;    
       $k=0;    
       $onoff=0;    
       for($i=0 ;$i<=9;$i++){    
           $newppd = $results['clients']['client'][$i]['ppd'];    
           if($newppd > $oldppd){    
               $oldppd=$newppd;    
               $k=$i;    
           }    
       }    
       if($k == 0){    
           for($i=0 ;$i<=9;$i++){    
               if($results['clients']['client'][$i]['points'] > 0){    
                   $k=$i;    
               }    
           }    
       }    

       
       


      #7
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 10:14:18 (permalink)
      Ah k :P Maybe when I have a tad more time then.
       
      I made the .htaccess file, in notepad it named it .htaccess.txt,
       
      So I neabled view known file extensions and deleted "txt" and now im left with HTACCESS File, as the type, so im guessing this is right now :) Googled the matter a bit.
       
      Now to make the PHP file.
       
      Is there a typo in your first post btw?
       
      "2. A PHP file disguised as a PNP file to process the xml and take the initial picture and input the data."
       
      Do you mean PNG instead of PNP? I dont see you refer to PNP any other time, but you do refer to PNG afterwards :P
       
      Thanks again

      My Affiliate Code: GL1IAAFWJF
      #8
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 10:16:37 (permalink)
      Sleinous

      Is there a typo in your first post btw?

      "2. A PHP file disguised as a PNP file to process the xml and take the initial picture and input the data."

      Do you mean PNG instead of PNP? I dont see you refer to PNP any other time, but you do refer to PNG afterwards :P

      Thanks again

       
      Yes good catch, I do mean Png.


      #9
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 10:26:14 (permalink)
      Right, im making progress :P
       
      Also, how does the code know where to place the numbers? Darn clever if you ask me :P Ive made a simple .PNG with just the titles Project Points etc etc etc, but its not in the same spacing as your one, im guessing theres some super-magical way it figures out where to put everything.
       
      Also, im guessing im gonna need to link to the .PHP script that is disguised as a .PNG yes? I.e. on my server for this to appear in my sig.
       
       
      EDIT:
       
      Im guessing this bit is where all my supposed magic occurs :P It actually appears to just be coordinates, this will be fun to get positioned right :P
       
       $im, 35, 300, 10, $results['clients']['client'][$k]['name'], $wc);        
       ImageString($im, 4, 262, 60, $results['clients']['client'][$k]['project'], $wc);        
       ImageString($im, 4, 328, 60, $results['clients']['client'][$k]['points'], $wc);        
       ImageString($im, 4, 402, 60, $results['clients']['client'][$k]['percent'], $wc);        
       ImageString($im, 4, 475, 60,

      EDIT EDIT: Im also assuming that if the PHP file (names as a .PNG) is in the same folder and disk (Synology DS210j in my case) that I dont need teh full path but just like yours, the "/web/folding"
       
      I do save the notepad PHP script as a .png dont I?
      post edited by Sleinous - 2011/01/20 10:32:15

      My Affiliate Code: GL1IAAFWJF
      #10
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 10:33:28 (permalink)
      You got everything right.
       
      Yes you do need to link the PHP/PNG in your sig using the insert picture button.


      #11
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 11:16:10 (permalink)
      Hmm, here goes!
       
      EDIT: Ummmmm, ok well, its half working, its linking back to the initial picture, but, no numbers appearing :P
       
      EDIT EDIT: Maybe theyre appearing but theyre off teh page? How on earthw ill I know the coordinates to place each of them ^.^ There must be a program that lets u open your pics and then tells you teh coordinate of a particular point?
      post edited by Sleinous - 2011/01/20 11:25:16

      My Affiliate Code: GL1IAAFWJF
      #12
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 11:26:35 (permalink)
      Yeah its probably a issue with the xml processing part. 
       
      Oh wait did you change the color of the text? Mine is set to white because I have a colored background.


      #13
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 11:32:47 (permalink)
      Oh hahaha nope I did not, :P
       
      EDIT: Changed to red, still no go :P
       
      EDIT EDIT: Well I got to go for a bit now, but if you have a second or two, here is the rar'd archive of all 4 files on my server. If you spot anything blatantly wrong that ive done, please do say :P
       
      sleinous.dyndns.info/folding.rar
      post edited by Sleinous - 2011/01/20 11:53:53

      My Affiliate Code: GL1IAAFWJF
      #14
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 12:05:06 (permalink)
      try this
       
      <?php       
       
       $results = simpleXMLToArray(simplexml_load_file("Status.xml"));      
       
       $oldppd=0;      
       $k=0;      
       $onoff=0;      
       for($i=0 ;$i<=9;$i++){      
           $newppd = $results['clients']['client'][$i]['ppd'];      
           if($newppd > $oldppd){      
               $oldppd=$newppd;      
               $k=$i;      
           }      
       }      
       if($k == 0){      
           for($i=0 ;$i<=9;$i++){      
               if($results['clients']['client'][$i]['points'] > 0){      
                   $k=$i;      
               }      
           }      
       }      
       
       $image = "folding.png";       
       $im = imagecreatefrompng($image);      
       $wc = ImageColorAllocate ($im, 255, 255, 255);
       $black = ImageColorAllocate ($im, 0, 0, 0);
       $green = ImageColorAllocate ($im, 0, 255, 0);      
       $red = ImageColorAllocate ($im, 223, 56, 5);      
       $yellow = ImageColorAllocate ($im, 255, 255, 0);      
       if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 530, 10, "Running", $green);}      
       if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 530, 10, "Paused", $yellow);}      
       if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 530, 10, "Stopped", $red);}      
       if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 530, 10, "Disabled", $wc);}      
       ImageString($im, 35, 300, 10, $results['clients']['client'][$k]['name'], $black);      
       ImageString($im, 4, 262, 60, $results['clients']['client'][$k]['project'], $black);       
       ImageString($im, 4, 328, 60, $results['clients']['client'][$k]['points'], $black);       
       ImageString($im, 4, 402, 60, $results['clients']['client'][$k]['percent'], $black);       
       ImageString($im, 4, 475, 60, $results['clients']['client'][$k]['ppd'], $black);      
       ImageString($im, 4, 555, 60, $results['clients']['client'][$k]['tpf'], $black);      
       header("Content-Type: image/png");       
       Imagepng($im);       
       ImageDestroy ($im);       
       
       
           function simpleXMLToArray($xml,      
                           $flattenValues=true,      
                           $flattenAttributes = true,      
                           $flattenChildren=true,      
                           $valueKey='@value',      
                           $attributesKey='@attributes',      
                           $childrenKey='@children'){      
       
               $return = array();      
               if(!($xml instanceof SimpleXMLElement)){return $return;}      
               $name = $xml->getName();      
               $_value = trim((string)$xml);      
               if(strlen($_value)==0){$_value = null;};      
       
               if($_value!==null){      
                   if(!$flattenValues){$return[$valueKey] = $_value;}      
                   else{$return = $_value;}      
               }      
       
               $children = array();      
               $first = true;      
               foreach($xml->children() as $elementName => $child){      
                   $value = simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey);      
                   if(isset($children[$elementName])){      
                       if($first){      
                           $temp = $children[$elementName];      
                           unset($children[$elementName]);      
                           $children[$elementName][] = $temp;      
                           $first=false;      
                       }      
                       $children[$elementName][] = $value;      
                   }      
                   else{      
                       $children[$elementName] = $value;      
                   }      
               }      
               if(count($children)>0){      
                   if(!$flattenChildren){$return[$childrenKey] = $children;}      
                   else{$return = array_merge($return,$children);}      
               }      
       
               $attributes = array();      
               foreach($xml->attributes() as $name=>$value){      
                   $attributes[$name] = trim($value);      
               }      
               if(count($attributes)>0){      
                   if(!$flattenAttributes){$return[$attributesKey] = $attributes;}      
                   else{$return = array_merge($return, $attributes);}      
               }      
                    
               return $return;      
           }      
       
       ?>     



      #15
      fsuwade
      CLASSIFIED Member
      • Total Posts : 2011
      • Reward points : 0
      • Joined: 2008/04/22 11:17:37
      • Status: offline
      • Ribbons : 6
      Re:How-to: Live Folding Signature 2011/01/20 12:49:46 (permalink)
      Great work on the sig. BR for you.

          
          Heatware - fsuwade01

      #16
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 12:53:28 (permalink)
      fsuwade

      Great work on the sig. BR for you.

       
      Thank you!


      #17
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/20 14:13:42 (permalink)
      Thanks again for all your help, youve certainly earnt the BR :) On iPhone atm and will be off to sleep soon but I will swap the codes over tomorrow and we'll see how it goes from there :-D

      Again thanks!

      My Affiliate Code: GL1IAAFWJF
      #18
      unhappyelf
      iCX Member
      • Total Posts : 320
      • Reward points : 0
      • Joined: 2008/09/24 19:55:01
      • Location: Houston, Tx
      • Status: offline
      • Ribbons : 1
      Re:How-to: Live Folding Signature 2011/01/20 19:38:19 (permalink)
      Just encase anyone didn't want to make one themselves I made a few I didn't use and y'all are welcome to use them
       

      Here is the link for the .png file
      http://kbates666.gotdns.com/banners/Evgabanner1.png
      Here is the link for the .xcf file if anybody wants to edit it.
      http://kbates666.gotdns.com/banners/Evgabanner1.xcf
       

      Here is the link for the .png file
      http://kbates666.gotdns.com/banners/Evgabanner2.png
      Here is the link for the .xcf file if anybody wants to edit it.
      http://kbates666.gotdns.com/banners/Evgabanner2.xcf
       
      You would still have to make the PHP/PNG file described above.
       
      post edited by unhappyelf - 2011/01/21 17:40:31


      #19
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 00:35:01 (permalink)
      Oooh thanks :P Im useless at Photoshop so ill use the top one :) 
       
      What is a .xcf file though? :P What do I open it in?
       
      (It works by the way). Thanks again for all your help, you certainly meritted that BR!
       
      Fold on!

      My Affiliate Code: GL1IAAFWJF
      #20
      clifford_cooley
      iCX Member
      • Total Posts : 469
      • Reward points : 0
      • Joined: 2010/11/03 18:40:27
      • Location: Arkansas, USA
      • Status: offline
      • Ribbons : 0
      Re:How-to: Live Folding Signature 2011/01/21 01:10:09 (permalink)
      Live Signature looks good Sleinous
      #21
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 01:17:17 (permalink)
      Thanks :) Trying to figure out how to display all 5 clients but as unhappyelf said, it does involve rewriting a heck of a lot of it and seeing as I have no clue about PHP, or maybe just the most basic of clues, this is going to be a fun project :P
       
      Btw i'm liking your avatar :P A mix with E from EVGA and windows logo from your Windows 7 forums :)
       
      @ Unhappy elf, what do $k and $i refer to?
      post edited by Sleinous - 2011/01/21 01:19:29

      My Affiliate Code: GL1IAAFWJF
      #22
      clifford_cooley
      iCX Member
      • Total Posts : 469
      • Reward points : 0
      • Joined: 2010/11/03 18:40:27
      • Location: Arkansas, USA
      • Status: offline
      • Ribbons : 0
      Re:How-to: Live Folding Signature 2011/01/21 02:07:14 (permalink)
      for($i=0 ;$i<=9;$i++){
      place code here
      }
       
      This code is a loop.
      A loop will run the same code over and over until it finishes count.
       
      $i - is a variable that represents a number controlled by the loop.
      $i=0 - is assigning 0 as the number that $i represents in the start of the loop.  
      $i<=9 - is telling the loop to continue looping until $i is less than or equal to 9.   
      $i++ - is incrementing $i by +1 each time the loop starts over.
      post edited by clifford_cooley - 2011/01/21 02:10:54
      #23
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 02:10:53 (permalink)
      clifford_cooley

      for($i=0 ;$i<=9;$i++){
      place code here
      }

      This code is a loop.
      A loop will run the same code over and over until it finishes count.

      $i - is a variable that represents a number controlled by the loop.
      $i=0 - is assigning 0 as the number that $i represents in the start of the loop. 
      $i<=9 - is telling the loop to continue looping until %i is less than or equal to 9.
      $i++ - is incrementing i by +1 each time the loop starts over.

      Wow this is now officially way over my head ahaha
       
      What im thinking though is, if I dont want it to figure out which client is producing the most PPD, surely that should simplify it a bit? I.e. no more if statements?
       
      However, im guessing you need to tell it to add the other 4 client stats in, and thsi would mean another 4x this:
       
      if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 320, 10, "Running", $green);}       
       if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 320, 10, "Paused", $yellow);}      
       if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 320, 10, "Stopped", $red);}      
       if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 320, 10, "Disabled", $wc);}      
       ImageString($im, 35, 62, 10, $results['clients']['client'][$k]['name'], $yellow);      
       ImageString($im, 4, 23, 60, $results['clients']['client'][$k]['project'], $wc);       
       ImageString($im, 4, 99, 60, $results['clients']['client'][$k]['points'], $wc);       
       ImageString($im, 4, 189, 60, $results['clients']['client'][$k]['percent'], $wc);       
       ImageString($im, 4, 279, 60, $results['clients']['client'][$k]['ppd'], $wc);      
       ImageString($im, 4, 356, 60, $results['clients']['client'][$k]['tpf'], $wc);

       
      Well, without the if bit again, because what I want to do is have a status for each and every client, so 5 status's and obviously 5 rows of 6 imagestrings, one below the other. Hmmmm. :P

      My Affiliate Code: GL1IAAFWJF
      #24
      clifford_cooley
      iCX Member
      • Total Posts : 469
      • Reward points : 0
      • Joined: 2010/11/03 18:40:27
      • Location: Arkansas, USA
      • Status: offline
      • Ribbons : 0
      Re:How-to: Live Folding Signature 2011/01/21 02:47:38 (permalink)
      if($k == 0){        
          for($i=0 ;$i<=9;$i++){      
              if($results['clients']['client'][$i]['points'] > 0){      
                  $k=$i;      
              }      
          }      
       }

       
      In the above code change "$k=$i:" by setting the value of $i to a value between 0 and 9. ("$k=0")
      I'm guessing 1 will show SMP2 and 2 will show GPU0
      #25
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 03:09:23 (permalink)
       if($k == 0){        
           for($i=1 ;$i<=9;$i++){        
               if($results['clients']['client'][$i]['points'] > 0){        
                   $k=$i;        
               }        
           }        
       }


      Like that^ ?

      So, if I wanted 1, 2, 3, 4, 5, how do I replicate that bit? Im guessing its the if for if bit that gets replicated?

      My Affiliate Code: GL1IAAFWJF
      #26
      clifford_cooley
      iCX Member
      • Total Posts : 469
      • Reward points : 0
      • Joined: 2010/11/03 18:40:27
      • Location: Arkansas, USA
      • Status: offline
      • Ribbons : 0
      Re:How-to: Live Folding Signature 2011/01/21 03:19:10 (permalink)
      Sleinous 
      if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 320, 10, "Running", $green);}        
      if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 320, 10, "Paused", $yellow);}      
      if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 320, 10, "Stopped", $red);}      
      if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 320, 10, "Disabled", $wc);}      
      ImageString($im, 35, 62, 10, $results['clients']['client'][$k]['name'], $yellow);      
      ImageString($im, 4, 23, 60, $results['clients']['client'][$k]['project'], $wc);       
      ImageString($im, 4, 99, 60, $results['clients']['client'][$k]['points'], $wc);       
      ImageString($im, 4, 189, 60, $results['clients']['client'][$k]['percent'], $wc);       
      ImageString($im, 4, 279, 60, $results['clients']['client'][$k]['ppd'], $wc);      
      ImageString($im, 4, 356, 60, $results['clients']['client'][$k]['tpf'], $wc);



       
      The $k value in this code represents the client number.
      Add "$k=1" above this code.
      Then duplicate the code and change "$k=1" to "$k=2".
      You will also need to change the coordinates for the second set.
      I'm sure you will figure that out quickly.
      #27
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 03:30:07 (permalink)
      clifford_cooley

      Sleinous 
      if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 320, 10, "Running", $green);}          
      if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 320, 10, "Paused", $yellow);}      
      if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 320, 10, "Stopped", $red);}      
      if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 320, 10, "Disabled", $wc);}      
      ImageString($im, 35, 62, 10, $results['clients']['client'][$k]['name'], $yellow);      
      ImageString($im, 4, 23, 60, $results['clients']['client'][$k]['project'], $wc);       
      ImageString($im, 4, 99, 60, $results['clients']['client'][$k]['points'], $wc);       
      ImageString($im, 4, 189, 60, $results['clients']['client'][$k]['percent'], $wc);       
      ImageString($im, 4, 279, 60, $results['clients']['client'][$k]['ppd'], $wc);      
      ImageString($im, 4, 356, 60, $results['clients']['client'][$k]['tpf'], $wc);




      The $k value in this code represents the client number.
      Add "$k=1" above this code.
      Then duplicate the code and change "$k=1" to "$k=2".
      You will also need to change the coordinates for the second set.
      I'm sure you will figure that out quickly.

      Aaah this makes sense :P Thanks again!
       
      EDIT:
       
       if($k == 0){       
           for($i=0 ;$i<=9;$i++){      
               if($results['clients']['client'][$i]['points'] > 0){      
                   $k=$i;      
               }      
           }      
       }      
       
       $image = "folding.png";       
       $im = imagecreatefrompng($image);      
       $wc = ImageColorAllocate ($im, 255, 255, 255);
       $black = ImageColorAllocate ($im, 0, 0, 0);
       $green = ImageColorAllocate ($im, 0, 255, 0);      
       $red = ImageColorAllocate ($im, 223, 56, 5);      
       $yellow = ImageColorAllocate ($im, 255, 255, 0);
       $k=1      
       if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 290, 10, "Running", $green);}      
       if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 290, 10, "Paused", $yellow);}      
       if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 290, 10, "Stopped", $red);}      
       if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 290, 10, "Disabled", $wc);}
       if($results['clients']['client'][$k]['tpf'] >= "00:01:30"){ImageString($im, 35, 364, 10, "& Gaming", $red);}      
       ImageString($im, 35, 62, 10, $results['clients']['client'][$k]['name'], $yellow);      
       ImageString($im, 4, 23, 60, $results['clients']['client'][$k]['project'], $wc);       
       ImageString($im, 4, 99, 60, $results['clients']['client'][$k]['points'], $wc);       
       ImageString($im, 4, 189, 60, $results['clients']['client'][$k]['percent'], $wc);       
       ImageString($im, 4, 279, 60, $results['clients']['client'][$k]['ppd'], $wc);      
       ImageString($im, 4, 356, 60, $results['clients']['client'][$k]['tpf'], $wc);
       $k=2
       if($results['clients']['client'][$k]['status'] == "Running"){ImageString($im, 35, 290, 10, "Running", $green);}      
       if($results['clients']['client'][$k]['status'] == "Paused"){ImageString($im, 35, 290, 10, "Paused", $yellow);}      
       if($results['clients']['client'][$k]['status'] == "Stopped"){ImageString($im, 35, 290, 10, "Stopped", $red);}      
       if($results['clients']['client'][$k]['status'] == "Disabled"){ImageString($im, 35, 290, 10, "Disabled", $wc);}
       if($results['clients']['client'][$k]['tpf'] >= "00:01:30"){ImageString($im, 35, 364, 10, "& Gaming", $red);}      
       ImageString($im, 35, 62, 20, $results['clients']['client'][$k]['name'], $yellow);      
       ImageString($im, 4, 23, 70, $results['clients']['client'][$k]['project'], $wc);       
       ImageString($im, 4, 99, 70, $results['clients']['client'][$k]['points'], $wc);       
       ImageString($im, 4, 189, 70, $results['clients']['client'][$k]['percent'], $wc);       
       ImageString($im, 4, 279, 70, $results['clients']['client'][$k]['ppd'], $wc);      
       ImageString($im, 4, 356, 70, $results['clients']['client'][$k]['tpf'], $wc);      
       header("Content-Type: image/png");       
       Imagepng($im);       
       ImageDestroy ($im);

       
      Pretty sure ive done something horribly wrong there coz the whole sig has gone now :P
      post edited by Sleinous - 2011/01/21 03:34:46

      My Affiliate Code: GL1IAAFWJF
      #28
      clifford_cooley
      iCX Member
      • Total Posts : 469
      • Reward points : 0
      • Joined: 2010/11/03 18:40:27
      • Location: Arkansas, USA
      • Status: offline
      • Ribbons : 0
      Re:How-to: Live Folding Signature 2011/01/21 03:39:03 (permalink)
      I'm sorry you may need to place a ";" behind the lines you added. It's an end of line statement and without it could cause problems. look at the other lines they all end with the ;
      #29
      Sleinous
      EVGA Forum Moderator
      • Total Posts : 7680
      • Reward points : 0
      • Joined: 2010/06/12 12:22:01
      • Location: Paris, France
      • Status: offline
      • Ribbons : 32
      Re:How-to: Live Folding Signature 2011/01/21 03:44:12 (permalink)
      Oops yes, ill try that now :P
       
      EDIT: Woot! Thanks alot :D It works
       
      EDIT EDIT: Ok, downloaded GIMP, love how easy it is too use :P Modified the image a bit, and adding the clients now :D
       
      Does anyone know why the text is blurry? :S Even the text that is part of the image by default is :/  Its not blurry when I view it in Picture Viewer. I set compression to 0, I saved as a .PNG, I tried merge visible layers and flatten image, they both blur up when accessed on forums :/
       
      This is how it normally looks:
       

       
       
      ^EDIT, wow, so its blurry even as a normal image, however when im editing the post right now, I can see that the "Client" "Folding Status" text etc is sharp as it is in the original. What's going on? Is this some forum limit?
       
      EDIT: Ok its definitley the EVGA forums limiting something :/ It is working fine on PCspecialist.co.uk forums.
       
      EDIT EDIT: Solved, it was a width limiter, I managed to squeeze it all in by spinning the EVGA bit round a bit and squeezing sides :P
      post edited by Sleinous - 2016/01/27 13:04:10

      My Affiliate Code: GL1IAAFWJF
      #30
      Page: 12345.. > >> Showing page 1 of 7
      Jump to:
    • Back to Mobile