Preventing Emoticons From Being Used In Given Category/Board

Started by YogiBear, October 16, 2008, 05:12:56 PM

Previous topic - Next topic

YogiBear

Is there any way I can prevent emoticons/smileys from being used in a given Category or Board? I'm using 1.1.6

Many thanks for any help.  :)
SMF v2.1.4  Mods : Snow & Garland v1.4, Simple Image Upload v2.0.0,  PHP  v.8.1

vbgamer45

Not currently but would make a good modification request.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Oldiesmann

Not that difficult actually...

Sources/Subs.php

Find
Code (Line 959) Select
global $txt, $scripturl, $context, $modSettings, $user_info;

Add after that
global $board;

Find
Code (Line 966) Select
elseif ($smileys !== null && ($smileys == '1' || $smileys == '0'))

Add before that
elseif (!empty($board) && $board == x)

Replace x with the board ID.

If you want to do it for all boards in a single category, do the following instead of the last step above:

Find
if (empty($modSettings['enableBBC']) && $message !== false)

Add before that
// Find out what category this board is in
$query = db_query("SELECT ID_CAT FROM {$db_prefix}boards WHERE ID_BOARD = '$board'", __FILE__, __LINE__);
$cat = mysql_result($query, 0);
mysql_free_result($query);

if ($cat == x)
$smileys = false;


Replace x with the category ID.
Michael Eshom
Christian Metal Fans

YogiBear

Thankyou, Oldiesmann.

I agree, vbgamer45, it would be useful as a mod so it could simply be switched on or off.

SMF v2.1.4  Mods : Snow & Garland v1.4, Simple Image Upload v2.0.0,  PHP  v.8.1

Advertisement: