• 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
But there's something wrong, a word like "assembly" will be replaced with "***embly"...

I'm not a regular expressions expert but it's the origin of the problem.

Somebody has an idea?

585718622[/snapback]

ya, in the array you leave a space before and after the "ass" so like " ass ". You might also want to check for "ass," "ass." "ass!" etc...

That was somewhat implemented in my code above.

  • 0
Heh, due to public interest I might re-start the DSig project..

Here's my current one :

index.jpg

Update Comment and Archives

585718984[/snapback]

Looks like I have comperition :shifty: lol

PS: Has anyone got any ways to copy text on an animated gif???

EDIT: Sorry didn't mean to double post...

  • 0

I will be fiddling with this this afternoon.

Okay, so if i use this (below) where do i put it? As in, what file?

<?php

function lanchk($string) {

?? $obscenities = array("****"," ass ","damn","****","\$hit","bitch","######"," \@ss ");

?? foreach ($obscenities as $curse_word) {

? ? ?? if (stristr(trim($string),$curse_word)) {

? ? ? ? ?? $length = strlen($curse_word);

? ? ? ? ?? for ($i = 1; $i <= $length; $i++) {

? ? ? ? ? ? ?? $stars .= "*";

? ? ? ? ?? }

? ? ? ? ?? $string = eregi_replace($curse_word,$stars,trim($string));

? ? ? ? ?? $stars = "";

? ? ?? }

?? }

?? return $string;

}

?>

Also, how do I use a non-echo page to let users select their own?

I can add a simple page emailling me their suggestion to the same page as the "select words" page.

And also, you add the font fileEDIT 2:with all the image and everything in?

EDIT 2:

http://www.wizzyworld.com/exte:/als/sig/sig.php

it doesnt use my image? :/

Thanks,

Pete

Edited by TheTrainMan
  • 0
Looks like I have comperition  :shifty: lol

PS: Has anyone got any ways to copy text on an animated gif???

EDIT: Sorry didn't mean to double post...

585723494[/snapback]

I only want to allow my visitors to be able to choose a message that is in a list, so that way there is no advertising or bad things in my sig :p. From what I can see....your script looks much more secure than mooodi's in the sense that your script doesn't have the text in the URL which can be easily updated to something else, like moodi's does.

Mooodi's output page

http://www.jpgodlew.com/siggy/dynamic.jpg?go=gochange&amp;newcomment=This+space+for+sale

The message can be changed very easily

Pre's script doesn't have an output page at all. If you could just add like a little thing that says "Message Updated" or something along those lines I would LOVE to use your script ;)

About the animated gif....

Replace:

$im = imagecreate(400, 130);[QUOTE]
With:
[CODE]$im = imagecreatefromgif ("yourimage.gif");  

It may or may not work with an animated gif

  • 0
About the animated gif....

Replace:

$im = imagecreate(400, 130);[QUOTE]
With:
$im = imagecreatefromgif ("yourimage.gif");  

It may or may not work with an animated gif

585726715[/snapback]

That code doesnt work for me... and I really want to use an animated gif :cry:

  • 0

WARNING TO OTHER MEMBERS HAVING DYNAMIC SIGS:

I just received a warning from a mod because of inappropriate material being entered in the dynamic signature.

This makes it difficult because although I have used by own sware filter in the past, its to easy to go past it and I have no control what people say. :(

I feel sad now :cry:

  • 0
WARNING TO OTHER MEMBERS HAVING DYNAMIC SIGS:

I just received a warning from a mod because of inappropriate material being entered in the dynamic signature.

This makes it difficult because although I have used by own sware filter in the past, its to easy to go past it and I have no control what people say. :(

I feel sad now :cry:

585739703[/snapback]

This is exactly why I want to have a list of what people can put on my sig...not have them type in anything.

Any news on that code Pre?

  • 0

after seeing this thread I desided to give my dynamic sig an 'upgrade' all it had was a comment that could be changed to anything by anyone.

I found this thread I tried to put in a server uptime and ip address section, only to find out they wont work becuase my server has disabled the use of those certain commands to help make it more sercure.

So instead I thought id make the little bit i had a bit more 'advanced' but got stuck...

atm the comments ppl post are saved in my txt file in a list eg.

hello

test

hello world

so it posts the whole list on the image, i tried to use

$file = fopen($filename, "r");
$data = fread($file, filesize($filename));
fclose($file);
$text = explode("\r\n", $data);
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[0]);

but it didnt work, then i realised the this would post the very first comment in the txt file, becuase new comments are added to the bottom of the list..so basicly does anyone know how i can do this, perhaps showing the last three comments people have made?

  • 0

Thought i'd add a little bit here.

Here's part of my script, it filters badwords from a .txt file (one per line) which in my app is appendable from the web based control panel.

$badlist = file_get_contents("admin/banned.txt");
$badlist = split("[\n]", $badlist);

foreach ($badlist as $badword) {
	$content = trim($content);
	$badword = trim($badword);
    $content = str_replace($badword,"****", $content);
//	echo $badword . " -&gt; " . $content . "\n&lt;br&gt;";
}

admin/banned.txt is the path to the text file of course, and $content is the string with the anonymous message in. If you're using PHP5, i suggest you use str_ireplace (as its case insensitive).

anonymousjon: keep a file with JUST the current one in (to put into the script), and a logfile with each one in. Simplifies it greatly.

Edit: If you want the last 3 values, do what you're currently doing, but see how long the array is first. I cant remember off the top of my head what the function is but i'll go look for you.

Edit2: Who would have thought, the function was called count() :p

Do this (again, off the top of my head so sorry if there are any errors):

$file = fopen($filename, "r");
$data = fread($file, filesize($filename));
fclose($file);
$text = explode("\r\n", $data);
$max = count($text);
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[$max]);

Then for the other 2 lines i believe you can do this

$max = $max - 1;
imagettftext($im, 10, 0, 5, 15, $black, $font, $text[$max]);

(obviously change X and Y as well)

Edited by Zero1
  • 0

anyone know how to force jpg / png to execute through php on a IIS server? (iis 5.1 or 6.0)..and if you force it to execute through php and it is a standard image, does it cause any issues?

An idea, just change the MIME type to application/x-httpd-php (i think changing the MIME type is same as what .htaccess does for apache? i am not too familiar with that though) for jpg and png? or is that a bad idea?

Thanks :)

Edited by SkyyPunk
  • 0

Does anyone know how I can put data into my .txt file that will not show the imputted data in the URL of the script?

This is what I DON'T want:

dynamic.jpg?go=gochange&amp;newcomment=Someone+Can+Change+This+Very+Easily

newcomment=I+don't+want=the+text+in+the+URL

All I need is a way to get the text into the data file without an output of the entered text in the URL...any ideas?

Edit:

This will be a separate file from the file that actually changes the image. The image file will just read the latest entry in the data file and update the image with that text.

  • 0

You need to use form eg.

&lt;form name="input" action="action.php" method="post"&gt;
    tagline: &lt;input type="text" name="text"&gt;
   &lt;input type="submit" value="Go"&gt;
&lt;/form&gt;

then make text.txt which will is where the comment will be sent to, you need to chmod this to 777.

then make another php file lets call it ations.php this is the action method that the form will use

$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);

this should place whatever comment someone types in the text box into the firstline of the txt file

  • 0

yup that should just add it to the .txt file

oops i forgot :p you will need to actually upload a txt file and name it text.txt and chmod it to 666

Hoochi, try to find a free php host, there are a few out there :)

thanks zero1, pretty similar to what I had except mine didnt use a text file so i had a huge list of nasty words in script :p

Edited by anonymousjon
  • 0
yup that should just add it to the .txt file :)

oops i forgot :p you will need to actually upload a txt file and name it text.txt :) and chmod it to 666

Hoochi, try to find a free php host, there are a few out there :)

585758782[/snapback]

Recommend any?

  • 0
thinking about it there arnt really any good ones..they all have ads on them etc..

I could set u up with a little bit of webspace if u like?

585758812[/snapback]

Doesn't seem to be a problem, thanks Tim.

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

    • No registered users viewing this page.
  • Posts

    • Zoom Workplace 7.1.0.41345 by Razvan Serea Zoom Workplace for Windows is a reliable video conferencing tool that makes it easy to connect and collaborate. With features like messaging, file sharing, and app integrations, it’s designed to streamline teamwork. You’ll get high-quality audio and video, strong security with end-to-end encryption, and an intuitive interface—all of which help remote teams and businesses stay productive and connected. Zoom Workplace key features: High-Definition Video & Audio: Provides clear, reliable communication for virtual meetings. End-to-End Encryption: Ensures secure communication with strong data protection. Multi-Factor Authentication: Adds an extra layer of security for user accounts. Integration with Productivity Apps: Supports seamless integration with Microsoft Office, Google Workspace, and more. File Sharing: Easily share files during meetings for efficient collaboration. Real-Time Messaging: Enables team chat for ongoing communication. Collaborative Whiteboarding: Allows teams to brainstorm and collaborate visually. Webinar Support: Host large webinars with interactive features. Administrative Controls: Manage user permissions, meeting settings, and security features. Cloud Storage: Automatically stores meetings and files in the cloud for easy access. Cross-Platform Support: Available on Windows, macOS, and mobile devices. Meeting features: Virtual Backgrounds: Customize your background for meetings to maintain privacy or enhance professionalism. Touch Up My Appearance: Automatically smoothens skin tone for a more polished video appearance. Breakout Rooms: Divide meetings into smaller sessions for group discussions or workshops. Live Transcription: Automatically generate real-time captions during meetings for accessibility. Zoom Apps: Integrate third-party applications directly into Zoom for enhanced functionality. Meeting Reactions: Participants can use emojis for quick, non-verbal feedback during meetings. Polling: Conduct live polls during meetings to gather instant feedback from participants. Attention Tracking: Monitors participant attention during meetings to ensure engagement. Closed Captioning: Enable manual or automatic captions for a more inclusive experience. Webinar Replay: Record and share webinars with analytics for audience engagement. Download: Zoom 64-bit | 145.0 MB (Free, paid upgrade available) Links: Zoom Website | Zoom ARM64 | Zoom Installers | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • UK funds £60M AI labs to challenge US tech dominance with open-source models by Paul Hill The UK government has awarded £60 million to Oxford University and University College London to help keep the country in the AI race by focusing on open-source, low-hardware alternatives. This is in stark contrast to the expensive, closed-source, and high-hardware-requirement models being created in the United States and elsewhere. The money will be shared among two new academic research labs over six years to help them redesign the fundamental mathematics and architectures of AI to help the UK reduce its reliance on a handful of US tech firms. Commenting on the development, AI Minister Kanishka Narayan said: Initially, the government planned to fund just one lab with a £40 million investment, but with this update, two labs will now get access to a larger pool of funds. The labs are expected to invest in the top AI researchers at every career stage, with £2 million per lab being set aside for hiring at least ten doctoral students. The government hopes that this will grow the UK’s talent in the field of AI. The labs are also expected to work closely with the leaders in British AI research, such as the Alan Turing Institute and UKRI’s AI research hubs. This will allow the various teams to collaborate and create new solutions faster than they could alone. This development is pretty interesting for a number of reasons, chiefly that it could create a long-term challenge for US tech firms if these labs successfully scale these open-source architectures that bypass the proprietary ecosystems. It could also give British businesses and public sector organizations access to AI features without paying high licensing fees to foreign providers or needing to invest in specialized server infrastructure.
    • If I were them, I'm gonna hold out until the prices of these semiconductor parts normalize. $1,049 for a ~5 year old hardware is DoA, more so for gamers. On a deeper note, if Steam Machine is priced like this, we are soo effed up for the next gen Xbox console and PS6. With great AAA titles releasing at the end of the year, this just creates more demand...and more tears for me. Lol.
    • I suspect one reason its hard to justify subsidising is that it's not a locked down device like a traditional console is. In this climate sadly if it was a "good deal" you'd get people hoarding them for anything but gaming. The Lenovo Legion Go 2 with the Ryzen Z2 Extreme is £1300 here ($1720) for some context on how other SteamOS like devices are now priced. I got the older Z1 Extreme model for £300 with a dock, just shows how insane prices have got recently.
  • Recent Achievements

    • One Month Later
      nates earned a badge
      One Month Later
    • Week One Done
      Almohandis earned a badge
      Week One Done
    • Rookie
      dorf went up a rank
      Rookie
    • First Post
      mike_rumble earned a badge
      First Post
    • Dedicated
      tuben earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      448
    2. 2
      +Edouard
      181
    3. 3
      PsYcHoKiLLa
      92
    4. 4
      Michael Scrip
      87
    5. 5
      neufuse
      67
  • Tell a friend

    Love Neowin? Tell a friend!