ElkArte Community

Extending Elk => Addons => Topic started by: Wizard on August 23, 2015, 06:14:45 pm

Title: Smile Set
Post by: Wizard on August 23, 2015, 06:14:45 pm
Was trying to install a smile set on local host based ElkArte. Sadly it doesn't work out as expected. See image below. Any assistance is appreciated

(http://www.elkarte.net/community/index.php?action=dlattach;topic=2852.0;attach=2690;image)
Title: Re: Smile Set
Post by: Flavio93Zena on August 23, 2015, 08:21:34 pm
Well, without telling us WHAT you tried to do exactly I feel there is basically nothing we can do..
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 12:59:12 am
You are kidding, right ? If not,

1. Create a smile set

2. Based on Spud's Android Smiles

3. Using another set of Smiles

4. Only smile code id displayed

5. Smiles not appearing
Title: Re: Smile Set
Post by: Flavio93Zena on August 24, 2015, 01:05:31 am
Help yourself then :)
Title: Re: Smile Set
Post by: emanuele on August 24, 2015, 02:21:39 am
Flavio it's not necessary to smite people. This Kindred-like answers are rather annoying to me. Thanks.

Wizard it's not necessary to think other are kidding, you didn't give any detail, and some context is needed in order to help out. So this Kindred-like answers are rather useless. Thanks.

Wizard form your description it seems the files are not copied in the appropriate directory. Honestly at the moment I don't remember the format of the files, are you sure you changed all the needed directory in package-info.xml?
Title: Re: Smile Set
Post by: Jorin on August 24, 2015, 03:03:06 am
Quote from: emanuele – Honestly at the moment I don't remember the format of the files...

My smileys are GIFs...
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 03:23:31 am
I am sorry if I hurt someone. Was too sleepy. Especially Flavio, please don't take it seriously.
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 03:25:13 am
Quote from: emanuele – Flavio it's not necessary to smite people. This Kindred-like answers are rather annoying to me. Thanks.

Wizard it's not necessary to think other are kidding, you didn't give any detail, and some context is needed in order to help out. So this Kindred-like answers are rather useless. Thanks.

Wizard form your description it seems the files are not copied in the appropriate directory. Honestly at the moment I don't remember the format of the files, are you sure you changed all the needed directory in package-info.xml?

I am using png files. Does converting them to GIF solve the issue ? I have a pretty decent no. of smiles whose code is not present with  current smile set. Wondering if that can cause any issue ?
Title: Re: Smile Set
Post by: Flavio93Zena on August 24, 2015, 03:43:09 am
Lol sorry ema, I was a bit "what the..?!" ;D

No problem, I just needed full details and the code used to try to understand what was wrong, because a "not working smiley" tells me as much as... Nothing ;D Still.. I don't get whether you are trying to replace the regular smileys or add new ones, deleting default or just packing up a smiley set, from the way I see it it could be any of these #_#

P.S.: if you compare me to Kinder again, I spam :D
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 03:45:57 am
I downloaded @Spuds  's Android pack, replaced the smiles using .png files by me and tried on local host.
Title: Re: Smile Set
Post by: Flavio93Zena on August 24, 2015, 03:47:01 am
Can't look at the code now but do PNGs actually work at all in smileys here?
Title: Re: Smile Set
Post by: wintstar on August 24, 2015, 04:16:06 am
I think that that needed to be replaced Smiley System. I have since been made an input for SMF => https://github.com/SimpleMachines/SMF2.1/issues/2985#issuecomment-132306920. The problem of the Smiley System is that file names are predefined. And therefore there will always be problems like this here. In my view, one should worry to renew the Smiley system.



Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 04:42:24 am
Quote from: Flavio93Zena – Can't look at the code now but do PNGs actually work at all in smileys here?

I am currently having issues with Droid smile pack. It comes as far as " Install Addon " option but no folder found at " New Smiley Set ". Interestingly, my custom smile pack's folder is available there.
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 04:48:07 am
Ok, it's working fine, with certain exceptions

(http://www.elkarte.net/community/index.php?action=dlattach;topic=2852.0;attach=2694;image)
Title: Re: Smile Set
Post by: Flavio93Zena on August 24, 2015, 04:55:07 am
I guess we gotta summon @Spuds then :P
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 05:00:54 am
GIF images are working fine. Just that only Smiles with pre defined names are working. How can we define new smile codes as a part of plugin ? ie, I have other smiles with short codes and names that are not present in default.
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 05:07:58 am
Progress so far. GIF smiles are working. But need to find a way to introduce new smile short codes before we can use it. Or will show broken smiles as in post above about Droid smiles.
Title: Re: Smile Set
Post by: wintstar on August 24, 2015, 05:08:37 am
That's the problem with the Smiley system. It is very cumbersome to insert your own smileys with its own name. Reading right here => https://github.com/SimpleMachines/SMF2.1/issues/2985 by me, this could be the solution:


QuoteHave got it now. But very inconvenient. Had to delete all Smileys Set in the Admin Center. Then I had to delete all of these files on the server, Then the contents of the folder "default" empty (except for index.php) and then add your own smileys. Very very awkward.

Title: Re: Smile Set
Post by: Jorin on August 24, 2015, 05:11:59 am
I use own smileys with their own codes without problems.  :o

Or is ist just a problem because you want to create an addon package? I got lost...
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 05:16:28 am
Yep, trying to write new smile short code via plugin itself.
Title: Re: Smile Set
Post by: Jorin on August 24, 2015, 05:18:59 am
Okay, sorry.  O:-)

A mod can delete my question and this post then...
Title: Re: Smile Set
Post by: wintstar on August 24, 2015, 05:20:50 am
I had to proceed written by me as above to insert these smileys. The Smiley system should be re-created.



Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 05:23:44 am
@wintstar , are you mentioning about adding custom smiles through ACP ? Can't we use custom XML file inside smile pack and add those new short codes ? Or does it require custom PHP file ?
Title: Re: Smile Set
Post by: wintstar on August 24, 2015, 05:56:38 am
I had also tried. I then deleted all the Admin Center Smiley Sets. Then all deleted on the server. All Smileys also deleted from the default folder. In Odner default I then inserted my smileys and even uploaded the folder with my smileys. Then I edited my own smileys in Admin Center. This Smileys system is too complicated for the other smileys with own filenames. So then were gone the error messages.
Title: Re: Smile Set
Post by: emanuele on August 24, 2015, 08:39:43 am
Yeah, smiley handling is somehow sub-optimal.
There is a lot of space for improvement.

I can't look at smiley until this evening (6/7 hours).
Title: Re: Smile Set
Post by: Spuds on August 24, 2015, 10:52:24 am
The smiley interface can be confusing for sure.  I'll try to explain it but I'm betting that I get it wrong since I'm often bamboozled by it!

First I believe it only works with gif files since we have to support animated smiles.  I wish apng had been adopted but no luck and although there are some alternatives, gif is the standard for the bouncing icons.

Second, it does not have "Enable customized smileys" enabled by default, and I'm not sure why that is even an option.  If that option (under smiley settings) is not enabled, then you can't add a new smiley set and make it the site default.

Once you enable that option, you can add smileys via the package manager.  It creates the new smiley directory and uploads the image files. The smiley manager will discover the new smiley directory for you but you will need to give that set a name.  I'm not sure there is a way to do that with the addon manager, so for now its a manual step. (package upload, install, add new smiley set, select the new directory that was created, give the set a name)

Each smiley set can have its own unique set of images for the defined codes, and you can add as many new codes as you want. 

Once you add a code, ALL smiley sets will look for an image to replace it with.  If a smiley set does not have an image, you need to add one yourself or set that smiley as hidden in those specific sets if you intend to use that set as the default or if you allow members to choose smiley sets.

The easiest thing to do is add a new smiley set, set it as the site default, don't allow members to choose their own set, and then add codes and images as you wish to your new set.
Title: Re: Smile Set
Post by: Spuds on August 24, 2015, 10:57:28 am
Quote from: Wizard – Ok, it's working fine, with certain exceptions

(http://www.elkarte.net/community/index.php?action=dlattach;topic=2852.0;attach=2694;image)
Just means there are no specific smileys for those codes.  Your choices are:
1) create a new smiley to use with those codes
2) use one of the existing images for those codes like cheezy and laugh
3) set the missing codes as hidden instead of post form (only small downside to that is if they are enabled in one set and not another)
Title: Re: Smile Set
Post by: Spuds on August 24, 2015, 10:59:01 am
Quote from: wintstar – I had to proceed written by me as above to insert these smileys. The Smiley system should be re-created.
Shamless plug: http://addons.elkarte.net/feature/emoji.html is a nice way to add a lot of smileys with type ahead like on github
Title: Re: Smile Set
Post by: wintstar on August 24, 2015, 11:07:12 am
@Spuds Smileys are a constituent of the forum system. It should be changed and not by Addons "improved". Current Smiley system is cumbersome and not easy to adapt to your own needs.

Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 11:27:38 am
QuoteEach smiley set can have its own unique set of images for the defined codes, and you can add as many new codes as you want. 

This is precisely what I want. How can I add new smile codes via Addon package ?
Title: Re: Smile Set
Post by: Wizard on August 24, 2015, 11:44:53 am
Success !!

Can you tell me how to hide these codes which are bare bones ?

 :-\  :-X  :-[  :P  ::)  ???  :o  :D  :)
Title: Re: Smile Set
Post by: Flavio93Zena on August 25, 2015, 12:55:46 am
Dunno if they changed it but it used to be in each smiley setting, if you mean the hover popup text
Title: Re: Smile Set
Post by: meetdilip on August 25, 2015, 03:31:27 am
Yep, fixed it.