PDA

View Full Version : Smilies


WNM07
02-06-2009, 12:32 PM
Before I updated to 3.8.1, my smilies in quick reply would rotate several times per day. Now they are stagnant and they only time they rotate is when I delete a smilie. Any ideas?

dismas
02-06-2009, 04:54 PM
I'm pretty sure they rotate if all of their display orders are set to '1'. Unless that got changed with 3.8....

WNM07
02-06-2009, 05:10 PM
I'm pretty sure they rotate if all of their display orders are set to '1'. Unless that got changed with 3.8....

thay are all set to 1, but are not changing which is my dilemma! Thanks for the reply.

Lynne
02-06-2009, 05:16 PM
Take a look at includes/functions_editor.php at the query around line 588 (it says // query smilies there) and compare the file from your old version and the new version. See how the ORDER part has changed.

WNM07
02-06-2009, 05:33 PM
Take a look at includes/functions_editor.php at the query around line 588 (it says // query smilies there) and compare the file from your old version and the new version. See how the ORDER part has changed.

thank you very much!

--------------- Added 1233949123 at 1233949123 ---------------

Take a look at includes/functions_editor.php at the query around line 588 (it says // query smilies there) and compare the file from your old version and the new version. See how the ORDER part has changed.

it says:

// query smilies
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");

I think I overwrote the original file. Does this look right? Thanks again!

--------------- Added 1233949279 at 1233949279 ---------------

Since it's happening in the clickable smilie area below the quick reply bar, I wonder if this is the area I should be looking at?

// clickable smilie box
if ($vbulletin->options['smtotal'])
{
$vbulletin->db->data_seek($smilies, 0);
$i = 0;
$bits = array();
while ($smilie = $vbulletin->db->fetch_array($smilies) AND $i++ < $vbulletin->options['smtotal'])
{
$smiliehtml = "<img src=\"$smilie[smiliepath]\" id=\"{$editorid}_smilie_$smilie[smilieid]\" alt=\"" . htmlspecialchars_uni($smilie['smilietext']) . "\" title=\"" . htmlspecialchars_uni($smilie['title']) . "\" border=\"0\" class=\"inlineimg\" />";
eval('$bits[] = "' . fetch_template('editor_smilie') . '";');

if (sizeof($bits) == $vbulletin->options['smcolumns'])
{
$smiliecells = implode('', $bits);
eval('$smiliebits .= "' . fetch_template('editor_smiliebox_row') . '";');
$bits = array();
}
}

Lynne
02-06-2009, 05:54 PM
You should be able to download an old copy from vb.com of whatever version you were running and compare the query then. You need to compare the area where the query is made, not where it is spit out in the template.

WNM07
02-06-2009, 07:00 PM
You should be able to download an old copy from vb.com of whatever version you were running and compare the query then. You need to compare the area where the query is made, not where it is spit out in the template.

Both files completely the same. Back to square one.

eglyntine
05-26-2009, 11:55 PM
I know this post is pretty old but I just upgraded to 3.8.2 and noticed that my smilies weren't rotating like they should so I went searching and found this article. Of course it didn't have the answer but I figured it out so I thought I would pass it on for those of you that are still having the problem.

In includes/functions_editor.php find:

// query smilies
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");

Replace with:

// query smilies
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY rand()
");

It works like it should now. :)