Emotions

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
cybertai
Registered User
Posts: 156
Joined: Tue Jul 29, 2003 1:20 pm

Emotions

Post by cybertai »

Hi is there a mod that will show ALL the smiles instead of just 20 ?
And some of the smilies are automatically resize. Is there an option not to resize them and just show the original size?
Thanks :D
cybertai
Registered User
Posts: 156
Joined: Tue Jul 29, 2003 1:20 pm

Post by cybertai »

bumb
toxckrayon
Registered User
Posts: 342
Joined: Mon Feb 18, 2002 4:44 pm
Location: New York City
Contact:

Post by toxckrayon »

you can change the $columns and $rows (those might not be the exact names) in the posting.php to reflect whatever grid settings you want.
the world's combined intelligence is a constant; the population is expanding
timbercrawler
Registered User
Posts: 99
Joined: Mon Jul 21, 2003 1:25 am
Location: Seattle
Contact:

Post by timbercrawler »

Hmmm I run the fiplain template and there is no varibales like that, it is called like:

SMILEY_CODE

where the heck is that defined? I'd like to run just a few extra rows and no pop-up...
User avatar
mosymuis
Registered User
Posts: 319
Joined: Mon Dec 30, 2002 9:12 pm
Location: Amsterdam
Name: Rens
Contact:

Post by mosymuis »

includes/functions_post.php:
$inline_columns = 4;
$inline_rows = 5;
$window_columns = 8;
timbercrawler
Registered User
Posts: 99
Joined: Mon Jul 21, 2003 1:25 am
Location: Seattle
Contact:

Post by timbercrawler »

yeah, found it last night. Thanks though!
Afkamm
Registered User
Posts: 178
Joined: Fri Sep 06, 2002 6:57 pm
Location: Britain
Contact:

Post by Afkamm »

mosymuis wrote: includes/functions_post.php:
$inline_columns = 4;
$inline_rows = 5;
$window_columns = 8;

Look for a MOD by Smartor called Configurable Smilies Table. Once the MOD is applied, you'll be able to adjust these three values from the Admin/Configuration page. :)

cybertai, if you have a lot of smilies, having them all displayed there will look unsightly and waste bandwidth. Just my 2 pence worth. :)

As for the smilies being resized, width and height has been hard coded at 15. Find and open posting_body.tpl and search for width="15" height="15". Then just delete it. :)
timbercrawler
Registered User
Posts: 99
Joined: Mon Jul 21, 2003 1:25 am
Location: Seattle
Contact:

Post by timbercrawler »

anyone know of a smiley dropdown box mod for 2.0.6 or higher? I tried the one on phpbbhacks.com but it was for 2.0.1 and didn't work. I just want it to be a little easier to post them, popping up a whole new page takes awhile. I have like 50 smilies.
Afkamm
Registered User
Posts: 178
Joined: Fri Sep 06, 2002 6:57 pm
Location: Britain
Contact:

Post by Afkamm »

This works with pnphpBB, but nothing major gets changed so it should work on a normal phpbb.

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">&nbsp;&nbsp;{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!
#
Incase you're wondering, I made this up the now with the help of some javascript code from the Drop Down Smilie MOD. Let me know what you think. :)

This is an edit to the above, very important if you're using phpBB and not pnphpBB.

Find the following code in the function generate_smilies_dropdown()...

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) 
   ); 
And change to...

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) 
   ); 
All I've done is removed $phpbb_root_path . , this would stop the images from showing up. :) It's required in pnphpbb because of the location of the smiley folder.
Marc :)
Post Reply

Return to “[2.0.x] MOD Requests”