| View previous topic :: View next topic |
| Author |
Message |
Cheat Engine User Something epic
Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Fri Jun 11, 2010 3:54 pm Post subject: stone |
|
|
| you needed me? |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Jun 11, 2010 3:58 pm Post subject: |
|
|
Whenever someone posts *.image, like say "laughingelfman.jpg", I want a filter to automatically change it to an html like like this:
Entered text: hey look it's troll.gif
What post becomes: hey look it's <img src="files/troll.gif">
Any way to do this?
I tried with the plain old word censor doing *gif to <img src="files/troll.gif"> but it doesn't capture the whole thing. |
|
| Back to top |
|
 |
Moments Grandmaster Cheater Supreme
Reputation: 17
Joined: 20 Mar 2008 Posts: 1196
|
Posted: Fri Jun 11, 2010 4:14 pm Post subject: |
|
|
| Stone; is this for a forum, or what? |
|
| Back to top |
|
 |
Cheat Engine User Something epic
Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Fri Jun 11, 2010 4:15 pm Post subject: |
|
|
| Regular expressions, check for a space followed by .* and then .gif/png/etc |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Jun 11, 2010 4:16 pm Post subject: |
|
|
| Holland wrote: | | Regular expressions, check for a space followed by .* and then .gif/png/etc |
Um, how do I do that in phpbb2? |
|
| Back to top |
|
 |
majjikelkitty Expert Cheater
Reputation: 139
Joined: 04 Jul 2006 Posts: 106
|
Posted: Fri Jun 11, 2010 4:21 pm Post subject: |
|
|
| Sorrow wrote: | | Stone; is this for a forum, or what? |
wtf |
|
| Back to top |
|
 |
Cheat Engine User Something epic
Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Fri Jun 11, 2010 4:21 pm Post subject: |
|
|
| Stone wrote: | | Holland wrote: | | Regular expressions, check for a space followed by .* and then .gif/png/etc | Um, how do I do that in phpbb2? | wat
Do it in PHP |
|
| Back to top |
|
 |
Moments Grandmaster Cheater Supreme
Reputation: 17
Joined: 20 Mar 2008 Posts: 1196
|
Posted: Fri Jun 11, 2010 4:22 pm Post subject: |
|
|
| MajjikelKitty wrote: | | Sorrow wrote: | | Stone; is this for a forum, or what? |
wtf | what if it was for a chatbox or something ;.; |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Jun 11, 2010 6:07 pm Post subject: |
|
|
| Holland wrote: | | Stone wrote: | | Holland wrote: | | Regular expressions, check for a space followed by .* and then .gif/png/etc | Um, how do I do that in phpbb2? | wat
Do it in PHP |
Like which file?
I have no idea what you're talking about. |
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Fri Jun 11, 2010 6:16 pm Post subject: |
|
|
with greasemonkey should be kind of like this I guess..
(( recycling holland's script ))
| Code: | var post = getElementsByClass("postbody");
for (x in post)
{
if(post[x].innerHTML.search("troll.jpg") != -1)
{
post[x].innerHTML.replace(/troll.jpg/g, <img src="files/troll.gif">)
}
} | |
|
| Back to top |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Fri Jun 11, 2010 6:20 pm Post subject: |
|
|
Greasemonkey = javascript not PHP
Not that I know what the fuck I'm talking about  _________________
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Fri Jun 11, 2010 6:23 pm Post subject: |
|
|
an if it is for a forum.
phpbb2
jut go to where you make the bbcodes and make a word filter that filters troll.jpg with <img src="files/troll.gif">
can do it from the admin menu |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Jun 11, 2010 8:34 pm Post subject: |
|
|
| gogodr wrote: | an if it is for a forum.
phpbb2
jut go to where you make the bbcodes and make a word filter that filters troll.jpg with <img src="files/troll.gif">
can do it from the admin menu |
I'm modifying the actual forum, not making a skin.
And I don't want to make a word censor for each image, because there's a potentially unlimited amount of images. |
|
| Back to top |
|
 |
CrisNMP Fun Supervisor
Reputation: 16
Joined: 11 Apr 2007 Posts: 4649
|
Posted: Fri Jun 11, 2010 8:38 pm Post subject: |
|
|
see how bbcodes are made in phpbb2 and use that example to change *.jpg to <img src.. _________________
BENBENBENBENBENBENBENBEN |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Jun 11, 2010 8:40 pm Post subject: |
|
|
| CrisNMP wrote: | | see how bbcodes are made in phpbb2 and use that example to change *.jpg to <img src.. |
Tried bbcode, the whole system requires []'s.
I don't see how or why, but that's how it is. |
|
| Back to top |
|
 |
|