How I Made My Signature

Death

New Member
Messages
334
Reaction score
0
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:
B

Brandon

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

Bryon

I Fix Things
Messages
8,149
Reaction score
101
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.
 

dharmil

New Member
Messages
1,656
Reaction score
0
Points
0
NedreN said:
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.


its alright

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

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.
 

Death

New Member
Messages
334
Reaction score
0
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!
 

dharmil

New Member
Messages
1,656
Reaction score
0
Points
0
k do this
give me a pic you want as background an i iwll make it for you...
 

Death

New Member
Messages
334
Reaction score
0
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:

dharmil

New Member
Messages
1,656
Reaction score
0
Points
0
Enigma said:
I just played around with it.


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

Death

New Member
Messages
334
Reaction score
0
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?
 

Death

New Member
Messages
334
Reaction score
0
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
 
B

Brandon

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

Death

New Member
Messages
334
Reaction score
0
Points
0
Ok I will...

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

Thanks
 

Chris S

Retired
Messages
2,055
Reaction score
1
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($FP, 4096);
	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($image, 10, 0, 10, 100, $white, $font, "MySQL Server:");

   imagettftext($image, 8, 0, 105, 100, $color, $font2, $status);

Hope that helps.

Oh also for this

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

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

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

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
 

Death

New Member
Messages
334
Reaction score
0
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($FP, 4096);
    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
 

Matt

New Member
Messages
1,862
Reaction score
0
Points
0
That is really really cool. We should make one for the forums so people dont have to ask.
 
Top