Loading...
 
Skip to main content

Features / Usability


More Smileys!!!

posts: 101
I'd like to add additional Smileys to Tiki's text editting window... how can I do that???
posts: 4664 Japan

> I'd like to add additional Smileys to Tiki's text editting window... how can I do that???

Upload the new images to the img/smiles/ directory (note the spelling there). The smiley images need to be gif files and have a names that start with icon_.

Then edit templates/tiki-smileys.tpl. Insert a new line for each new smiley, and follow the pattern of the smileys already there.

-- Gary

posts: 11 United States

> > I'd like to add additional Smileys to Tiki's text editting window... how can I do that???
>
> Upload the new images to the img/smiles/ directory (note the spelling there). The smiley images need to be gif files and have a names that start with icon_.
>
> Then edit templates/tiki-smileys.tpl. Insert a new line for each new smiley, and follow the pattern of the smileys already there.
>
> — Gary

Hi Gary,

I wanted to thank you for this reply, as I posted a similar question several days but didn't get any response. Your response here was what I was hoping to get 😊 Anyway, I followed the instruction you provided and I think everything is working. It's hard to tell, however. When attempting to edit a wiki page I can see the smileys, including my new ones...but my new smileys appear as text (instead of icons) and when adding a new smiley to a page they are not appearing.

I'm wondering if this behavior is related to caching? It would be nice to know how to make such template changes immediately available. Any thoughts on how to do that?

Thanks again,
Starlock

posts: 4664 Japan

In my experience the new smiley is available immediately. (I just did a test with the lastest Tiki version and that was the case.

I don't know what effect caching would have. At Zukakakina.com, "Cache wiki pages (global)" is set to 0 and "Individual cache" is off.

If you see text instead of the new smiley image in the smileys list on the editpage, then I suspect there was an error in the tiki-smileys.tpl edit or in the uploading of the image file. Double check that the file "icon_newsmiley.gif" (or whatever) is in the img/smiles/ directory. And make sure the line for the new smiley in templates/tiki-smileys.tpl is edited correctly and completely. You can see the above-linked page about the way I did the edit in my test.

-- Gary

posts: 11 United States

> In my experience the new smiley is available immediately. (I just did a test with the lastest Tiki version and that was the case.
>
> I don't know what effect caching would have. At Zukakakina.com, "Cache wiki pages (global)" is set to 0 and "Individual cache" is off.
>
> If you see text instead of the new smiley image in the smileys list on the editpage, then I suspect there was an error in the tiki-smileys.tpl edit or in the uploading of the image file. Double check that the file "icon_newsmiley.gif" (or whatever) is in the img/smiles/ directory. And make sure the line for the new smiley in templates/tiki-smileys.tpl is edited correctly and completely. You can see the above-linked page about the way I did the edit in my test.
>
> — Gary

Hi Gary,

Thanks for the reply and help. I disabled caching as you mentioned above, just to make sure changes are immediately available.

Next, I double-checked the uploaded gif files to make sure they were not corrupt and they all display just fine. So I dont think that is it.

I triple checked the template file and it looks perfectly fine to me. But just to make sure, I restored the backup template file and added just one new smiley image. Still no go.

This is incredibly strange as this process is trivial, but I simply cannot seem to add new smileys.

The only difference I could see in your Test example and what I did was restricting the image display height and width to 15 pixels. I removed those from my template to see if that made any difference but it did not.

I'm at a loss as to what my trouble is.

Any other ideas I might be able to pursue?

Thanks again for the help. I look forward to any other creative ideas I might be able to pursue.

-Starlock


posts: 101

Hi Gary, I had no problems with your instructions - thankyou!

Now I'm wondering if I can do the same thing with the images in the img/icons/ folder? I want to replace a lot of the images in there for a more customized feel, but I wasn't able to find an obvious equivalent to the templates/tiki-smileys.tpl file you initially mentioned. When I try to replace these images, they seem to be limited to 16x16px - can that be changed anywhere?

posts: 4664 Japan

The template (.tpl) files generally indicate the paths for the icons. For example, tiki-mytiki_bar.tpl displays the icons on the MyTiki pages. The 1.9.7 version of this file at least doesn't have any image size specifications, but if you're coming across them, then I guess some other templates do. Just delete those from the template file if you like. They're deprecated HTML anyway.

If you have a look at the Zuka theme, you can see there are a number of replaced icons there (notice the print icon, etc.). You just have to identify which template file is used to display the page (or part of it), and edit it if necessary to point to a new icon, eliminate the size indicators, or whatever. Looking at the files in the Zuka theme might be helpful.

If you use, or plan to use, more than one theme at your site and you don't want them to use the same icons, then the icons for the different themes should have different names or different paths so the theme templates call only their own icons. (The Zuka theme — since it's downloaded separately from the Tiki archive and needs to be kept simple to install — keeps its icons in a styles/zuka/icons/ directory, and its templates' icon file paths point there.)

-- Gary