How I Made My Signature

Discussion in 'Graphics & Webdesign' started by Bryon, Jan 9, 2006.

  1. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Ok...

    After making the base image...how can I apply the code on that image?

    Like just paste it on the image will probably won't work!

    So how can I apply th php code on the image?

    Thanks

    EDIT: I see that the same question has arised in this post before, but the answer to it didn't really help me :(
     
    Last edited: Jan 29, 2006
  2. Brandon

    Brandon Guest

    Great tutorial I also found a way to show the latest post and poster on a Phpbb forum in your sig.
     
  3. dharmil

    dharmil New Member

    Messages:
    1,656
    Likes Received:
    0
    Trophy Points:
    0
  4. Bryon

    Bryon I Fix Things

    Messages:
    8,149
    Likes Received:
    101
    Trophy Points:
    48
    It looks like me and chris (Him first) started a trend.. Glad to see you guys got them working.

    Dharmil, sorry I didn't PM you back, I've been prettty busy the last few days.
     
  5. dharmil

    dharmil New Member

    Messages:
    1,656
    Likes Received:
    0
    Trophy Points:
    0

    its alright

    i know you have a lot of work to do with x10 and you have your site to mantain
     
  6. Brandon

    Brandon Guest

    Well I just thought of something my sig is hosted on my account so if the HTTP server goes down... Lol got to move it somewhere.
     
  7. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Um...Can some one help me out here?

    I made two files Index.php & FunctionsVariables.inc.php

    with the codes as given by Nedren...now what am I supposed to?

    please guide me through it guys!
     
  8. dharmil

    dharmil New Member

    Messages:
    1,656
    Likes Received:
    0
    Trophy Points:
    0
    k do this
    give me a pic you want as background an i iwll make it for you...
     
  9. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Ok...

    With some help from Dharmil I figured out how to get the stuff to show up...

    Ok...now the thing is that there are positions of the text represented as:

    imagettftext($image, 8, 0, 260, 85, $color, $font2, $status);

    How will I be able to know that it's 8, 0, 260... Do I have to play around with it or is there a particular way to do it?

    Please let me know...Thanks

    And yea why does it say Server Load: No Idea and Uptime: No Idea lol?
     
    Last edited: Jan 30, 2006
  10. Brandon

    Brandon Guest

    I just played around with it.
     
  11. dharmil

    dharmil New Member

    Messages:
    1,656
    Likes Received:
    0
    Trophy Points:
    0

    Fist Number = Font Size
    Second Number = Dont knoe
    Third Number = x-axes
    Forth Number = y-axes
     
  12. Brandon

    Brandon Guest

    Yeah, thats correct. The second number is angle.
     
  13. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Oh Ok...

    And Enigma...How can I get the random quotes and # of times view thingy...Like what is the php code for that?
     
  14. Brandon

    Brandon Guest

    Let me fetch the code. My script is all messy.
     
  15. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Sorry but I am a n00b at Php

    I think that this resembles the color:

    $red = imagecolorallocate($image, 231, 180, 180);

    $green = imagecolorallocate($image, 000, 000, 000);

    $white = imagecolorallocate($image, 255, 255, 255);

    how can i change it to waht i want...? Can some one tell me :S
     
  16. Brandon

    Brandon Guest

    Well your correct for the color I'm not good at explaining you might want to contact NedreN
     
  17. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Ok I will...

    Let me know the code for # of views and Random quotes php cod...

    Thanks
     
  18. Chris S

    Chris S Retired

    Messages:
    2,055
    Likes Received:
    1
    Trophy Points:
    38
    here i'll post my code because i made lovely functions.

    I made the hit counter out of fopen functions.

    PHP:
    function views($name){
        
        
    $TextFile $name;
        
    $Count trim(file_get_contents($TextFile));
        
    $FP fopen($TextFile"r");
        
    $Count=fgets($FP4096);
        
    fclose ($FP);
        
    settype($Count"integer");
        
    $Count++;
        if (
    $FP fopen ($TextFile"w")){
        
    fwrite ($FP$Count);
        
    fclose ($FP);
        }
     return 
    $Count;
    }
    Just make a file named whatever you want, cmod to 777 and call upon that function with

    PHP:
    $views views('myhits.txt');
    This is my quote function.

    PHP:
    function quote($mysql){
        if (
    $mysql == 'Online'){
          
    $query1 mysql_query("SELECT `id` FROM `quotes`") or die (mysql_error());
          
    $num mysql_num_rows($query1);
          
    $id rand(1,$num);
          
    $quotetmp mysql_query("SELECT * FROM `quotes` WHERE `id` = '$id'");
          
    $qte mysql_fetch_array($quotetmp);
          
    $quote2=$qte['quote'];
          
    $views=$qte['views'];
          
    $quote2 stripslashes($quote2);
          
    $views $views 1;
          
    $update mysql_query("UPDATE `quotes` SET `views`='$views' WHERE `id`='$id'") or die (mysql_error());
        }
     return 
    $quote2;
    }
    that is called with

    PHP:
    $quote quote($mysql);
    Where mysql is represented by

    PHP:
       $mysql serviceStatus('70.85.87.52'3306);

       if (
    $mysql == 'Online') { $color $green; } else { $color $red; }

       
    imagettftext($image10010100$white$font"MySQL Server:");

       
    imagettftext($image80105100$color$font2$status);
    Hope that helps.

    Oh also for this

    PHP:
    $red imagecolorallocate($image231180180);

    $green imagecolorallocate($image000000000);

    $white imagecolorallocate($image255255255);
    Ok, The first 3 digits are Red. The next 3 are Green. The last 3 are Blue

    Here is a link that you can find colors off of

    http://www.google.com/search?hs=sC2...:en-US:official&q=RGB+color+chart&btnG=Search
     
  19. Death

    Death New Member

    Messages:
    334
    Likes Received:
    0
    Trophy Points:
    0
    Ok...

    I didn't understand your words regarding call upon and stuff :s

    So I did this...I made a file.txt named myhits.txt and then placed the following code inside it:

    PHP:
     function views($name){
        
        
    $TextFile $name;
        
    $Count trim(file_get_contents($TextFile));
        
    $FP fopen($TextFile"r");
        
    $Count=fgets($FP4096);
        
    fclose ($FP);
        
    settype($Count"integer");
        
    $Count++;
        if (
    $FP fopen ($TextFile"w")){
        
    fwrite ($FP$Count);
        
    fclose ($FP);
        }
     return 
    $Count;
    }  
    and at one of the places in the signature...I placed the other code which is:
    PHP:
    $views views('myhits.txt');  
    Well when I did that it said "Image contains errors"...so Please let me know where i went wrong :S

    Thanks
     
  20. Matt

    Matt New Member

    Messages:
    1,862
    Likes Received:
    0
    Trophy Points:
    0
    That is really really cool. We should make one for the forums so people dont have to ask.
     

Share This Page