Dynamic-Sig.com BETA Powered by:
February 06, 2012, 03:33:27 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Don't forget that you need to download our client program to be able to use your signature image. Click here to download the client program.
 
  Home   Forum   Help Search Login Register About Dynamic-Sig.com  
Pages: [1] 2
  Print  
Author Topic: Some Questions and Thoughts  (Read 5518 times)
brianjw
Newbie
*
Posts: 9


« on: June 05, 2007, 11:20:03 PM »

I would love to use this dynamic signature thing on my website. I have modified my gamer card and would like it to do something like this:

-Where it says '-Username Here-' it actually displays the members display name (not username).
-Where it says 'Rep' put the + and - karma of that member.
-Where it says 'Posts' put the number of posts the member has made on the website.
-Where it says 'Gender' put the image for the male or the female.
-Where it says '-Latest 4 Arcade Games Played-' Put the 4 biggest images of arcade games possible and show the latest the member has played.
-Where you see that avatar, put the members avatar. If they have no avatar display an image that says No Avatar and that goes with the colors of the sig.

It looks like this.


I've already added the powered by in it and I am willing to pay for this.

Let me know what you can do with this.
I also would like this sig to be added to their signature automatically when they register and they can take it off if they want. Wink

THANKS SO MUCH Smiley
Brianjw
« Last Edit: July 02, 2007, 10:13:00 PM by brianjw » Logged
Daniel15
Owner of this site :D
Administrator
Jr. Member
*****
Posts: 96

208646779
WWW
« Reply #1 on: July 07, 2007, 08:58:04 PM »

So, you want a custom-coded signature system for your site? It wouldn't really be powered by Dynamic-Sig.com anymore, would it? Wink
Logged

brianjw
Newbie
*
Posts: 9


« Reply #2 on: July 08, 2007, 02:20:24 AM »

So, you want a custom-coded signature system for your site? It wouldn't really be powered by Dynamic-Sig.com anymore, would it? Wink
Yes I would like a custom coded signature. Ok, so should I remove the powered by?
I will pay for this if you'd like as well Wink
Logged
Jacen
Newbie
*
Posts: 25


Email
« Reply #3 on: July 08, 2007, 02:37:40 PM »

So, you want a custom-coded signature system for your site? It wouldn't really be powered by Dynamic-Sig.com anymore, would it? Wink

It would if it's hosted here Wink (which defeats the purpose if I get what he wants Tongue)

But other then that, I don't think it'd be too hard to write a mod/addon for SMF to do something like that, would it?
Logged



Daniel15
Owner of this site :D
Administrator
Jr. Member
*****
Posts: 96

208646779
WWW
« Reply #4 on: July 08, 2007, 04:23:28 PM »

I made a post on the SMF Community Forum about this a while ago...
My original post (from http://www.simplemachines.org/community/index.php?topic=173099.msg1105614#msg1105614)
Quote from: Daniel15
Here you go, an example script that does exactly this Smiley. You'll need to save the "Verdana" font in your SMF directory as "verdana.ttf" (if you don't have it, get it from http://www.dynamic-sig.com/fonts/verdana.ttf). All the text it uses is in an array at the top (I did it this way to simplify the code, and to make the code easy to understand Smiley). To display more information, just add more elements to the array (check Sources/Load.php under // What a monstrous array... for a full list of everything you could use)

Code:
<?php
error_reporting
(E_ALL);
require(
'SSI.php');

// From php.net
// Convert the results returned by imagettfbbox into useful results :).
function fixbbox($bbox)
{
$xcorr -$bbox[6]; // northwest X
$ycorr $bbox[7]; // northwest Y
$tmp_bbox['left'] = $bbox[6] + $xcorr;
$tmp_bbox['top'] = $bbox[7] + $ycorr;
$tmp_bbox['width'] = $bbox[2] + $xcorr;
$tmp_bbox['height'] = $bbox[3] + $ycorr;

return $tmp_bbox;
}

// Make sure we have a numeric ID.
$_GET['id'] = (int) $_GET['id'];
// Load this user's information.
loadMemberData($_GET['id']);
loadMemberContext($_GET['id']);
// OK, I'm a little lazy... This is too hard to type out all the time :P
$user = &$memberContext[$_GET['id']];

$text = array(
// A line.
array(
// Segment of the line.
array(
'colour' => array(00255),
'text' => 'Username: ',
),
array(
'colour' => array(000),
'text' => $user['name'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Member group: ',
),
array(
'colour' => array(000),
'text' => $user['group'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Registered: ',
),
array(
'colour' => array(000),
'text' => $user['registered'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Last Login: ',
),
array(
'colour' => array(000),
'text' => strip_tags($user['last_login']),
),
),

array(
array(
'colour' => array(00255),
'text' => 'Post count: ',
),
array(
'colour' => array(000),
'text' => $user['posts'],
),
),
);


// Font to use.
$font '/var/www/smf/1-1/verdana.ttf';
// Font size.
$size 9;

// Start with a blank image.
$im imagecreate(600300);
// Or, start with a background image (comment line above, uncomment line below)
//$im = imagecreatefrompng('frihost-irc-1.png');

// The background colour.
// Whilst this will not be seen, it's used for antialiasing.
$back imagecolorallocate($im255255255);

// Make the image transparent.
imagecolortransparent($im$back);
imagealphablending($imtrue);

$y 15;
// Bounding box of sample line in this font
$mainBound fixbbox(imagettfbbox($size0$font"test text 123456789 QWERTYUIIOPASDFGHJKKLZXCVBNM"));
// Get the height of the tallest letter in this font
$incY $mainBound['height'] + 1;

// Loop through every line...
foreach ($text as $line)
{
$nextPos 0;
$x 10;
// Every bit in this line.
foreach ($line as $piece)
{
// The colour we need.
$colour imagecolorallocate($im$piece['colour'][0], $piece['colour'][1], $piece['colour'][2]);
// Output this bit of text.
imagettftext($im$size0$x $nextPos$y$colour$font$piece['text']);
// Get its bounding box.
$imageBound fixbbox(imagettfbbox($size0$font$piece['text']));
// The next position.
$nextPos += $imageBound['width'];
}
$y += $incY;
}

// Disable caching
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
// A GIF is used so that the transparency works in IE.
header ("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
?>


Access it like: http://yoursite.com/forum/signature.php?id=1

If you want nice URLs, add this to a .htaccess file in your forum directory:
Code:
RewriteEngine on
RewriteRule ^sigs/([0-9]+).gif$ signature.php?id=$1
And then access it via http://yoursite.com/forum/sigs/1.gif Smiley
(the code is a hugely simplified version of the code used for the signatures on Dynamic-Sig.com, by the way Wink)

You could probably modify this to do what you want (I don't really have time to do that, though Tongue).

Hope this helps you! Cheesy
« Last Edit: July 08, 2007, 04:25:08 PM by Daniel15 » Logged

brianjw
Newbie
*
Posts: 9


« Reply #5 on: July 09, 2007, 07:02:14 AM »

I am not too farmiliar with modifying stuff like this and getting exactly what I want. I will wait as long as it takes for eventually your schedule to be free Smiley
Logged
Daniel15
Owner of this site :D
Administrator
Jr. Member
*****
Posts: 96

208646779
WWW
« Reply #6 on: July 09, 2007, 02:07:48 PM »

I am not too farmiliar with modifying stuff like this and getting exactly what I want. I will wait as long as it takes for eventually your schedule to be free Smiley
That will take a long time - I've always got stuff to do (I really need to work on SMFShop, I really haven't done anything on it since January this year)
Logged

brianjw
Newbie
*
Posts: 9


« Reply #7 on: July 14, 2007, 10:20:29 AM »

Ok you do that. Smiley But maybe when you have some time lol do this Smiley
Logged
brianjw
Newbie
*
Posts: 9


« Reply #8 on: August 10, 2007, 07:14:59 AM »

Do you have time lol? I really want this Smiley
Logged
Blaster
Jr. Member
**
Posts: 85


« Reply #9 on: August 18, 2007, 03:01:28 AM »

Some very interesting ideas and thoughts. But you have to understand how long it takes and how much time he has. Daniel has a life you know Smiley
Logged

First person to test out a dynamic sig... before this site was even up.
Jacen
Newbie
*
Posts: 25


Email
« Reply #10 on: August 21, 2007, 01:47:44 AM »

If you really want it, learn PHP and do it yourself Smiley I'm assuming Daniel has a life, friends, family, work, outside of Dynamic-Sig.com so... he might not have the time to do anything for this site.

I'm not trying to sound mean or rude or anything... but understand that as programmers, we are NOT gods... we do have other responsbilities. (Even worse if Daniel is married Tongue)
Logged



Daniel15
Owner of this site :D
Administrator
Jr. Member
*****
Posts: 96

208646779
WWW
« Reply #11 on: August 24, 2007, 06:00:13 PM »

Quote
Even worse if Daniel is married )
Haha Tongue
I guess you don't know how old I am?
Check my profile Wink

Quote
I'm assuming Daniel has a life, friends, family, work, outside of Dynamic-Sig.com so... he might not have the time to do anything for this site.
Yeah, school takes up heaps of my time... I don't have much time to work on this site or any of my other sites.
Logged

brianjw
Newbie
*
Posts: 9


« Reply #12 on: September 17, 2007, 05:01:19 AM »

Well I think I know a way to make it a little faster and easier on you. The following code looks almost exactly how I want my thing to work
Code:
<?php
error_reporting
(E_ALL);
require(
'SSI.php');

// From php.net
// Convert the results returned by imagettfbbox into useful results :).
function fixbbox($bbox)
{
   
$xcorr -$bbox[6]; // northwest X
   
$ycorr $bbox[7]; // northwest Y
   
$tmp_bbox['left'] = $bbox[6] + $xcorr;
   
$tmp_bbox['top'] = $bbox[7] + $ycorr;
   
$tmp_bbox['width'] = $bbox[2] + $xcorr;
   
$tmp_bbox['height'] = $bbox[3] + $ycorr;
   
   return 
$tmp_bbox;
}

// Make sure we have a numeric ID.
$_GET['id'] = (int) $_GET['id'];
// Load this user's information.
loadMemberData($_GET['id']);
loadMemberContext($_GET['id']);
// OK, I'm a little lazy... This is too hard to type out all the time :P
$user = &$memberContext[$_GET['id']];

$text = array(
// A line.
array(
// Segment of the line.
array(
'colour' => array(00255),
'text' => 'Username: ',
),
array(
'colour' => array(000),
'text' => $user['name'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Member group: ',
),
array(
'colour' => array(000),
'text' => $user['group'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Registered: ',
),
array(
'colour' => array(000),
'text' => $user['registered'],
),
),

array(
array(
'colour' => array(00255),
'text' => 'Last Login: ',
),
array(
'colour' => array(000),
'text' => strip_tags($user['last_login']),
),
),

array(
array(
'colour' => array(00255),
'text' => 'Post count: ',
),
array(
'colour' => array(000),
'text' => $user['posts'],
),
),
);


// Font to use.
$font '/var/www/smf/1-1/verdana.ttf';
// Font size.
$size 9;

// Start with a blank image.
$im imagecreate(600300);
// Or, start with a background image (comment line above, uncomment line below)
//$im = imagecreatefrompng('frihost-irc-1.png');

// The background colour.
// Whilst this will not be seen, it's used for antialiasing.
$back imagecolorallocate($im255255255);

// Make the image transparent.
imagecolortransparent($im$back);
imagealphablending($imtrue);

$y 15;
// Bounding box of sample line in this font
$mainBound fixbbox(imagettfbbox($size0$font"test text 123456789 QWERTYUIIOPASDFGHJKKLZXCVBNM"));
// Get the height of the tallest letter in this font
$incY $mainBound['height'] + 1;

// Loop through every line...
foreach ($text as $line)
{
$nextPos 0;
$x 10;
// Every bit in this line.
foreach ($line as $piece)
{
// The colour we need.
$colour imagecolorallocate($im$piece['colour'][0], $piece['colour'][1], $piece['colour'][2]);
// Output this bit of text.
imagettftext($im$size0$x $nextPos$y$colour$font$piece['text']);
// Get its bounding box.
$imageBound fixbbox(imagettfbbox($size0$font$piece['text']));
// The next position.
$nextPos += $imageBound['width'];
}
$y += $incY;
}

// Disable caching
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
// A GIF is used so that the transparency works in IE.
header ("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
?>


It just needs some modifying so it can display the arcade things and karma, etc. How would I modify the registration page so it autmatically has this sig when they register and they can take it off?
Logged
Jacen
Newbie
*
Posts: 25


Email
« Reply #13 on: September 19, 2007, 01:38:50 PM »


Haha Tongue
I guess you don't know how old I am?
Check my profile Wink
Hey, I've known kids that got married about 14/15 Tongue (Rare through)
Logged



Blaster
Jr. Member
**
Posts: 85


« Reply #14 on: September 23, 2007, 03:15:50 PM »

I'm assuming Daniel has a life, friends, family, work, outside of Dynamic-Sig.com

yea he also has www.daniel15.com and www.dansoftaustralia.net
Logged

First person to test out a dynamic sig... before this site was even up.
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines
Dynamic-Sig.com version 0.6 ©2006–2007 Daniel15.
Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 13 queries.