Small Private Scripts for Posting

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

Post Reply
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Small Private Scripts for Posting

Post by Jonah Bron »

Hey world.

How about the ability to write a small script in PHP for basic string modification. Something like:

Code: Select all

$post_body = str_replace("google", "[url=http://google.com]google[/url]", $post_body)
It would be like a super-mega-dynamic-signature-type-thing.

Maybe this should be a feature in the maybe-to-be-new-custom-PHPDN-forum.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Small Private Scripts for Posting

Post by John Cartwright »

I have no idea what you are talking about
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Small Private Scripts for Posting

Post by Jonah Bron »

Well, I have a very good idea of what you're talking about :)

I mean, like, you can go to your account settings, and click "add filter script", type up a quick PHP script, and every time you post a topic or reply, it runs your post through your custom filter script. In the example above, all you have to do is type "google" in your post, and it comes out as "[url=http://google.com]Google[/url]".

In the words of Verizon, "Can you hear me now?"
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Small Private Scripts for Posting

Post by jackpf »

That would get hacked to <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>.

I wouldn't think PHP would be allowed. Maybe a made-up find & replace syntax though...

Sounds cool.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Small Private Scripts for Posting

Post by Jonah Bron »

Yeah, a fake language would work too. I meant to mention that, but forgot about it. Maybe make it so the code is PHP? :mrgreen:
Post Reply