MyBB Community Forums

Full Version: About smilies popup window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I have too many smilies.
I want to show smilies as 3 COLUMNS in smilies popup window (in misc.php page).

How can I do that?

Thank you.
Hello there

Open misc.php

find
while($smilie = $db->fetch_array($query))
		{
			$smilie['insert'] = addslashes($smilie['find']);
			$smilie['find'] = htmlspecialchars_uni($smilie['find']);
			eval("\$smilies .= \"".$templates->get("misc_smilies_popup_smilie")."\";");
			if($e == 2)
			{
				$smilies .= "</tr><tr>";
				$e = 1;
				$class = alt_trow();
			}
			else
			{
				$e = 2;
			}
		}
		if($e == 2)
		{
			$smilies .= "<td colspan=\"2\" class=\"$class\">&nbsp;</td>";
		}

replace with
while($smilie = $db->fetch_array($query))
		{
			if($e == 4)
			{
				$smilies .= "</tr><tr>";
				$e = 1;
				$class = alt_trow();
			}
			$smilie['insert'] = addslashes($smilie['find']);
			$smilie['find'] = htmlspecialchars_uni($smilie['find']);
			eval("\$smilies .= \"".$templates->get("misc_smilies_popup_smilie")."\";");
			$e++;
		}
		if($e == 3)
		{
			$smilies .= "<td colspan=\"2\" class=\"$class\">&nbsp;</td>";
		}

Now in misc_smilies_popup template
change all
colspan="4"
to
colspan="6"

to change the width of the popup, edit ./jscripts/editor.js

there you find
MyBB.popupWindow('misc.php?action=smilies&popup=true&editor='+editor, 'sminsert', 240, 280);
just change the number at the end.
Great.
Thank you very much.