hi, I didn't find a tool to create YAF smiley pak, so I coded it in a very simple C# tool
below there is the code, and I attached the zip with the exe file and the original C# project
you have to put your smiles/emoticons gif files in YAF images\emoticons directory (delete the existing files, if you don't want them) and copy there also the CreateSmileyPack.exe you find in the zip, then launch it
open with a text editor and check the new generated .pak file, because the max length of the names between the [ ... ] brackets is 8 chars, so the CreateSmileyPack takes the last 8 chars if the file name exceeds this length... in case of duplicated names, change the original file name and repeat the procedure
now you can see and upload the pak in your YAF forum settings -> smiles page
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CreateSmileyPak
{
class Program
{
static void Main(string[] args)
{
using (StreamWriter sw = File.CreateText(@"Emoticons " + DateTime.UtcNow.ToString("yyMMdd HHmmss") + ".pak"))
{
foreach (string file in Directory.EnumerateFiles(@".", "*.gif"))
{
// msp_angry.gif=+:Angry=+:ðŸ˜
string fileName = file.Replace(@".\", "");
string name = fileName.Replace(@".gif", "").Replace(@" ", "_");
sw.WriteLine(fileName + "=+:" + name + "=+:[" + name.Substring(Math.Max(0, name.Length - 8)) + "]");
Console.WriteLine(file + " OK!");
}
}
Console.WriteLine("\n-----\nPress a key to close...");
Console.ReadKey();
}
}
}
Edited by user
8 years ago
|
Reason: spelling error