• 0

Dynamic Signatures


Question

How would I make a signature that allows users to put a piece of text into my signature? I know you can use PHP, but I don't have the slightest clue about PHP

(Apart from Cutenews stuff)

Could someone make me a saple signature, very plain, and show me how to allow users to imput text into it thru my website?

Edited by TimRogers
Link to comment
https://www.neowin.net/forum/topic/301987-dynamic-signatures/
Share on other sites

Recommended Posts

  • 0
OK, I'm hosting it on my personal website.

So now, we can use colors and load function :D, well done! I suggest you allow different line thicknesses and it'll be perfect!

585785726[/snapback]

Thanks!!! Hehe funny you mention about the line thicknesses, I was working on that last night but had a few problems. I've had to move from Flash 5 to Flash 6 and that means there are some adjustments I need to make in order to get the thickness thing. Stay tuned!

I'll PM you when I get time for then next version! Thanks again :)

  • 0
Thanks!!! Hehe funny you mention about the line thicknesses, I was working on that last night but had a few problems. I've had to move from Flash 5 to Flash 6 and that means there are some adjustments I need to make in order to get the thickness thing. Stay tuned!

I'll PM you when I get time for then next version! Thanks again :)

585786955[/snapback]

You're welcome! I'm impatient!

  • 0

Mine isnt working :( lol. I feel so embarassed :p

http://www.wizzyworld.com/externals/sig/ is it.

Okay, so when I click "Change Sig" it doesnt change? Or the image above it doesnt display the change? :/

Also, whats the /admin/ folder for? Its empty?!

Pete

Edited by TheTrainMan
  • 0
Mine isnt working :( lol. I feel so embarassed :p

http://www.wizzyworld.com/externals/sig/ is it.

Okay, so when I click "Change Sig" it doesnt change? Or the image above it doesnt display the change? :/

Also, whats the /admin/ folder for? Its empty?!

Pete

585793292[/snapback]

Ok. It seems in your config file you didn't change the text position: the text is outside the picture limits. Try something like:

// Text position
define( "DYN_SIG_X", 0  );   // Frop the left
define( "DYN_SIG_Y", 60 );   // From the top

I discovered a small bug so please delete your dyn_sig folder (you can save/keep your DAT files, your fonts and your pictures, but not the other files), download the latest version on my website, install it and configure/customize it.

  • 0

Since I get a lot of PM's from members recently asking if they can have the code of my dynamic sig, I decided to post it here.

You need a PHP server with GD for this.

1. Save the code as sig.php

2. Make sure the dir is CHMOD'ed to give write access (755)

3. Create your signature image without the dynamic text and save it in the same directory as 'sig.png'

4. This script has a swear filter, but Neowin won't allow me to post that. Just add your own words to the swear filter. Just make sure there are no * in the filter.

5. The script produces an image 'signature.png' with the added text. Every change is logged to a log file.

That's about it. You can add extra stuff to it, but this is as basic as you can get. Have fun with it...

<?php
// code by 505
if (isset($_POST['sigtext1']))
{
//die('Service disabled for now... Back soon.');
$im = imagecreatefrompng('sig.png');
$white = imagecolorallocate ($im, 255, 255, 255);
imagestring($im,3,123,43,filter($_POST['sigtext1']),$white);
imagestring($im,3,123,55,filter($_POST['sigtext2']),$white);
imagepng($im,'signature.png');

$handle = fopen('sig.log','a+');
fwrite($handle,"------------------\r\n");
fwrite($handle,"time: " . date('d F Y, H:i:s') . "\r\n");
fwrite($handle,"ip: " . $_SERVER['REMOTE_ADDR'] . "\r\n");
fwrite($handle,"line 1: " . $_POST['sigtext1'] . "\r\n");
fwrite($handle,"line 2: " . $_POST['sigtext2'] . "\r\n");
fclose($handle);
echo 'Changed';
}

function filter($s)
{
// array with forbidden words (swear filter)
$forbidden = array('****','****','ass','suck','######');

$s = str_replace("\'","'",$s);
$s = str_replace('\"','"',$s);

for ($i=0;$i<count($forbidden);$i++)
{
 $s = preg_replace("/$forbidden[$i]/i",string($forbidden[$i],'*'),$s);
}
return $s;
}

function string($s,$c)
{
for($i=0;$i<strlen($s);$i++)
 $r .= $c;
return $r;
}
?>
<html>
<head>
<title>Change signature</title>
<style>
body,td {font-size: 12px;}
input {border: 1px solid black; font-size: 10px}
</style>
</head>
<body onload="sigform.sigtext1.focus()">
<div align="center">

<img src="signature.png"><br>
<form name="sigform" method="post" action="sig.php">
<table>
<tr>
<td>Line 1:</td>
<td><input type="text" name="sigtext1" maxlength="20"></td>
</tr>
<tr>
<td>Line 2:</td>
<td><input type="text" name="sigtext2" maxlength="20"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Change signature"></td>
</tr>
</table>
</form>
Please do not abuse this service<br>
Stay within the <a href="https://www.neowin.net/forum/rules.htm" target="_blank">neowin.net community rules</a><br>
<small>Note: changes will be visible to everyone on the neowin site. Changes, date, time and your IP-address are logged to a logfile.</small>
</div>
</body>
</html>

  • 0
okay, i got it working now :D

Is there a way to make the text bigger?

585794547[/snapback]

Change the value of DYN_SIG_SIZE in your config.inc.php file.

You should glance at it, really.

Edit: suggestions don't seem to work on your website. Check your file permissions.

Edited by Sphinx Myth
  • 0

Here are some dynamic signitures I have made for some neowin members :)

I will also create signitures for others who send me a private message or PM :)

ph3412t3h13

sig.PNG

Click the above image to change what the angry kid says!

neomilan

top.PNG

bill.GIF

Click the above image to change what Bill Gates says!

sumeet

sig.PNG

Click the above image to change the text!!

williamhook

sig.PNG

Click the above image to change the text!!

If anyone wants me to make them their own dynamic signiture feel free to PM me, and I will create it for you asap! :)

  • 0

Okay, now pooped off :(

I tried to make my own index page, and now when i click "Change Signature" it doesnt do anything!

http://www.wizzyworld.com/externals/sig/

Can it not be made that the options are stored in the actual file?

EDIT: Well, because I am doing things, then it is working now, but i bet i'll get the design of the page right, and it wont work :(

Edited by TheTrainMan
  • 0

Okay, so it doesnt like being in a table right? Doesnt like CSS right?

Can someone not get it to work?

Okay, I want it in this design - http://www.wizzyworld.com/externals/sig/wanted_index.php

so, can anyone make it work for me?

Also, for some reason my "post.php" isnt showing the image anymore when the person has changed it.

I so nearly got the other one to work, and now i am working with a new one and it still isnt working, but i dont know why.

  • 0

I'm sorry but it really annoyed me.

i just dont understand it and cant see how it is being in a box when the code doesnt say there is a box there, and why doesnt it like it in a box or seem to want to support CSS. I just dont get whats stopping it :@ :anrgy:

  • 0
I'm sorry but it really annoyed me.

i just dont understand it and cant see how it is being in a box when the code doesnt say there is a box there, and why doesnt it like it in a box or seem to want to support CSS. I just dont get whats stopping it :@ :anrgy:

585796886[/snapback]

Where abouts did you place the CSS on your page?

is it something like this?

<html>
<head>
<style type="text/css">
<!--

CSS CODE RIGHT HERE!!! <----- 

-->
</style>
</head>
<body>

REST OF CODE HERE!!!   <-----

</body>
</html>

  • 0

Yo.

I hadn't thought it would be so difficult to include my script.

So, I rewrote some things, renamed a few constants (more understandable). The form is now in only one part (sig_form.php), not two as previously (index_sig.php & post.php). That will help you to make your custom page, I also included into the ZIP archive an example of custom page which includes the script. By default, the form sends the data to index.php.

Finally, I made a version of the script which saves the sig into a file. It's better if your sig doesn't use dynamic data (like dates, IP etc.), it renders only once the sig (every time you change the text) and saves it (img/sig.png by default). That saves a lot of CPU resources.

Dyn Sig

DON'T FORGET TO MODIFY YOUR CONFIG FILE!

Edited by Sphinx Myth
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • will EU users be getting the extra 1yr update for free again?
    • Samsung announces Galaxy A27 5G with 120Hz AMOLED display, expanded AI features, and more by Fiza Ali Samsung has announced the Galaxy A27 5G, its latest mid-range smartphone, bringing a handful of upgrades over last year's Galaxy A26 5G. While the changes aren't dramatic, they touch several areas that people tend to notice most in day-to-day use, including the display, performance, and software support. One of the more noticeable updates is the screen. The Galaxy A27 5G comes with a 6.7-inch Super AMOLED display that now supports a 120Hz refresh rate, making scrolling and animations appear smoother. Samsung has also switched to an Infinity-O punch-hole camera design, which leaves more room for the display and gives the phone a cleaner look from the front. Under the hood, the Galaxy A27 5G is powered by Qualcomm's Snapdragon 6 Gen 3 processor. The company says the new chip brings improved responsiveness in multitasking, gaming, and media consumption. The company also highlights GPU performance improvements and faster memory technology, which should contribute to smoother graphics rendering, quicker data handling, and improved power efficiency. Furthermore, Samsung has equipped the Galaxy A27 5G with a 12-megapixel selfie camera that is capable of capturing a wider dynamic range and more accurate colours. Like many smartphones launched recently, the Galaxy A27 5G also places a strong focus on AI features. Circle to Search with Google now supports multi-object recognition, making it easier to search for different products or items at the same time. The tech giant says the feature can also support virtual outfit try-ons directly from compatible search results. Photo editing tools are getting some attention as well, with Object Eraser updated to deliver cleaner edits when removing unwanted objects or people from images. Meanwhile, the Voice Recorder app can now transcribe and translate speech simultaneously in one of the 22 supported languages, which could be useful for meetings, lectures, or interviews. Samsung is also expanding AI assistant options on the device, with support for Google Gemini and Perplexity alongside Bixby. The company says these assistants will work more closely with Galaxy apps, including Gallery, to simplify common tasks. Samsung continues to strengthen its long-term software support policy with the Galaxy A27 5G. The smartphone will receive up to six generations of Android OS and One UI updates, along with six years of security patches from its initial global launch. In terms of security, the device includes Samsung Knox and Knox Vault, which are designed to help protect sensitive information stored on the phone. On the flip side, while the company is positioning the Galaxy A27 5G as a step forward from its predecessor, not every change is necessarily an upgrade. One of the first things buyers may notice is the higher price tag. The device launches at $349, making it $50 more expensive than the Galaxy A26 5G's $299 starting price. The selfie camera has also been reduced from 13MP to 12MP, while the ultrawide camera drops from 8MP to 5MP. Samsung has further downgraded the phone's dust and water resistance rating from IP67 to IP64. The Galaxy A27 5G is also marginally thicker at 7.8mm. The Galaxy A27 5G will be available in select markets starting July 3 and will come in four colour options, including Black, Blue, Light Green, and Light Pink. The company will also offer Samsung Care+ coverage plans for customers seeking additional device protection.
    • Doogee and Ulefone regularly release phones with 10k-25k mAh batteries, but those are bricks. I don't understand how they could make it only weigh 220 grams with a battery that size.
    • Windows 10 quietly gets one more year of support and updates by Taras Buria Windows 10 reached its end of life at the end of 2025. Microsoft kicked off the Extended Security Updates program, aimed at giving regular consumers one more year of security-only updates. By doing so, Microsoft gave users more time and money to update their computers to a newer operating system or compatible hardware. Now, with the end of the Extended Security Updates program quickly approaching, Microsoft is making an important adjustment. Users discovered that the official support article for the program now lists a new end-of-support date: The Extended Security Updates program is not a new concept. It has been an official way for business consumers to continue receiving critical updates for unsupported Microsoft products for many years. However, all this time, it was a business-only, paid feature. With Windows 10, Microsoft brought ESU to regular consumers, allowing them to get security updates for Windows 10 past October 2025 essentially for free. When Windows 10 was approaching the end of support, many guessed that Microsoft might adjust its support timelines, and this is exactly what seems to be happening. Of course, Microsoft would love everyone to switch to new computers, such as its latest Surface devices, but in the days of ever-growing hardware prices, not everyone is lucky enough to have money for a new PC. Leaving hundreds of millions of customers with a Windows version that no longer receives security updates is a major risk that Microsoft is not willing to take. If you have a Windows 10 PC to enroll in the Extended Security Updates program, check out this guide to learn how to do so.
    • Sony announces Bungie layoffs that will affect "significant number of employees" by Pulasthi Ariyasinghe Sony today announced that major layoffs are happening at its first-party studio Bungie, the developer that has spawned series like Halo, Destiny, and Marathon over the past decades. The news arrives just weeks after Bungie delivered the final update to Destiny 2, and it's that team being hit with the layoffs the most. CEO of Sony Interactive Entertainment Hermen Hulst revealed the staff reduction today, calling it "painful news." "Over the past several months, together with Bungie leadership, we reviewed the studio’s long-term direction, development priorities, resource needs, and role within our broader portfolio strategy," said Hulst, explaining the decision. "We explored multiple alternatives before concluding that a reduction was necessary to align the studio’s resources with its current priorities and long-term goals." The layoffs will be hitting "a significant number of employees" across most of the Destiny franchise development team. It doesn't look like Sony is planning to continue the series following Destiny 2's sunsetting update. The studio is said to be in early stages of looking at other projects to pivot to, but it's said that keeping the size of the team at current levels is no longer feasible. "We know this decision has a profound impact on the people affected, their families, friends, and teammates," said Bungie leadership in a separate message on social media. "While these changes are necessary to best position the studio now and for the future, that does not lessen the difficulty of this moment or the impact it has on those affected." At the same time, "some" of the Marathon development team are also affected by the layoffs. The recently released multiplayer-only extraction shooter title hasn't seen a big boom of players either, but the company is reportedly hoping that the live service experience will pick up players with future updates.
  • Recent Achievements

    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      438
    2. 2
      +Edouard
      168
    3. 3
      PsYcHoKiLLa
      133
    4. 4
      Xenon
      77
    5. 5
      Michael Scrip
      75
  • Tell a friend

    Love Neowin? Tell a friend!