Thread Rating:
  • 4 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MyBB Signature v1.0
#31
Why you take an PNG Picture for this? The Sig would be very smaller if you use the jpg type.
Greetings,
Patrick
-------------
http://www.MyBB-Themes.com
-------------
no support via PM!
Reply
#32
You can't modify a JPEG with php.
Reply
#33
i cant get it... i try, but nothing

i open the mybbsig.php file

change the URL to

Code:
marioca5198pe.iespana.es/mybbsig.php

then, i upload the mybbsig.php and mybbsig.png files to my forum direcrtory

but when i wanna to see it i get this:

Code:
in ESP: La imagen http://marioca5198pe.iespana.es/mybbsig.php no puede mostrarse, porque contiene errores.

in ING: The image http://marioca5198pe.iespana.es/mybbsig.php cant be show, cause contain errors
[Image: banner468x60.jpg]
------
[Image: bluelogo2.gif]
Reply
#34
Did you change any of the code, besides the URL's?
Reply
#35
nop...

look, this is how the php code looks:

Code:
<?php

/**
* MyBB Signature v1.0
* Copyright ?2006 CreateMyBB, All Rights Reserved
*
* Website: http://www.createmybb.com
* Created by Adam of CreateMyBB.com
*/

//Start Code by Michael83
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);
//End Code by Michael83


require "./global.php";

//Total Members
$total_members_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."users");
$total_members_result = mysql_num_rows($total_members_sql);

//Total Posts
  $total_posts_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."posts");
  $total_posts_result = mysql_num_rows($total_posts_sql);

//Newest Member
  $newest_member_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."users ORDER BY `uid` DESC LIMIT 0 , 1");
  $newest_member_result = mysql_fetch_array($newest_member_sql);


//Total Threads
  $total_threads_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."threads");
  $total_threads_result = mysql_num_rows($total_threads_sql);

Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG("http://marioca5198pe.iespana.es/mybbsig.php");
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$totalmembers = "$total_members_result";
$newestmember = "$newest_member_result[username]";
$totalposts = "$total_posts_result";
$totalthreads = "$total_threads_result";
ImageString ($img_handle, 3, 10, 10,  "Total Members: $totalmembers", $color);
ImageString ($img_handle, 3, 10, 40,  "Newest Member: $newestmember", $color);
ImageString ($img_handle, 3, 200, 10,  "Total Posts: $totalposts", $color);
ImageString ($img_handle, 3, 200, 40,  "Total Threads: $totalthreads", $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
[Image: banner468x60.jpg]
------
[Image: bluelogo2.gif]
Reply
#36
You changed the .png file to the .php file. Toungue

Use this exact code:

Code:
<?php

/**
* MyBB Signature v1.0
* Copyright ?2006 CreateMyBB, All Rights Reserved
*
* Website: http://www.createmybb.com
* Created by Adam of CreateMyBB.com
*/

//Start Code by Michael83
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);
//End Code by Michael83


require "./global.php";

//Total Members
$total_members_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."users");
$total_members_result = mysql_num_rows($total_members_sql);

//Total Posts
$total_posts_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."posts");
$total_posts_result = mysql_num_rows($total_posts_sql);

//Newest Member
$newest_member_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."users ORDER BY `uid` DESC LIMIT 0 , 1");
$newest_member_result = mysql_fetch_array($newest_member_sql);


//Total Threads
$total_threads_sql = mysql_query("SELECT * FROM ".TABLE_PREFIX."threads");
$total_threads_result = mysql_num_rows($total_threads_sql);

Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG("http://marioca5198pe.iespana.es/mybbsig.png");
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$totalmembers = "$total_members_result";
$newestmember = "$newest_member_result[username]";
$totalposts = "$total_posts_result";
$totalthreads = "$total_threads_result";
ImageString ($img_handle, 3, 10, 10, "Total Members: $totalmembers", $color);
ImageString ($img_handle, 3, 10, 40, "Newest Member: $newestmember", $color);
ImageString ($img_handle, 3, 200, 10, "Total Posts: $totalposts", $color);
ImageString ($img_handle, 3, 200, 40, "Total Threads: $totalthreads", $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
Reply
#37
Confused

nop, nothing... still doesnt work
[Image: banner468x60.jpg]
------
[Image: bluelogo2.gif]
Reply
#38
prutsor Wrote:This is mine:
[Image: mybbsig.php]

@muphil:
You can control the position of the text with some numbers.
Open the php file and have a look.
Code:
ImageString ($img_handle, 3, 10, [b]10[/b],  "Total Members: $totalmembers", $color);
The bold number controls the vertical position of the text. Try to increase it to 25 or 30
Just play with it and you will find the right position.

What do the other numbers signify?
[Image: siggy1eh.png]
Reply
#39
MaRio Wrote:Confused

nop, nothing... still doesnt work

You had to have changed something else.. did you CHMOD the .png file to 777? You usually don't have to do this, though.

Reply
#40
RaptorMoonX Wrote:
prutsor Wrote:This is mine:
[Image: mybbsig.php]

@muphil:
You can control the position of the text with some numbers.
Open the php file and have a look.
Code:
ImageString ($img_handle, 3, 10, [b]10[/b],  "Total Members: $totalmembers", $color);
The bold number controls the vertical position of the text. Try to increase it to 25 or 30
Just play with it and you will find the right position.

What do the other numbers signify?

ImageString ($img_handle, int font, int x, int y, "Total Members: $totalmembers", $color)

(int font means the font size as an integer, and you can figure out the rest)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)