And some of the smilies are automatically resize. Is there an option not to resize them and just show the original size?
Thanks

mosymuis wrote: includes/functions_post.php:
$inline_columns = 4;
$inline_rows = 5;
$window_columns = 8;
Code: Select all
#########################################################
## Mod Title: Smilies Dropdown (was: Drop Down Smilie MOD Part 1)
## Mod Version: 1.0.0
## phpBB Version: 2.0.8
##
## Auther: Afkamm (phpbb_AT_afkamm.co.uk)
## Original Author: radmanics <radmanics@dial.pipex.com> (David Race) http://members.lycos.co.uk/coolcodesportal/
##
## Description: Makes a select, drop down box, which
## contains a list of all the smilies
## installed on you board. When you select
## a smiley, it appears next to the box.
## The smiliey code is then inserted
## like normal (by clicking on it)
##
## Installation Level: Easy
## Installation Time: 5-10 minutes
## Files To Edit: posting.php
## privmsg.php
## templates/subSilver/posting_body.tpl
## includes/functions_post.php
## language/????/main_lang.php
##
#########################################################
## Security Disclaimer: I take no responsibility for you putting a red item in with your whites. :P
#########################################################
## Notes:
## This MOD is more or less based on the Drop Down Smilie MOD by radmanics.
## Some of the javascript code from that MOD was used in this MOD.
## Please note that this MOD was created with pnphpBB (pn = postnuke) and
## although every care was taken to assure cross compatibility, there
## could be an issue or two, but I highly doubt it. :D
## Any problems or questions then please contact me. -- Marc :)
##
##
## Original Notes:
## This MOD is inspired (and some of it is modified code) of the UBB
## version. It uses the smiliy's name in the select box though.
## Be careful not to alter ANY of the javascript unless you know what
## you are doing, and have a good reason for it, other wise the MOD wont
## work AT ALL!!!! so be careful :)
#########################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#########################################################
#
#-----[ OPEN ]-----
#
posting.php
#
#-----[ FIND ]-----
#
// Generate smilies listing for page output
generate_smilies('inline', PAGE_POSTING);
#
#-----[ ADD AFTER ]-----
#
// Generate smilies dropdown
generate_smilies_dropdown();
#
#-----[ SAVE - CLOSE posting.php ]-----
#
#
#-----[ OPEN ]-----
#
privmsg.php
#
#-----[ FIND ]-----
#
generate_smilies('inline', PAGE_PRIVMSGS);
#
#-----[ AFTER, ADD ]-----
#
// Generate smilies dropdown
generate_smilies_dropdown();
#
#-----[ SAVE - CLOSE privmsg.php ]-----
#
#-----[ OPEN ]-----
#
posting_body.tpl
#
#-----[ FIND ]-----
#
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
#
#---[ ADD AFTER ]-----
#
// Start smilies drop down menu mod
smile1_help = "{L_SMILEY_MENU1}";
smile2_help = "{L_SMILEY_MENU2}";
// This function was taken from phpBB smiley admin panel
function update_smiley(newimage) {
document.smiley_image.src = "{S_SMILEY_BASEDIR}/" + newimage;
}
// This function taken and modified from the UBB version.
function emoticon_drop(text) {
emoticon_code = "" + text;
current_msg = document.post.message.value;
document.post.message.value = current_msg+emoticon_code;
document.post.message.focus();
return;
}
// End smilies drop down menu mod
#
#-----[ FIND ]-----
#
<td nowrap="nowrap" align="right"><span class="gensmall"><a
href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
#
#-----[ AFTER, ADD ]-----
#
<tr>
<td colspan="9" class="genmed"> {L_SMILIES}:
<select name="smile_url"
onchange="update_smiley(this.options[selectedIndex].value);" onmouseover="helpline('smile1')">
{S_DROP_DOWN}
</select>
<img name="smiley_image" src="{SMILEY_IMG}" border="0" alt=""
onmouseover="helpline('smile2'); this.style.cursor='hand';"
onclick="emoticon_drop(document.post.smile_url.options[document.post.smile_url.selectedIndex].id)" />
</td>
</tr>
#
#-----[ SAVE - CLOSE post_body.tpl ]-----
#
#
#-----[ OPEN ]- -----
#
functions_post.php
#
#-----[ FIND ]-----
#
function generate_smilies($mode, $page_id)
{
...... locate the full function
}
#
#-----[ AFTER, ADD ]-----
#
function generate_smilies_dropdown()
{
global $db, $board_config, $template, $lang, $phpbb_root_path;
// Get all the smilies.
$sql = "SELECT code, smile_url FROM " . SMILIES_TABLE . " ORDER BY code ASC";
$result = $db->sql_query($sql);
if( !$result ) { message_die(GENERAL_ERROR, "Couldn't obtain smilies from database", "", __LINE__, __FILE__,
$sql); }
$smile_row = $db->sql_fetchrowset($result);
$count = $db->sql_numrows($result);
// Setup the drop down menu of smiley filenames for the add part of the page.
$filename_list = '';
for ($i=1; $i<=$count; $i++) {
$filename_list .= '<option value="' . $smile_row[$i]['smile_url'] . '" id=" ' . $smile_row[$i]['code'] .
' ">' . $smile_row[$i]['code'] . '</option>';
}
$template->set_filenames(array(
"body" => "posting_body.tpl")
);
$template->assign_vars(array(
"L_SMILIES" => $lang['dropdown_title'],
"L_SMILEY_MENU1" => $lang['dropdown_smilies1'],
"L_SMILEY_MENU2" => $lang['dropdown_smilies2'],
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_row[1]['smile_url'],
"SMILEY_CODE" => $smile_row[1]['code'],
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'],
"S_DROP_DOWN" => $filename_list)
);
} // End generate_smilies_dropdown
#
#-----[ SAVE - CLOSE functions_post.php ]-----
#
#-----[ OPEN ]-----
#
language/????/lang_main.php
#
#-----[ FIND ]-----
#
$lang['bbcode_s_help'] = 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000';
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
#
#-----[ AFTER, ADD ]-----
$lang['dropdown_title'] = 'Smilies';
$lang['dropdown_smilies1'] = 'Select a smiley.';
$lang['dropdown_smilies2'] = 'Click smiley to enter code.';
#
#------[ SAVE - CLOSE language/????/lang_main.php ]-----
#
#
# That's All Folks!
#
Code: Select all
$template->assign_vars(array(
"L_SMILIES" => $lang['dropdown_title'],
"L_SMILEY_MENU1" => $lang['dropdown_smilies1'],
"L_SMILEY_MENU2" => $lang['dropdown_smilies2'],
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_row[1]['smile_url'],
"SMILEY_CODE" => $smile_row[1]['code'],
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'],
"S_DROP_DOWN" => $filename_list)
);
Code: Select all
$template->assign_vars(array(
"L_SMILIES" => $lang['dropdown_title'],
"L_SMILEY_MENU1" => $lang['dropdown_smilies1'],
"L_SMILEY_MENU2" => $lang['dropdown_smilies2'],
"SMILEY_IMG" => $board_config['smilies_path'] . '/' . $smile_row[1]['smile_url'],
"SMILEY_CODE" => $smile_row[1]['code'],
"S_SMILEY_BASEDIR" => $board_config['smilies_path'],
"S_DROP_DOWN" => $filename_list)
);