Heres my code ( )


//site-specific code removed

// set path below to phpBB files
$phpbb_root_path = "../../../";

include($phpbb_root_path . '');
include($phpbb_root_path . 'common.'.$phpEx);

$uid = preg_replace('/[^\d]/','',$_GET['uid']);
$sql = "SELECT * FROM forum_users WHERE user_id = '" . $uid . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

$ih = imagecreatefrompng("base.png");
$red = imagecolorallocate($ih, 128, 0, 0);
$green = imagecolorallocate($ih, 0, 128, 0);
$black = imagecolorallocate($ih, 0, 0, 0);
$white = imagecolorallocate($ih, 255, 255, 255);
$gray = imagecolorallocate($ih, 128, 128, 128);
$lightgray = imagecolorallocate($ih, 200, 200, 200);
$hostPath = $_SERVER['DOCUMENT_ROOT'];
$ttfArial = "/fonts/arial.ttf";
$ttfVisitor = "/fonts/visitor1.ttf";
if (isset($row['user_custom_title']) && $row['user_custom_title'] != NULL) { $title = $row['user_custom_title'];
} else if ($row['user_rank'] != 0 && $row['user_rank'] != NULL && isset($row['user_rank'])) {
   $sql = "SELECT rank_title FROM forum_ranks WHERE rank_id = '" . $row['user_rank'] . "'";
   $result = $db->sql_query($sql);
   $row2 = $db->sql_fetchrow($result);
   $title = $row2[0];
} else {
   $sql = "SELECT * FROM forum_ranks WHERE rank_special <> '1'";
   $result = $db->sql_query($sql);
   while ($row2 = $db->sql_fetchrow($result))
      if ($row2['rank_min'] < $row['user_posts']) { $title = $row2['rank_title']; }
$fitten = time()-900;
$sql = "SELECT * FROM forum_sessions WHERE session_user_id = '" . $row['user_id'] . "' AND session_time > '$fitten'";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) == 0)
   $status = 'OFFLINE';
} else {
   $status = 'ONLINE';
   imagettftext ($ih, 10, 0, 2, 16, $black, $ttfArial, $row['username'] . " is " . $status);
   imagettftext ($ih, 9, 0, 215, 21, $black, $ttfArial, "Rank: " . $title . "");
   imagettftext ($ih, 9, 0, 215, 31, $black, $ttfArial, $row['user_posts'] . " posts written");

$width = 350;
$height = 38;
header("Content-type: image/png");


Mostly, I dont know were the image outputs... I cant figure out how to get _my_ sig

like sig.php?uid=2 or something.
Try this change:

$ttfArial = "/fonts/arial.ttf";
$ttfVisitor = "/fonts/visitor1.ttf";


$hostPath = $_SERVER['DOCUMENT_ROOT'];
$ttfArial = $hostPath . "/fonts/arial.ttf";
$ttfVisitor = $hostPath . "/fonts/visitor1.ttf";
No, that was the prob at first, I fixed the font problem. Its up now mostly, I just need help getting my name on that sig. lol
I think your user table may not be forum_users. It might be users, or somethingelse_users.
oh ok, well, once I change it, what is the url for my sig?
sig.php?uid=2 or something?
Precisely. If you want phpBB to accept it as a signature, you'll need to htaccess redirect it to a png image.
oh.... crap...

Well how do I show my name and statistics on it?
The the forum users table correctly, as I said.
oh ok, and it would just be sig.php?uid=2 or something?
Correct. Ah, I see that you got it working. Might i recommend white text?
Good Idea Razz

Still changing it around

Never worked with htaccess really, can I get some help?
here is the one I use for my avatar script (or what elf set for me I should say).

Redirect /avatar/signature/img.gif

I hope this helps.
So would this work?

Redirect /avatar/signature/img.gif

So how would I include whats after the uid?
that is about all I know is what I posted, but I will tell you, your exact thing wouldn't work as my script works different.

Edit: ok, did a test on my server

Redirect /test/file.ext

and test .php

<?php echo $test; ?>

and when you type


test.php wrote:

I hope this helps.
Nope, that's not it. Here's an example of one of my htaccess files.

RewriteEngine On
RewriteRule ^sig/([0-9]+).png misc/sig.php?$1
And I could change that to this right?

RewriteEngine On
RewriteRule /home/virtual/site64/fst/var/www/counter-strike/templates/subSilver/sig_userbars/finished_sig/([0-9]+).png /home/virtual/site64/fst/var/www/counter-strike/templates/subSilver/sig_userbars/sig.php?uid=$1

or would I have to do something like with the ../'s




Err... I get this error:
The connection to the server was reset while the page was loading.

when using the first one I posted.

Thank god I backed up my site like 30 mins ago. But omfg, my server crashed! I cant believe this!

EDIT:: Its back up, thank god. But still cant get this gay thing to work...

EDIT:: It worked.. somewhat. It wont show my user though, its just the basic template. I gotta goto school, I will work on it more once I get home.

EDIT:: Worked! Thanks Guys Very Happy
Good job. Hope you enjoy expanding and working with it.
Most def. I am working on a way to add a watermark of the rank in the bg. Cool
just do semitransparent, large font size text. It couldn't be that hard, really.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum