• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Smiley Sprite Settings

If anybody else might be interested... :)

Attached is sql query for doing an update to your existing smilies as opposed to wiping out all of your existing smilies and the re-adding them. This way if somebody has many, many smilies installed already but want to use the new sprite versions for the default smilies then you won't have to wipe them all out and then re-add in the many, many other smilies. :)

This query will only be of use to if...
  • The paragraph above applies to you.
  • You have all 30 of the base smilies configured with the same titles as used here (http://xenforo.com/community/help/smilies).
  • You have the 5 extra smilies configured and titled (exactly) Alien, Poop, Ninja, Devil, Geek.
If you don't have all 35 configured already then it should be easy enough for you to find the ones you don't have in the query text & remove the ones you don't need.

If you don't have your smilies with the same titles then it should be easy enough for you to find the ones that have a different title & change the "WHERE title = '{x}';" to what you are using instead.

As usual, your mileage may vary but the query worked fine for me when run from phpMyAdmin.

Thanks again, Kier, for providing the initial set of values for the base 30 and to goblues & gldtn for the last couple of ones. You guys saved me a lot of time that I would've ended up spending in the smilie editor.

EDIT: Fixed "Devil" position.
 

Attachments

You should not have deleted the table, just empty/truncate it.

You won't be able to create any smilies now as the table doesn't exist.

You will need to restore that table from a backup, or run this script.

Code:
CREATE TABLE IF NOT EXISTS `xf_smilie` (
  `smilie_id` int(10) unsigned NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  `smilie_text` text NOT NULL,
  `image_url` varchar(200) NOT NULL,
  `sprite_mode` tinyint(3) unsigned NOT NULL default '0',
  `sprite_params` text NOT NULL,
  PRIMARY KEY  (`smilie_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=72 ;

Code:
Error
SQL query:

INSERT INTO `xf_smilie` (`smilie_id`, `title`, `smilie_text`, `image_url`, `sprite_mode`, `sprite_params`) VALUES (1,'Smile',':)\n:-)\n(:','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:0;s:1:\"y\";i:0;}'), (2,'Wink',';)','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-60;s:1:\"y\";i:-21;}'), (3,'Frown',':(','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";i:-42;}'), (4,'Mad',':mad:\n>:(\n:@','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-60;s:1:\"y\";i:0;}'), (5,'Confused',':confused:','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";i:-21;}'), (6,'Cool',':cool:\n8-)','styles/default/xenforo/xenforo-smilies-sprite.png',1,'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";[...]

MySQL said:

#1054 - Unknown column 'sprite_mode' in 'field list'
 
If anybody else might be interested... :)

Attached is sql query for doing an update to your existing smilies as opposed to wiping out all of your existing smilies and the re-adding them. This way if somebody has many, many smilies installed already but want to use the new sprite versions for the default smilies then you won't have to wipe them all out and then re-add in the many, many other smilies. :)

This query will only be of use to if...
  • The paragraph above applies to you.
  • You have all 30 of the base smilies configured with the same titles as used here (http://xenforo.com/community/help/smilies).
  • You have the 5 extra smilies configured and titled (exactly) Alien, Poop, Ninja, Devil, Geek.
If you don't have all 35 configured already then it should be easy enough for you to find the ones you don't have in the query text & remove the ones you don't need.

If you don't have your smilies with the same titles then it should be easy enough for you to find the ones that have a different title & change the "WHERE title = '{x}';" to what you are using instead.

As usual, your mileage may vary but the query worked fine for me when run from phpMyAdmin.

Thanks again, Kier, for providing the initial set of values for the base 30 and to goblues & gldtn for the last couple of ones. You guys saved me a lot of time that I would've ended up spending in the smilie editor.
Thanks I used your script to add the 5 extra smilies ;) but the devil has the same coords as the Ninja... the devil is at -80, -105.
 
Just checked in ACP-Home-Smilies and in XF 1.1 there are 12 smilies defined.
When I look in styles/default/xenforo/smilies-doodle there are 12 png files.
In styles/default/xenforo/smilies there are 30 png files -including the same named 12 again but they are of a different file size.

Above - Kevin refers to 30 base smilies..

Confused....
 
Just checked in ACP-Home-Smilies and in XF 1.1 there are 12 smilies defined.
When I look in styles/default/xenforo/smilies-doodle there are 12 png files.
In styles/default/xenforo/smilies there are 30 png files -including the same named 12 again but they are of a different file sizes.

Above - Kevin refers to 30 base smilies..

Confused....
By default a fresh install of XenForo only installs 11 smiley images but there are actually a lot more than that included now in the new sprite sheet (as of XF 1.1.0 & above). If you have not installed any additional smiley images yet then just follow the instructions Kier posted in the first post of this thread and you will end up with 30 smilies as can be seen here (http://xenforo.com/community/help/smilies).

My post is only applicable if you already have the additionasl smiley images configured in addition to a bunch of your own custom ones. For anybody running a fresh installation my post would not apply and they should go by Kier's 1st post in the thread.
 
Why in your database it only as 30 smilies and yet in the /styles/default/xenforo/xenforo-smilies-sprite.png it shows 35?
 

Attachments

  • xenforo-smilies-sprite.webp
    xenforo-smilies-sprite.webp
    10.7 KB · Views: 33
oh any idea which 5 are missing? and what coordinates I'd have to add?
 
Back
Top Bottom