» Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next
» View previous topic :: View next topic  
Kerm, you mind giving me the code? Smile
The code for what? I didn't make the signature bar generator.... oh, you mean the Cemetech one. Sure, you're welcome to it. I'll put it in the code repository when I make that.
ok cool, thanks Kerm Smile
Here you go - enjoy it.
Code:
<?php
define('IN_PHPBB',true);

//site-specific code removed

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

include($phpbb_root_path . 'extension.inc');
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("forumsigbase.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 = $hostPath . "/files/arial.ttf";
$ttfVisitor = $hostPath . "/files/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)
{
   imagettftext ($ih, 10, 0, 184, 37, $red, $ttfVisitor, 'OFFLINE');
} else {
   imagettftext ($ih, 10, 0, 184, 37, $green, $ttfVisitor, 'ONLINE');
}
   imagettftext ($ih, 12, 0, 2, 12, $black, $ttfVisitor, $row['username'] . ' (' . $title . ')');
   imagettftext ($ih, 10, 0, 32, 22, $black, $ttfArial, $row['user_wordcount'] . ' words posted');
   imagettftext ($ih, 10, 0, 32, 32, $black, $ttfArial, $row['user_posts'] . " posts written");
   imagettftext ($ih, 8, 0, 240, 36, $black, $ttfArial, "@ www.Cemetech.net");
$width = 350;
$height = 38;
header("Content-type: image/png");
imagepng($ih);
imagedestroy($ih);

?>
Awsome Very Happy

Thanks again Kerm Smile

Does this work with phpBB in general?
Nope, the wordcount thing is Cemetech-specific. Also, you'll need to find my two fonts (or download them from me if you can find them Cool ), and point to them correctly.
hmm, I wonder if I could do something like this for my forum, it would be interesting to have.
Easily. Just modify it and the background image to fit your needs. I could help you if you got lost.
even in the fact that I use IPB?
KermMartian wrote:
Nope, the wordcount thing is Cemetech-specific. Also, you'll need to find my two fonts (or download them from me if you can find them Cool ), and point to them correctly.

What the fonts? Too easy Cool
just got done dloading them from cemetech 0x5

I can take the word count thing out, and maybe tweek/add some other stuff too.
Thanks alot Kerm Smile
No problem. Oh, and don't forget the 38x350 pixel background image.
Yah, was just looking at that. Once I finish mine, I will post it up.
kk. Feel free to share your userbar when you finish it; I'd like to see what you come up with.
Wow, I really like that download Netham! Where did you find it?

It is a lot more convenient thatn the online one (atleast for making fast ones). Also more customizeable.
Eh, I like the control that the online one provides. I've tried that offline one and wasn't as happy with it.
Harq wrote:
Wow, I really like that download Netham! Where did you find it?

It is a lot more convenient thatn the online one (atleast for making fast ones). Also more customizeable.


I was going to go to the online one, but it was dead, so I googled "Userbar Sig Generator" or something like that.
The online one is not actually dead, dude, it must have been encountering downtime or something.
I some what liked the offline one. Though you could not input your own colors. When I tried inputting into the RGB, it just ignored it Wink

I think if there were a bit diff things, then it would be better. Like maybe RGB, HEX, and HLS input. Cause it sucks having to input it with just the little pointer.
I agree. Anyway, it's good to know there are more options out there. Anyone made something neat with either tool lately?
Only something extremely basic, here it is.




Created with the offline thingy

Its for my CS clan. Thinking of changing the name, it was originaly for a halo clan.
Anyone with a good clan name I could use? Laughing
  
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
» Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next
» View previous topic :: View next topic  
Page 16 of 17
» 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

 

Advertisement