News:

Join the Facebook Fan Page.

Main Menu

GarbledURLs

Started by KGIII, February 20, 2007, 04:43:28 PM

Previous topic - Next topic

KGIII

Link to Mod

This makes it so that people who have less than 10 posts can't post a URL with either the URL tag or by automated URL processing done by SMF. Any attempts to post one will result in plain text that doesn't benefit the forum SPAMer in any way including search engine ranking or the likes - the resulting text will not even be a link. Based on code from [Unknown] mostly. Supports version 1.1 only. For more information and customization please see the included readme file.

Slight edit: The period now turns into ". " to make the results look better.

Works with the 1.1, 1.1.1, and 1.1.2 versions.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

RoarinRow

#1
Cool, I'll have to try this out   8)

Edit - works great, thanks!

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

KGIII

Not a problem. I hope you enjoy it. It is not really a true SPAM solution or anything but rather it is an alternative method to prevent your forum from being abused by people who would like to get search engine ranking and/or post offensive links. I will take it for a test run on 1.1.2 later though it should work just fine with it.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

RoarinRow

Quote from: KGIII on February 20, 2007, 07:25:58 PM
Not a problem. I hope you enjoy it. It is not really a true SPAM solution or anything but rather it is an alternative method to prevent your forum from being abused by people who would like to get search engine ranking and/or post offensive links. I will take it for a test run on 1.1.2 later though it should work just fine with it.

anything to slow down the spammers helps   8)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

KGIII

Quote from: RoarinRow on February 21, 2007, 12:10:01 AM
anything to slow down the spammers helps   8)

My forum varies in rank from a 4 to 6 at Google and so it made it onto the list for one of the various forum-blasting scripts. It was awful. I figured that [unknown]'s code was good but that I didn't even want it to LOOK like a URL to ensure that they wouldn't get any ranking at all from attempting to SPAM.

We went from about 6 to 10 abusive posts per day to none that mattered and eventually nothing at all. The signups stopped after about a month. This mod took a long time to get approved, they were busy and it really wasn't that big of a mod or anything, but it gave me time to observe it.

So, all I can say - really, is that it worked for us. It worked well enough to the point where enabling guest posting became a realistic option as well. This is my first mod too so I am kind of interested to see where it goes. ;) I have another one that is in the works and should meed the code guidelines well enough to pass but it isn't nearly as entertaining as this one.

Anyhow, thanks for testing it and for commenting. It should work just fine with any theme out there so I shouldn't have a whole bunch of questions about it when people finally notice it. That is good 'cause it won't take time from answering questions at other parts of the forum.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

babjusi

Nice work KGIII. Do I have to set any permission or enable this mod somewhere, or just install and it''s all set. Thanks

KGIII

Install and done, no work required other than that. As near as I can tell it should work on any theme as well.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

BBC

This Mod make that new registered users cannot post smileys before 10 posts??

Smileys are posted but only as text not images, tex :blah-123-blah:

I can´t see what it change in BBC code so that it give such results. If you quote those posts with text instead of smileys you get smileys images.


Is it some fix for that??

It´s not so problematic to wait to 10 posts but it ruins appearance of forum.

KGIII

There isn't much that it changes and it doesn't change the BBCode at all rather it changes the text as it is posted.


fixTags($parts[$i]);
if ($GLOBALS['user_info']['posts'] < 10)
{
$parts[$i] = preg_replace(array('~\[i?url\]~i', '~\[/i?url\]~i', '~\[i?url=.+?\]~i'), '', $parts[$i]);
$parts[$i] = strtr($parts[$i], array(':' => ':', '@' => '@', '.' => ' . ', 'http://' => 'hxxp: '));
}


This means that the symbols : @ . and letter combination of "http://" are all changed. If you wanted you could alter that.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

BBC

I think this ':' has to be removed.

I removed Mod but in future if I would have problems with spammers I´ll keep this topic in mind.

Thanks man!

KGIII

You can remove just that bit if you want and still have the modification installed? You can also change the 10 to a 1 or the likes as well if you wanted. That's all in the readme.txt that is in the compressed file. I've been thinking about making a control panel for it but I lack the time.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

rch10007

Ok, so I installed the mod and it works great except...

I changed the code a little:

fixTags($parts[$i]);
if ($GLOBALS['user_info']['posts'] < 25)
{
$parts[$i] = preg_replace(array('~\[i?url\]~i', '~\[/i?url\]~i', '~\[i?url=.+?\]~i'), '', $parts[$i]);
$parts[$i] = preg_replace(array('~\[i?img\]~i', '~\[/i?img\]~i', '~\[i?img=.+?\]~i'), '', $parts[$i]);
$parts[$i] = preg_replace(array('~\[i?mp3\]~i', '~\[/i?mp3\]~i', '~\[i?mp3=.+?\]~i'), '', $parts[$i]);
$parts[$i] = strtr($parts[$i], array(':' => '&#58;', '@' => '&#64;', '.' => '. ', 'http://' => 'hxxp: '));
}


This is basically so no one under 25 posts can create hyperlinks, post images or attach mp3 files...  My problem is that when a user under 25 post quotes someone else, the link for the quote comes up like this:

Quote from: rch10007 link=topic=58. msg3104#msg3104 date=1185456164

Instead of coming up as a link.  It looks like the Garbled code is putting a space after every period in a reply.

Is there anyway to change the code to be less greedy?  Also, I am having the same issue with smilies working for these members.  Should I just remove this: ':' => '&#58;',

Thanks for the terrific mod!
~Robbie~

Personally, I don't think there's intelligent life on other planets. Why should other planets be any different from this one? -- Bob Monkhouse

KGIII

It looks like (sorry for the delay - I've been away) you'd want to just remove that. Yes.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?


rockinaway

Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

KGIII

*should do stuff like update his mods - will do that before week's end*

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

mac1890

Hello.

I'm sorry to ask a very basic question.  I'm very new to simplemachines.  I just want to change the number of posts from 10 to 5. 



if ($GLOBALS['user_info']['posts'] < 12)



I made a change with a text editor and saved it.  I packed all 3 files in zip and tried to upload it.  But I got an error that says "The package you tried to upload either is not a valid package or has become corrupted."

What am I doing wrong?  I'm a Mac user, and I just used the default zip function supported by the OS.  Again, I'm sorry to ask such a simple question.

SMF version is 1.1.4.

Thank you.

KGIII

Install the package that is there and then go edit that file itself with a plain text editor such as notepad or crimson editor. www.crimsoneditor.com

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Jade Elizabeth

how do i do the following;

change it to three posts

make it so under the number can view url's posted by others?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Teunel

If someone posts a link, like this:
http://www.link.com
will it still display their site URL?


Advertisement: