• 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

    • Apple raises MacBook and iPad prices as memory costs surge by Karthik Mudaliar Apple has raised the U.S. prices of several MacBook and iPad models, including the MacBook Neo, which it launched for $599 less than four months ago. The company’s cheapest laptop now starts at $699, while some MacBook Pro configurations have increased by $300. The changes affect the MacBook Neo, MacBook Air, MacBook Pro, iPad Air, and iPad Pro. Apple has not changed the hardware or storage included with these models, so customers are simply paying more for the same configurations. Here is how the new US pricing compares with the previous starting prices: Product Previous price New price Increase MacBook Neo $599 $699 $100 13-inch MacBook Air, 512GB $1,099 $1,299 $200 14-inch MacBook Pro, 1TB $1,699 $1,999 $300 16-inch MacBook Pro $2,699 $2,999 $300 11-inch iPad Air, 128GB $599 $749 $150 13-inch iPad Air, 128GB $799 $949 $150 11-inch iPad Pro, 256GB $999 $1,199 $200 13-inch iPad Pro, 256GB $1,299 $1,499 $200 The updated prices are already appearing on Apple’s U.S. online store. The MacBook Neo increase will probably attract the most attention. Apple introduced the laptop in March for $599, pitching it as a more affordable Mac for students and buyers considering Windows laptops or Chromebooks. It uses an A18 Pro processor and originally undercut Dell’s new $699 XPS 13 by $100. Following the increase, the two laptops now have the same starting price. The M5 MacBook Air has also lost the price Apple promoted when it launched in March. The 13-inch model arrived with 512GB of storage for $1,099, while Apple’s store now lists the MacBook Air range as starting at $1,299. The 14-inch MacBook Pro with an M5 chip and 1TB of storage has gone from $1,699 to $1,999. Apple has made similar changes to its iPads. The recently released M4 iPad Air, which launched at the same $599 starting price as its predecessor, now starts at $749 for the 11-inch version. The 13-inch version has risen from $799 to $949. The iPad Pro increases are larger in dollar terms. Apple’s 11-inch M5 iPad Pro now starts at $1,199, up from $999, while the 13-inch version has moved from $1,299 to $1,499. Both base models still include 256GB of storage. Apple blamed the increases on the rapidly rising cost of DRAM and NAND flash, which provide system memory and device storage. The company told Reuters that it had tried to shield customers from the increases but could no longer absorb them. “We have never seen a component price increase this much, this quickly,” Apple said. Tim Cook had already warned that price increases were coming. Cook said Apple’s existing component inventory had softened the immediate impact, but that higher memory costs would increasingly affect the company after the June quarter. Much of the pressure comes from the construction of AI data centers. Memory manufacturers are directing more production toward high-margin server products, leaving PC, tablet, and smartphone makers competing for the remaining supply. Apple has not said whether the new prices are temporary or whether further increases are planned. For now, the changes show that even Apple’s purchasing power has not been enough to keep the AI-driven memory shortage away from consumer devices.
    • Ventoy 1.1.16 is out.
    • This is a none story - these low volume Chinese models will always get new experimental features first because Apple and Samsung can't produce them in huge volume to meet demand.
    • Nvidia GeForce NOW gains support for Dark Scrolls, Empulse, and more by Pulasthi Ariyasinghe The final update of June for Nvidia's cloud gaming service GeForce NOW is now available, and it is touting support for six more games. The company is also drawing subscriber attention towards the summer sales kicking off across stores, so they can stock up on more cloud-supported titles. Of course, the Steam Summer Sale is the biggest promotion, which is kicking off later today. "Supported Steam games can be streamed across devices with GeForce NOW, making it easy to buy a game once, keep progress synced and pick up where the gameplay left off on PCs, Macs, handheld devices, phones, TVs and more," says the company. "In other words, the Steam Summer Sale brings the deals; GeForce NOW adds the flexibility." Don't forget that the GeForce NOW summer sale is still active as well. This limited-time offer drops the 12-month Performance membership from $99.99 to $64.99, saving members $35. At the same time, the 12-month Ultimate membership is currently going for $129.99, dropping the price by $70 from the original $199.99. Here are the games joining GeForce NOW's supported list this week: Dark Scrolls (New release on Steam, available June 22) SAND: Raiders of Sophie (New release on Steam, available June 22) Deer & Boy (New release on Steam, available June 23) EMPULSE (New release on Steam, available June 24) The Adventures of Elliot: The Millennium Tales (Steam) FATAL FURY: City of the Wolves (Steam) With the June expansions coming to an end, Nvidia should be announcing its July GeForce NOW plans next week. Keep in mind that, unlike subscription services like Game Pass or EA Play, a copy of a game must be owned by the GeForce NOW member (or at least have a license via PC Game Pass) to start playing via Nvidia's cloud servers. There is also a limit to how many hours subscribers can use the service per month.
    • Davinci Resolve 21.0.1 by Razvan Serea DaVinci Resolve is the world’s only solution that combines editing, color correction, visual effects, motion graphics and audio post production all in one software tool! Its elegant, modern interface is fast to learn and easy for new users, yet powerful for professionals. DaVinci Resolve lets you work faster and at a higher quality because you don’t have to learn multiple apps or switch software for different tasks. That means you can work with camera original quality images throughout the entire process. It’s like having your own post production studio in a single app! Best of all, by learning DaVinci Resolve, you’re learning how to use the exact same tools used by Hollywood professionals! DaVinci Resolve is the only post production software designed for true collaboration. Multiple editors, assistants, colorists, VFX artists and sound designers can all work on the same project at the same time! Whether you’re an individual artist, or part of a larger collaborative team, it’s easy to see why DaVinci Resolve is the standard for high end post production and is used for finishing more Hollywood feature films, episodic television programing and TV commercials than any other software. Davinci Resolve 21.0.1 release notes: Addressed multiple DNG and Apple ProRAW color issues. Addressed issue with automatic smart bins after deleting keywords. Addressed issue with multiple linked audio in media management. Addressed multiple Resolve FX issues in photo page. Addressed issue with key shortcut to switch viewer in photo page. More consistent creation of new photo albums. Addressed color thumbnail refresh for photo transform indicator. Transcription now honors project settings language. Improved face recognition in IntelliSearch. Addressed exported bins not retaining generator and title properties. Addressed ease control display and sensitivity issues. Addressed keyframe issue when copying clips with Fusion effects. Addressed keyframe refresh for Fusion effects in the edit page. Addressed issue with 3D renders in Linux with non-English locales. Addressed Fusion viewer color issue for some RCM settings. Addressed issue with saturation limits in Fusion gradient controls. Addressed Fusion display issues with dual screen layouts. Addressed issue with non-English character inputs in Linux. Disabling MultiMaster now disables trim blanking controls. Addressed crash in some scenarios with CineFocus. Addressed lag when toggling bypass grades and Fusion effects. Addressed occasional issue with Fairlight loudness meters. Addressed data burn display of good take tag in upgraded projects. Addressed project manager scroll lag for large project libraries. Support for Sony Alpha 7R VI ARW RAW stills. Support for decoding Affinity RGB 16-bit formats. Addressed a color issue with MainConcept H.265 HDR renders. Addressed a color issue with Windows native H.265 HDR renders. RemoveMotionBlur API now uses correct encode parameters. Addressed character limit consistency in GenerateSpeech API. General performance and stability improvements. Download page: Davinci Resolve 21.0.1 | 3300 MB (Free, paid upgrade available) Links: DaVinci Resolve Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • 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
      463
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      134
    4. 4
      Michael Scrip
      77
    5. 5
      Xenon
      77
  • Tell a friend

    Love Neowin? Tell a friend!