Contributions

Features (Category Index)
Search: 

Censor bad words

Forgot to add censor to infobox and product_reviews_info.php;

Step 5: add tep_censor to infobox reviews:

in catalog/includes/boxes/reviews.php

find:

$review =

tep_break_string(tep_output_string_protected($review['reviews_text'])

, 15, '-<br>');

and replace with:

$message = $reviews['reviews_text'];
tep_censor($message);
$review =

tep_break_string(tep_output_string_protected(tep_censor($review['revi

ews_text'])), 15, '-<br>');


Step 6: in catalog/product_reviews_info.php

find:

<?php echo

tep_break_string(nl2br(tep_output_string_protected($review['reviews_t

ext'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING,

tep_image(DIR_WS_IMAGES . 'stars_' . $review['reviews_rating'] .

'.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])),

sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])) . '</i>'; ?>

and replace with:

<?php
$message =

$reviews['reviews_text'];
tep_censor($message);
echo

tep_break_string(nl2br(tep_output_string_protected(tep_censor($review

['reviews_text']))), 60, '-<br>') . '<br><br><i>' .

sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' .

$review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS,

$review['reviews_rating'])), sprintf(TEXT_OF_5_STARS,

$review['reviews_rating'])) . '</i>'; ?>


copy or download full package

Expand All / Collapse All

Censor bad words Mircea Teleleu 15 Aug 2004

Forgot to add censor to infobox and product_reviews_info.php;

Step 5: add tep_censor to infobox reviews:

in catalog/includes/boxes/reviews.php

find:

$review =

tep_break_string(tep_output_string_protected($review['reviews_text'])

, 15, '-<br>');

and replace with:

$message = $reviews['reviews_text'];
tep_censor($message);
$review =

tep_break_string(tep_output_string_protected(tep_censor($review['revi

ews_text'])), 15, '-<br>');


Step 6: in catalog/product_reviews_info.php

find:

<?php echo

tep_break_string(nl2br(tep_output_string_protected($review['reviews_t

ext'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING,

tep_image(DIR_WS_IMAGES . 'stars_' . $review['reviews_rating'] .

'.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])),

sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])) . '</i>'; ?>

and replace with:

<?php
$message =

$reviews['reviews_text'];
tep_censor($message);
echo

tep_break_string(nl2br(tep_output_string_protected(tep_censor($review

['reviews_text']))), 60, '-<br>') . '<br><br><i>' .

sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' .

$review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS,

$review['reviews_rating'])), sprintf(TEXT_OF_5_STARS,

$review['reviews_rating'])) . '</i>'; ?>


copy or download full package

Note: Contributions are used at own risk.