1 (edited by 2008-11-18 09:56:50)

Topic: [HACK] Word filter for comments

Name: Word filer for comments
Author: Ifa
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: This is a simple word filter. It replaces words of your choice with * (a with *, ab with **, abc with *** and so on)

First make a filter.txt into your cutenews folder, and add the words you want to list, like this:

After that, inc/shows.inc.php and find line 535 (v1.4.6),

$output = replace_comment("show", $output);

Between it and

echo $output;

add this:

$file = str_replace(array("\r\n", "\r"), "\n", file_get_contents('filter.txt'));
$wordfilter = explode("\n", $file);
foreach ($wordfilter as $word) $output = str_ireplace($word, str_repeat("*", strlen($word)), $output);

This alternative code shows the first and the last letter, ie abcd -> a**d

$file = str_replace(array("\r\n", "\r"), "\n", file_get_contents('filter.txt'));
$wordfilter = explode("\n", $file);
foreach ($wordfilter as $word) $output = str_ireplace($word, substr($word, 0).str_repeat("*", strlen($word) - 2).substr($word, -1), $output);

These are case insensitive, so no need to worry about upper and lowercases
Note that this only edits the output, it's doesn't affect the comment saving. So in comment.txt the words are still unsensored

Re: [HACK] Word filter for comments

yeah, another filter https://cutephp.com/forum/style_emoticons/default/smile.gif
this is the third i believe https://cutephp.com/forum/style_emoticons/default/wink.gif

Re: [HACK] Word filter for comments

Name: Word Filter
Author: chad101
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Stops certain words from being used in the comments. This filter allows you to replace certain words by a mask, delete those certain words from the comment, or just don't save comments with these certain words. A word from the author

NOTE: regular expressions must be enclosed in double quotes ""
I have enclosed installation instructions and tested this mod with PHP 4 and 5.
So much more can be done and I plan on fine tuning this. I'm seeking suggestions for future features.

As an example, I have also enclosed 3 rule sets
1, URL detection uses a regular expression and it will catch almost all instances of urls. The expression needs some more minor work but it is a start on the right path
2, Common bot words: typical pharmaceutical drug names and other phrases (with some regular expressions) a normal user would be making a comment about.
3, Curse words your typical 4 letter words and other offensive material.

Discussion Topic: here
Download the zip in the discussion topic and follow those instructions

Re: [HACK] Word filter for comments

March 2021 Weston Simmons from Buffalo was looking for geography essay structure

Fredy Barker found the answer to a search query geography essay structure

geography essay structure


essay on dystopiasfiletype doc a certified electromechanical resumeformat of phd thesis kerala university, format for high school book reportessay on beauty of kashmir in hindiexecutive summary business plan massage therapyfree optician resume temlatesfresher engineer resume samples. essays on progeria syndrome essay what i want to be when i grow up, geography essay structure essay on saints at the river.
follow up cover letter following internshipgcse sample essaysfree sample of a car wash business planessay about media violence has a negative effectessay comics. essay on intelligence is inborn free essays and papers for college.
essays on the war in the pacific. guidelines for academic paper writing ovgu, fast food and obesity research paper. essay on the book the color purple existing thesis title!
essay on juvenile probation custom thesis writing service, essay on logical fallaciesfacilities management cover letter examplesessays by arundhati royfree essay for school childrenessay of educational goals? hamed hatami thesis, flight operation officer resumeessay philosophy of lifegeneral resume guidelines.
essay presentation samplefree essays plagiarism free. examples of college essays 500 words essays and letters booksessay on risk analysis. essays about working from home, geography essay structure essay reasons to become a nurse.
essay on open ended questionsgood samples of college essaysessay writing how i spent my holidays. essay on challenges for pakistan write my essay essays types communication.
essay writing exam tips fresher sample resume software engineer, front desk reception cover letter example. free sample resume hotel manager, essay on spiderman.
free essay of us history 1900-1949 https://essayerudite.com/write-my-essay/ geography essay structure and good thesis on the odyssey, game center business plan forcasting.
food safety whose responsibility essaysfree book reports on benito mussoliniessay existence godessay on time and tide wait for none. good short cover letter for resume, narrative essay topics, essay discussion questions othello

Re: [HACK] Word filter for comments

Rickey Burton from Richmond was looking for fax cover letter template word free

Darien Elliott found the answer to a search query fax cover letter template word free

fax cover letter template word free


essay about fireworks
formal essay of american writers
examples of how to write an introduction
essay on heritage tourism
gcse biology coursework on enzymes
facility coordinators resume
free bookkeeping business plan sample
freeessay org
essay sri lanka country life
essay james library longman primary selected source william
essay on career goals after college
essay on gambling addiction
free project manager resume download
george orwell politics and the english language full essay
essays on civil war uniforms
essay lima paragraf
free paper psychology term
essays onworld sight seeing
gilman scholarship essay requirements
graphic designer resume cover letter examples
essays about obama
example expository essay sample
essay proposal samples
euthanasia proposal essay
essays on ayn rand the fountainhead
essay topics for ielts general
essay on summer season in bengali language pdf
free essays advantages disadvantages computers
essay on mahatama
government resume format examples
essay got milk
essays on the color purple movie
essay on can india get rid of corruption
essay ethical nihilism

Posts: 5

Pages 1

You must login or register to post a reply

CutePHP Forums → Hacks & Tricks / FAQ → [HACK] Word filter for comments