Topic: Questions about emoticons

I have been adding emoticons by putting them in the folder with all the others and modifying the parser.php.  This is how I did it with 1.2 and it works in 1.3, but I was wondering if there was an extension for managing them or an easier way to do it.

Also, the added emoticons are getting shrunk down in size.  I think there is a variable for emoticon size limit somewhere in the code that I need to adjust, but I'm not sure where it is and could use some advice on where to find it.

Thanks.

Re: Questions about emoticons

oban14 wrote:

I think there is a variable for emoticon size limit somewhere in the code that I need to adjust, but I'm not sure where it is and could use some advice on where to find it.

parser.php, line 775:

    foreach ($smilies as $smiley_text => $smiley_img)
    {
        if (strpos($text, $smiley_text) !== false)
            $text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text);
    }
If you need any PunBB 1.2.* mods done, feel free to send me a PM; we can work out a price [if need be].

Re: Questions about emoticons

So if I changed the "15" and "15" to "100" and "100" it would only shrink emoticons down to 100 x 100 if they were larger than 100?

Re: Questions about emoticons

I ended up deleting the entry, and it's just using whatever size the images are.

I think on post.php there is a similar setting, because right below the bold/italic/underline/link options are all the smilies, and they're all shrunk down to the same size.

Is there a way to change that?

I was thinking it might be here, but I'm not sure:

    $forum_page['text_options']['smilies'] = '<span'.(empty($forum_page['text_options']) ? ' class="first-item"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies']).'">'.$lang_common['Smilies'].'</a></span>';

// Setup breadcrumbs
$forum_page['crumbs'][] = array($forum_config['o_board_title'], forum_link($forum_url['index']));
$forum_page['crumbs'][] = array($cur_posting['forum_name'], forum_link($forum_url['forum'], array($cur_posting['id'], sef_friendly($cur_posting['forum_name']))));
if ($tid)
    $forum_page['crumbs'][] = array($cur_posting['subject'], forum_link($forum_url['topic'], array($tid, sef_friendly($cur_posting['subject']))));
$forum_page['crumbs'][] = $tid ? $lang_post['Post reply'] : $lang_post['Post new topic'];