Topic: [mod]Show Smilies In Post Screen
This is easy so I wont bother with a download:
Step 1:
Find:
<li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
</ul>
and add:
<br />
<br />
<br />
<p>Available Smilies:</p><br />
<iframe src ="http://www.YOURDOMAIN/YOURDIRECTORY/smilies.php" width="80%"> </iframe>
Then make a file called smilies.php. Add to it:
<?php
define('PUN_HELP', 1);
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'header.php';
require PUN_ROOT.'lang/'.$pun_user['language'].'/help.php';
require PUN_ROOT.'include/parser.php';
$num_smilies = count($smiley_text);
for ($i = 0; $i < $num_smilies; ++$i)
{
if (!isset($smiley_text[$i]))
continue;
echo "\t\t".' '.$smiley_text[$i];
$cur_img = $smiley_img[$i];
$cur_text = $smiley_text[$i];
for ($next = $i + 1; $next < $num_smilies; ++$next)
{
if (isset($smiley_img[$next]) && $smiley_img[$i] == $smiley_img[$next])
{
echo ' '.$lang_common['and'].' '.$smiley_text[$next];
unset($smiley_text[$next]);
unset($smiley_img[$next]);
}
}
echo ' '.$lang_help['produces'].' <img src="img/smilies/'.$cur_img.'" alt="'.$cur_text.'" /><br />'."\n";
}
?>
Upload smilies.php to your main forum directory and viol! Your done!