2006-03-17, 09:35 AM
2006-03-17, 09:28 PM
You can't modify a JPEG with php.
2006-03-31, 10:21 PM
i cant get it... i try, but nothing
i open the mybbsig.php file
change the URL to
then, i upload the mybbsig.php and mybbsig.png files to my forum direcrtory
but when i wanna to see it i get this:
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
2006-03-31, 11:40 PM
Did you change any of the code, besides the URL's?
2006-03-31, 11:57 PM
nop...
look, this is how the php code looks:
look, this is how the php code looks:
<?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);
?>
2006-04-01, 01:08 AM
You changed the .png file to the .php file.
Use this exact code:
Use this exact 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);
?>
2006-04-01, 01:24 AM
nop, nothing... still doesnt work
2006-04-01, 03:00 AM
prutsor Wrote:This is mine:
@muphil:
You can control the position of the text with some numbers.
Open the php file and have a look.
The bold number controls the vertical position of the text. Try to increase it to 25 or 30ImageString ($img_handle, 3, 10, [b]10[/b], "Total Members: $totalmembers", $color);
Just play with it and you will find the right position.
What do the other numbers signify?
2006-04-01, 03:15 AM
MaRio Wrote:
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.
2006-04-01, 03:16 AM
RaptorMoonX Wrote:prutsor Wrote:This is mine:
@muphil:
You can control the position of the text with some numbers.
Open the php file and have a look.
The bold number controls the vertical position of the text. Try to increase it to 25 or 30ImageString ($img_handle, 3, 10, [b]10[/b], "Total Members: $totalmembers", $color);
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)