• 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
lol, Question: Is there a way to convert John's script so people dont choose their own, but have a choice of a few in a Drop Down box?

Thanks,

Pete

585764286[/snapback]

Use something like that (raw idea):

<html>
<body>
   <form action="post.php" method="POST" enctype...> <!-- Too lazy -->
   <select name="choice">
   <?
   $content = @file_get_contents( "/path/to/file.txt" );
   $choices = explode( "\n", $content );   // UN*X format, perhaps "\r\n" for Windows and "\r" for MacOS
   foreach( $choices as $key => $value )
   {
   ?>
      <option name="<?=$key;>" value="<?=htmlentities( $value );?>"><?=htmlentities( $value );?></option>
   <?
   }
   ?>
   </select>
   <input type="submit" name="ok" value="ok" />
   </form>
</body>
</html>

You know what to do next...

  • 0

Nope :( Didnt work? I get a parse error with this line:

<option name="<?=$key;>" value="<?=htmlentities( $value );?>"><?=htmlentities( $value );?></option>

Parse error: parse error, unexpected '>' in /home2/mak0sch/public_html/externals/sig/sig_index.php on line 11

:(

  • 0

lol, okay, thats all good, but i have another embarassing problem :p

http://www.wizzyworld.com/externals/sig/sig_index.php and it displays me thing nice and well (i'll figure out how to do it when i get it working :p)

BUT, change it to any of them, and then see what happens :/

Hmm, help?

I know, the file is struggling to make an image because i havent told it what to do, but, yea, what do i have to do next?

EDIT: Okay, my "post" code isnt right, but i have no idea what to do with it. It's just this:

$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; } 
$filename = "text.txt"; 
$file = fopen($filename, "w");
fwrite($file,  $text);
fclose($file);

BUT i have just seen that places what someone puts in a box in the text file. How do I make my sig_index.php file output my image?

Thanks,

Pete

Edited by TheTrainMan
  • 0

i checked that page for you and by the looks of things you havnt put your code in the php tags <?php ?>

so the code above should look like:

&lt;?php
$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; }
$filename = "text.txt";
$file = fopen($filename, "w");
fwrite($file,  $text);
fclose($file);
?&gt;

  • 0

Don't worry about it mate!

Thanks for the fix - no error's now, but no message either :p

Lol, this is soo confusing. My "post.php" file doesnt say a message to show or picture to put the message on, so it doesnt show it, just goes to a blank page - rather funny, but a bit of a b.....

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

&lt;?php
$text = $_POST["text"]; // Or use $_GET["text"] but I really don't recommend doing so!
if ($text == "") { $text = " "; }
$filename = "text.txt";
$file = fopen($filename, "w");
fwrite($file, ?$text);
fclose($file);
?&gt;

Now, i guess the "w" is the file name, so i shall try making that a picture to see if it works:))

Well, i DID try that but it didnt work:(( It made my index display nothing in the box://

I have figured that each time i click the "Change Signature" button, it clears out everything from the text file so there isnt anything there anymore? :pinch::

Edited by TheTrainMan
  • 0

Don't use the "w" mode with fopen( ) because if a file named "text.txt" ($filename value) already exists, it will be re-initialized: it becomes an empty file.

Moreover, in your page, some (double) quotes are missing, it's surely not the origin of the problem but anyway, it's not correct. Also, check your input names.

But I'm not sure you have understand how to create an image...

I have to go, I'll come back soon.

  • 0

I suggest you use "a" (writing) or "a+" (writing AND reading) instead of "w" and take a look at the PHP documentation about fopen( ). Note that the file pointer is placed at the end of the file.

I'm working on a ready-to-use script (which's based on Moodi's and Axon's ones), more info soon.

Edited by Sphinx Myth
  • 0

lol, okay, seems to be happy, but there is one tiny little thing wrong. . .

. . . erm, where does it display my image? It doesnt know that is it supposed to write an image or anything, its like i am missing the vital part of it.

This is really funny! I know it'll all be worth it when its done, but whats the next step? :laugh:

Pete

  • 0
I have written a sig that you can draw on, but my host dosn't have the GD module for perl installed.

Can someone host it for me?

Perhaps someone could port it to PHP since GD seems to be part of the standard install.

SigScribble

Feel free to modify/make your own :)

585776524[/snapback]

Wow, very impressive.

  • 0

I like that! I'll have a play around :D

Hmm, its a good idea, and i couldnt do anything as good, but after you've drawn on the sig - then what? There is no button saying "Submit" or anything to actually change it? BUT, then reading the instructions might help :p

I still want to crack this writing one. I just need it to actually output the image somewhere! None of the files actually seem to say that bit :s

Edited by TheTrainMan
  • 0
I like that! I'll have a play around :D

Hmm, its a good idea, and i couldnt do anything as good, but after you've drawn on the sig - then what? There is no button saying "Submit" or anything to actually change it? BUT, then reading the instructions might help :p

I still want to crack this writing one. I just need it to actually output the image somewhere! None of the files actually seem to say that bit :s

585779522[/snapback]

There is no submit button because as soon as you release the mouse the line is immediately written to the jpeg. No need to have a submit button, that is until I release the next version which will allow unlimited strokes of the mouse so you can draw a complete picture.

I have added more information on how to get it running on an IIS server. Unix people shouldn't have a problem (that I'm aware of).

I've also added a more detailed explanation of how it works.

I'm still waiting to see someone actually use the sig!! ;) (my host dosn't have the GD perl module installed)

SigScribble

  • 0

As I promised a few days ago, I made a basic "ready to use" script pack for dynamic signatures.

In this version:

_ Users choose the message, they don't send theirs (TrainMaster's request)

_ Users can suggest messages

_ Updatable swear filter (via file)

This version uses files to store data. You can easily adapt (and improve) it to a (My)SQL database use. I'll do it if asked.

Well, go to http://sphinx.myth.free.fr/sphinx/neowin to find it. There's a ZIP archive which contains the scripts + a test picture + a font (gothic.ttf).

Feel free to see it at work and to customize it, it's very basic.

I plan to add some administration functions but, for the moment, I think you're not enough lazy for that ;)

  • 0
SigScribble v1.1 released!

- Now it works with unlimited strokes of the pen!

- Added clear & save buttons

- Demo still dosn't work on my host! (sorry about that)

SigScribble v1.1

585783091[/snapback]

Keep up the good work! But, it's a pity that your script uses GD Perl because almost no host provides it. It's stupid, Perl is as useful as PHP...

  • 0
Keep up the good work! But, it's a pity that your script uses GD Perl because almost no host provides it. It's stupid, Perl is as useful as PHP...

585783177[/snapback]

Ok, I've ported it to PHP and added a load function.

Still looking for someone to host it for me :laugh:

SigScribble v1.1 (PHP)

  • 0
Ok, I've ported it to PHP and added a load function.

Still looking for someone to host it for me  :laugh:

SigScribble v1.1 (PHP)

585784690[/snapback]

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!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Hello police? I'd like to report a murder.
    • Ventoy 1.1.15 is out.
    • Win11Debloat 06.24.2026 by Razvan Serea Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. All changes made by Win11Debloat can be easily reversed, and most removed apps can be restored via the Microsoft Store. A full guide on how to undo the changes is available here. Win11Debloat features: Below is an overview of the key features and functionality offered by Win11Debloat. Please refer to the wiki for more information about the default settings preset. Remove a wide variety of preinstalled apps. Click here for more info. Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads. Disable tips, tricks, suggestions & ads across Windows. Disable Windows location services & app location access. Disable Find My Device location tracking. Disable 'Windows Spotlight' and tips & tricks on the lock screen. Disable 'Windows Spotlight' desktop background option. Disable ads, suggestions and the MSN news feed in Microsoft Edge. Hide Microsoft 365 ads on the Settings 'Home' page, or hide the 'Home' page entirely. Disable & remove Microsoft Copilot. Disable Windows Recall. Disable Click to Do, AI text & image analysis tool. Prevent AI service (WSAIFabricSvc) from starting automatically. Disable AI Features in Edge. Disable AI Features in Paint. Disable AI Features in Notepad. Disable the Drag Tray for sharing & moving files. Restore the old Windows 10 style context menu. Turn off Enhance Pointer Precision, also known as mouse acceleration. Disable the Sticky Keys keyboard shortcut. Disable Storage Sense automatic disk cleanup. Disable fast start-up to ensure a full shutdown. ...and more. Once you’ve downloaded the Win11Debloat file (Get.ps1), just follow these quick steps: Locate the Get.ps1 script file. Right-click the file and select Run with PowerShell from the context menu. If prompted by User Account Control (UAC), select Yes to grant the script the necessary administrative permissions. Win11Debloat 06.24.2026 changelog: With this release, the legacy app list generator and CustomAppsList file support is removed. This only affects users using legacy command-line methods. More info here: #664 Features & Improvements Clean up styling to better match Windows fluent design guidelines by @Raphire in #638 Add GPO override warning alert and WhatIf dry-run previews by @HetCreep in #611 Disable telemetry-related scheduled tasks under Microsoft\Windows by @HetCreep in #615 Guard against loading, saving & executing undefined features by @Raphire in #665 Simplify Window management & update minimum window sizes by @Raphire in #671 Update start menu backup/restore with timestamped filenames by @Raphire in #672 Clean up feature execution logic for readability by @Raphire in #641 Clean up & improve app removal methods, remove legacy CLI app removal methods by @Raphire in #662 Remove support for CustomAppsList file format, including -RemoveAppsCustom and -RunAppsListGenerator parameters Update CLI app removal to use newer app removal methods Drop support for sunset apps (Fitbit, Shazam, Twitter, Viber, Wunderlist, XING) and Plex Fix removal of Microsoft Copilot Fixes Fix: Replace P/Invoke dynamic DLL imports with WPF native methods to fix temp DLL access-denied errors by @Raphire in #661 Fix Start Menu apps not being set correctly for all users when running script for other user by @Raphire in #637 Fix store suggestions not getting disabled correctly for all users when running as other user by @Raphire in #642 Fix: Respect Feature min/max version for comboboxes by @Raphire in #639 Fix: Don't treat AllUsers/CurrentUser as a username at startup by @HetCreep in #647 Fix: treat dismissed unsafe-removal confirmation as decline by @HetCreep in #651 Fix: Surface runspace errors instead of swallowing them in GUI mode by @HetCreep in #655 Fix: Correct sub-key path matching in backup allow-list validation by @HetCreep in #645* Fix: Detect WinGet uninstall failures by exit code, not English text by @HetCreep in #658 Fix: Detect installed OneDrive in the "Only show installed" filter by @HetCreep in #656 Download: Win11Debloat 06.24.2026 | Open Source View: Win11Debloat Home Page | Screenshots 1| 2 Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Age of Empires Mobile PC Version The Band The Show The Movie
  • Recent Achievements

    • 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
    • First Post
      Tom Schmidt earned a badge
      First Post
    • One Month Later
      D0nn13 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      416
    2. 2
      +Edouard
      173
    3. 3
      PsYcHoKiLLa
      125
    4. 4
      Michael Scrip
      77
    5. 5
      Xenon
      76
  • Tell a friend

    Love Neowin? Tell a friend!