MyBB Community Forums

Full Version: [F] More smilies link doesn't show in some cases
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If the No. of Smilies to show setting is greater than or equal to the number of smilies configured to show in the clickable smilies list the More Smilies link doesn't show even though more smilies are available.

I have over 30 smilies installed. 16 are configured to show in the Clickable Smilies box.

I have to set the No. of Smilies in the Clickable Smilies box to 15 to get the More Smilies link to show

I would set them all to show but it spoils the layout because of their width and height etc.
Link to forum, or screenshots of the bug?
Smilie cache (16 clickable highlighted in bold):

Quote:Array
(
[65] => Array
(
[sid] => 65
[name] => Icon_surprised
[find] => :icon_surprised:
[image] => images/smilies/icon_surprised.gif
[disporder] => 0
[showclickable] => yes
)

[62] => Array
(
[sid] => 62
[name] => Icon_rolleyes
[find] => :icon_rolleyes:
[image] => images/smilies/icon_rolleyes.gif
[disporder] => 0
[showclickable] => yes
)

[53] => Array
(
[sid] => 53
[name] => Icon_confused
[find] => :icon_confused:
[image] => images/smilies/icon_confused.gif
[disporder] => 0
[showclickable] => yes
)

[66] => Array
(
[sid] => 66
[name] => Icon_thumb3d
[find] => :icon_thumb3d:
[image] => images/smilies/icon_thumb3d.gif
[disporder] => 0
[showclickable] => yes
)

[50] => Array
(
[sid] => 50
[name] => Hatespammers
[find] => :hatespammers:
[image] => images/smilies/hatespammers.gif
[disporder] => 0
[showclickable] => no
)

[61] => Array
(
[sid] => 61
[name] => Icon_redface
[find] => :icon_redface:
[image] => images/smilies/icon_redface.gif
[disporder] => 0
[showclickable] => yes
)

[80] => Array
(
[sid] => 80
[name] => Whenitsdone
[find] => :whenitsdone:
[image] => images/smilies/whenitsdone.gif
[disporder] => 0
[showclickable] => no
)

[77] => Array
(
[sid] => 77
[name] => Twocents
[find] => :twocents:
[image] => images/smilies/twocents.gif
[disporder] => 0
[showclickable] => no
)

[71] => Array
(
[sid] => 71
[name] => Offtopic
[find] => :offtopic:
[image] => images/smilies/offtopic.gif
[disporder] => 0
[showclickable] => no
)

[79] => Array
(
[sid] => 79
[name] => Wallbash
[find] => :wallbash:
[image] => images/smilies/wallbash.gif
[disporder] => 0
[showclickable] => no
)

[58] => Array
(
[sid] => 58
[name] => Icon_mad
[find] => :icon_mad:
[image] => images/smilies/icon_mad.gif
[disporder] => 0
[showclickable] => yes
)

[82] => Array
(
[sid] => 82
[name] => Yeahthat
[find] => :yeahthat:
[image] => images/smilies/yeahthat.gif
[disporder] => 0
[showclickable] => no
)

[57] => Array
(
[sid] => 57
[name] => Icon_lol
[find] => :icon_lol:
[image] => images/smilies/icon_lol.gif
[disporder] => 0
[showclickable] => yes
)

[56] => Array
(
[sid] => 56
[name] => Icon_eek
[find] => :icon_eek:
[image] => images/smilies/icon_eek.gif
[disporder] => 0
[showclickable] => yes
)

[55] => Array
(
[sid] => 55
[name] => Icon_cry
[find] => :icon_cry:
[image] => images/smilies/icon_cry.gif
[disporder] => 0
[showclickable] => yes
)

[76] => Array
(
[sid] => 76
[name] => Ttidead
[find] => :ttidead:
[image] => images/smilies/ttidead.gif
[disporder] => 0
[showclickable] => no
)

[81] => Array
(
[sid] => 81
[name] => Worthy
[find] => :worthy:
[image] => images/smilies/worthy.gif
[disporder] => 0
[showclickable] => no
)

[75] => Array
(
[sid] => 75
[name] => Stupid
[find] => :stupid:
[image] => images/smilies/stupid.gif
[disporder] => 0
[showclickable] => no
)

[70] => Array
(
[sid] => 70
[name] => Newbie
[find] => :newbie:
[image] => images/smilies/newbie.gif
[disporder] => 0
[showclickable] => no
)

[83] => Array
(
[sid] => 83
[name] => Brokenimg
[find] => :broken:
[image] => images/smilies/brokenimg.gif
[disporder] => 0
[showclickable] => no
)

[49] => Array
(
[sid] => 49
[name] => Crazy
[find] => :crazy:
[image] => images/smilies/crazy.gif
[disporder] => 0
[showclickable] => no
)

[74] => Array
(
[sid] => 74
[name] => Spam1
[find] => :spam1:
[image] => images/smilies/spam1.gif
[disporder] => 0
[showclickable] => no
)

[78] => Array
(
[sid] => 78
[name] => W00t
[find] => :w00t:
[image] => images/smilies/w00t.gif
[disporder] => 0
[showclickable] => no
)

[73] => Array
(
[sid] => 73
[name] => Soon
[find] => :soon:
[image] => images/smilies/soon.gif
[disporder] => 0
[showclickable] => no
)

[72] => Array
(
[sid] => 72
[name] => Old
[find] => :old:
[image] => images/smilies/old.gif
[disporder] => 0
[showclickable] => no
)

[51] => Array
(
[sid] => 51
[name] => Hug
[find] => :hug:
[image] => images/smilies/hug.gif
[disporder] => 0
[showclickable] => no
)

[69] => Array
(
[sid] => 69
[name] => Lol
[find] => :lol:
[image] => images/smilies/lol.gif
[disporder] => 0
[showclickable] => no
)

[68] => Array
(
[sid] => 68
[name] => Inq
[find] => :inq:
[image] => images/smilies/inq.gif
[disporder] => 0
[showclickable] => no
)

[52] => Array
(
[sid] => 52
[name] => Icon_cheesygrin
[find] => Big Grin
[image] => images/smilies/icon_cheesygrin.gif
[disporder] => 0
[showclickable] => yes
)

[59] => Array
(
[sid] => 59
[name] => Icon_neutral
[find] => :|
[image] => images/smilies/icon_neutral.gif
[disporder] => 0
[showclickable] => yes
)

[60] => Array
(
[sid] => 60
[name] => Icon_razz
[find] => :p
[image] => images/smilies/icon_razz.gif
[disporder] => 0
[showclickable] => yes
)

[63] => Array
(
[sid] => 63
[name] => Icon_sad
[find] => Sad
[image] => images/smilies/icon_sad.gif
[disporder] => 0
[showclickable] => yes
)

[64] => Array
(
[sid] => 64
[name] => Icon_smile
[find] => Smile
[image] => images/smilies/icon_smile.gif
[disporder] => 0
[showclickable] => yes
)

[67] => Array
(
[sid] => 67
[name] => Icon_wink
[find] => Wink
[image] => images/smilies/icon_wink.gif
[disporder] => 0
[showclickable] => yes
)

[54] => Array
(
[sid] => 54
[name] => Icon_cool
[find] => B)
[image] => images/smilies/icon_cool.gif
[disporder] => 0
[showclickable] => yes
)

)

[attachment=4887]
With No. of Smilies to show set to 15

[attachment=4888]
With No. of Smilies to show set to 16 or more
ACP -> Board Settings -> Change -> Clickable Smilies and BB Code -> No. of Smilies to show

What is that set to?
I wrote that in my reply underneath the images............

With 16 smilies configured in the Smilie Manager to show:

ACP -> Board Settings -> Change -> Clickable Smilies and BB Code -> No. of Smilies to show = 15:
More Smilies link shows

ACP -> Board Settings -> Change -> Clickable Smilies and BB Code -> No. of Smilies to show = 16 or higher:
More Smilies link doesn't show
If you want more to show, then you'll have to change more to 'show clickable' => yes

if(!$smiliecache)
		{
			$query = $db->simple_select(TABLE_PREFIX."smilies", "*", "showclickable != 'no'", array('order_by' => 'disporder'));

			while($smilie = $db->fetch_array($query))
			{
				$smiliecache[$smilie['find']] = $smilie['image'];
				++$smiliecount;
			}
		}
 ...

if($mybb->settings['smilieinsertertot'] >= $smiliecount)
			{
				$mybb->settings['smilieinsertertot'] = $smiliecount;
			}
			else if($mybb->settings['smilieinsertertot'] < $smiliecount)
			{
				$smiliecount = $mybb->settings['smilieinsertertot'];
				eval("\$getmore = \"".$templates->get("smilieinsert_getmore")."\";");
			}

It only counts the clickable smilies. I'm not sure if this is the intended way it's supposed to work or not.
But I don't want more to show in the clickable smilies box, I just want the More Smilies link to appear which is how it is supposed to work.........a few of the smilies are large and would break the layout of the clickable smilies box otherwise there is no point in having the More Smilies and Clickable Smilies, you might as well show all the smilies in the Clickable Smilies box.
This should fix it
Yep that did the trick..........thanks

I'd worked out what to do but didn't know how to do it without breaking the script.

Thought it was best left to a dev. Smile
This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.