• 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

    • Dude, im talking about simply disable it from settings app. Because of the eu regulation, you could disable it here for years.
    • One big question about Mars was answered thanks to Einstein's 100 year old theory by Sayan Sen Image via DepositPhotos Scientists at the U.S. National Institute of Standards and Technology (NIST) have calculated how time passes on Mars compared with Earth, adding detail to how timekeeping would need to work beyond Earth’s orbit. The study, published in The Astronomical Journal, found that clocks on Mars run an average of 477 microseconds, or millionths of a second, faster per day than clocks on Earth. A microsecond is one millionth of a second, a very small unit used in precise scientific timing systems such as atomic clocks, which measure time using consistent atomic behavior. This difference is not constant. Because Mars moves around the Sun in a non-circular path (an eccentric orbit, meaning its distance from the Sun changes over time instead of staying fixed) and is affected by gravity from other bodies, the daily difference can vary by as much as 226 microseconds over a Martian year. The study also identifies smaller repeating changes of about 40 microseconds per day linked to synodic cycles (repeating periods that describe how planets line up with each other as they orbit the Sun from different positions). These longer patterns affect how time differences slowly rise and fall. To make these estimates, researchers compared Mars with Earth and the Moon. The work looks at relativistic proper time (the time actually measured by a clock depending on its speed and the strength of gravity where it is located, as described in Einstein’s relativity). This shows that each world has its own slightly different “rate” of time. This becomes more important as space missions expand into cislunar space (the region between Earth and the Moon) and toward Mars. On Earth, time systems rely on atomic clocks and satellites, which stay closely synchronized for navigation and communication. The study is based on Albert Einstein’s theory of relativity, which shows that time is affected by gravity and motion. Stronger gravity makes clocks run slower, while weaker gravity makes them run faster. “The time is just right for the Moon and Mars,” said NIST physicist Bijunath Patla. “This is the closest we have been to realizing the science fiction vision of expanding across the solar system.” A day on Mars is about 40 minutes longer than on Earth, and a Martian year lasts 687 Earth days. But the main question is not just about days and years, but how fast time itself passes. An atomic clock placed on Mars would function normally, but compared with one on Earth, the two would slowly drift apart due to differences in gravity and motion. This requires careful calculation of what is similar to a time-zone difference across planets. Researchers modeled Mars using a reference surface and included gravitational effects from the Sun, Earth, the Moon, and other planets. This includes a multi-body gravitational system (often described as a three-body or four-body problem, where predicting motion becomes difficult because multiple large objects all pull on each other at the same time through gravity). Mars also follows a Keplerian orbit (an idealized elliptical orbit based on simple gravitational laws that assume smooth motion, before adding real-world disturbances from other bodies). In addition, the researchers accounted for solar tides (small changes in gravitational force caused by the Sun that slightly distort planetary motion and timing, especially in systems involving Earth and the Moon). These combined effects are described as relativistic proper-time offsets (small but measurable differences in elapsed time between locations caused by gravity and motion), which must be included when comparing clocks across planets. “But for Mars, that’s not the case. Its distance from the Sun and its eccentric orbit make the variations in time larger. A three-body problem is extremely complicated. Now we’re dealing with four: the Sun, Earth, the Moon and Mars,” Patla explained. “The heavy lifting was more challenging than I initially thought.” Although the differences are extremely small, they matter for navigation and communication systems that depend on precise timing. Even modern networks on Earth, such as mobile systems, rely on timing accuracy at very small fractions of a second. Communication between Earth and Mars currently takes about four to 24 minutes or more depending on planetary positions, meaning signals are not real-time. A shared and accurate time system could help future missions reduce confusion in navigation and data exchange. “If you get synchronization, it will be almost like real-time communication without any loss of information. You don’t have to wait to see what happens,” Patla said. Researchers note that fully developed interplanetary communication networks are still far in the future. However, understanding how time behaves across planets helps prepare for those systems. “It may be decades before the surface of Mars is covered by the tracks of wandering rovers, but it is useful now to study the issues involved in establishing navigation systems on other planets and moons,” said Neil Ashby. “Like current global navigation systems like GPS, these systems will depend on accurate clocks, and the effects on clock rates can be analyzed with the help of Einstein’s general theory of relativity.” Patla added that the results also help improve understanding of time itself under relativity. “It's good to know for the first time what is happening on Mars timewise. Nobody knew that before. It improves our knowledge of the theory itself, the theory of how clocks tick and relativity,” he said. Source: NIST, IOPscience This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • TeraCopy 4.0 Build 26 by Razvan Serea TeraCopy is a compact program designed to copy and move files at the maximum possible speed, also providing you with a lot of features. Copy files faster. TeraCopy uses dynamically adjusted buffers to reduce seek times. Asynchronous copy speeds up file transfer between two physical hard drives. Pause and resume transfers. Pause copy process at any time to free up system resources and continue with a single click. Error recovery. In case of copy error, TeraCopy will try several times and in the worse case just skips the file, not terminating the entire transfer. Interactive file list. TeraCopy shows failed file transfers and lets you fix the problem and recopy only problem files. Shell integration. TeraCopy can completely replace Explorer copy and move functions, allowing you work with files as usual. TeraCopy is free for non-commercial use only. For commercial use you need to buy a license. The paid version of the program includes the following features: Copy/move to your favorite folders. Save reports as HTML and CSV files. Select files with the same extension/folder. Remove the selected files from the copy queue. TeraCopy 4.0 Build 26 changelog: Added support for receiving files via the LocalSend protocol. Improved exception handling and automated bug report upload. Fixed several minor bugs and small memory leaks. Build 26 (June 24) Fixed a rare exception when a transfer completed. Features added since version 3.17: Enhanced speed graph. New multi-threaded copy engine. Support for copying to multiple targets. Queue system for managing multiple copy operations. Support for receiving files via the LocalSend protocol. TeraCopy entry in the modern Windows Explorer context menu. Integrated toolbar in the title bar. Why receive LocalSend transfers with TeraCopy? Handle file conflicts: Skip, overwrite, or rename files when a file with the same name already exists. LocalSend always creates another copy, which can waste time and disk space, especially when resuming an interrupted transfer. Filter unwanted files: Apply ignore lists or remove files manually before accepting a transfer, so unnecessary files are not downloaded. Better performance on fast networks: In tests over a 10 Gbps connection, TeraCopy received files several times faster than the standard LocalSend app on Windows. Download: TeraCopy 4.0 Build 26 | 14.5 MB (Freeware, paid upgrade available) View: TeraCopy Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Briefly used Turbo Pascal (and Turbo C++) in 97 and soon after that I bought PC magazine that included a full version of Delphi 2. I still use Delphi today, some 29 years later.
    • Age of Empires Mobile comes to PC, here's how to carry over progress from your phone by Ivan Jenic Image: YouTube/Microsoft Microsoft just released Age of Empires Mobile for PC. The game, officially called Age of Empires Mobile: PC Edition, is available for free on Steam and Microsoft Store, almost two years after its initial release for handheld devices. Age of Empires is one of those franchises that entire generations grew up with. The original came out in 1997, and immediately got people hooked to building civilizations and crushing their enemies on the battlefield. However, the franchise today is a far cry from its roots, as Age of Empires Mobile is, well, a game optimized for handheld devices, and not a classic RTS title we’ve all loved for years. And, of course, it includes in-game purchases. The PC version is still a mobile game at its core, but it’s been optimized for desktop play. There’s mouse control, full keyboard compatibility, and a refined UI. Microsoft also refreshed the visuals with some 4k textures, so the game should look better on larger screens. The game supports Crossplay, so you can switch between your phone, tablet, and PC without losing anything. But linked progress doesn’t come out of the box, as you have to enable it first. Here’s how to link your progress: On your mobile device, open Age of Empires Mobile. Go to Settings (Gear icon) > Account. Select Bind Account and choose a sign-in option. Once you enable account binding, sign in on PC using the same method, and your progress will be accessible across all your devices. Xbox Game Pass subscribers also get a bonus reward pack on PC, which includes: 1 Monthly Pass Token 1 Custom Resource Chest 10 Universal 60-Minute Speed-Ups 1,000 Empire Coins Exclusive Player Portrait Frame You can find more info about Age of Empires Mobile: PC Edition, as well as download links, on the Age of Empires official website.
  • Recent Achievements

    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
    • First Post
      Tom Schmidt earned a badge
      First Post
    • One Month Later
      D0nn13 earned a badge
      One Month Later
    • Rookie
      +ChiefOfNeo went up a rank
      Rookie
  • Popular Contributors

    1. 1
      +primortal
      458
    2. 2
      +Edouard
      177
    3. 3
      PsYcHoKiLLa
      124
    4. 4
      Michael Scrip
      79
    5. 5
      Xenon
      76
  • Tell a friend

    Love Neowin? Tell a friend!