Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Insert Smiley Plugin



kimastergeorge
Novice

Oct 3, 2004, 7:43 PM


Views: 103674
Insert Smiley Plugin

Well... I think I have it. It's attatched, but I didn't include all the smileys from the 2.3 plugin; Just download that file and copy the whole smiley folder from there to my smiley folder. As usual, unzip the file into the plugins folder, then include with the following two statements:

Code
HTMLArea.loadPlugin("InsertSmiley"); 
//...
editor.registerPlugin(InsertSmiley);

I will not make any guarantees about it working with IE... I have no (working) copy of it to test with (mine won't display popup windows, but, when testing with workarounds, it works fine). If you have any bugs to report, please post them in this thread.
EDIT: Oh, by the way, it may be slow starting up, because it has to generate the whole table. Be patient.


(This post was edited by kimastergeorge on Nov 2, 2004, 5:43 PM)
Attachments: InsertSmiley.zip (3.36 KB)


Sobreira
Novice

Oct 4, 2004, 4:09 AM


Views: 103654
Re: [kimastergeorge] Insert Smiley Plugin

Thanks, I will test it. (I have Mozilla Firefox and MS I.E. 6.0 SP2).


Sobreira
Novice

Oct 8, 2004, 5:26 AM


Views: 103608
Re: [kimastergeorge] Insert Smiley Plugin

It works in Mozilla Firefox 0.9.3 and Microsoft Internet Explorer 6.0 SP2, but in IE the popup window is too small, could you fix that?

Other sugestion is that, sometimes, peoples don't have all the smiley ordered... for example I have these smileys: 1.gif,2.gif,4.gif,5.gif,8.gif,10.gif... In the smileys page, the 3.gif, 6.gif, 7.gif and 9.gif are also showed with text "Smiley 3/6/7/9"...

It would be better if the smileys that don't exists don't appear in the smileys page...

Hope you agree, and try correct that ;)

Regards,
André.


Sobreira
Novice

Oct 8, 2004, 6:15 AM


Views: 103606
Re: [Sobreira] Insert Smiley Plugin

Correct the problem related with the size of the window in IE.

Change line 18 of /popups/insertsmiley.html to:


Code
window.resizeTo(400, 300);


*Remove the condition of documentall... so the resize is done first.

About my sugestion... I'm waiting for your reply.

Thanks in advance.


kimastergeorge
Novice

Oct 8, 2004, 5:59 PM


Views: 103591
Re: [Sobreira] Insert Smiley Plugin

I don't understand... They don't have to have the smileys ordered, they just have to have every one from 1 to 580. If you changed the names to 1, 2, 3, etc. rather than 0001, 0002 etc., simply remove this block of code:

Code
if(i < 1000) { 
if(i < 100) {
if(i < 10) {
inum = "000" + i;
} else {
inum = "00" + i;
}
} else {
inum = "0" + i;
}
}
else {
inum = i;
}

And replace it with this code:

Code
inum = i;

I can't check which smileys they do have unless I use PHP, ASP, Perl, etc., and I want it to work on any server. To change how many smileys there are, change this line:

Code
var totalsmileys = 580;

EDIT: Including updated file in original post.


(This post was edited by kimastergeorge on Oct 8, 2004, 6:01 PM)


Timelesk
New User

Oct 31, 2004, 4:17 AM


Views: 103382
Re: [kimastergeorge] Insert Smiley Plugin

Hi,

can you update your smilie-plugin-file, please?
If I downloaded your attachment I get an error that the file isn't correct.

thx


kimastergeorge
Novice

Nov 1, 2004, 8:34 PM


Views: 103345
Re: [Timelesk] Insert Smiley Plugin

Could you specify please?
What does "file isn't correct" mean?


Timelesk
New User

Nov 2, 2004, 2:06 AM


Views: 103330
Re: [kimastergeorge] Insert Smiley Plugin

Hi,

download your attachment: http://www.htmlarea.com/cgi-bin/forum/gforum.cgi?do=post_attachment;postatt_id=1559;

and then open it. The file size is incorrect, you cannot open this zip-file.


(This post was edited by Timelesk on Nov 2, 2004, 2:06 AM)


kimastergeorge
Novice

Nov 2, 2004, 5:42 PM


Views: 103282
Re: [Timelesk] Insert Smiley Plugin

You're right. It must have been broken when they switched to htmlarea.com (maybe not... nevertheless i'll re-upload it). Check my original post; I've updated it.


lama
New User

Nov 13, 2004, 2:44 AM


Views: 103114
Re: [kimastergeorge] Insert Smiley Plugin

It's found that, as using HTMLArea.replaceAll in body tag, smileys plugin will be disabled. How to fix it?

I simply want textarea of all (id=message/com_text/...) have this nice plugin. Pls tell me.

Sorry for my presentation style for I am newbie here...


kimastergeorge
Novice

Nov 13, 2004, 10:44 PM


Views: 103096
Re: [lama] Insert Smiley Plugin

I'm not sure... I don't know HTMLArea well enough to diagnose. Does it have no button, or the icons don't appear when you click on them?


lama
New User

Nov 14, 2004, 2:01 AM


Views: 103091
Re: [kimastergeorge] Insert Smiley Plugin

simply no button icon for smiley if HTMLArea.replace is used in script. Frown


iRAY
New User

Feb 10, 2005, 7:37 PM


Views: 102215
Re: [kimastergeorge] Insert Smiley Plugin

Hi,

I found a bug, that cause the plugin not working in FF 1.0. The patch is very simple:

Open InsertSmiley/insert-smiley.js and find:



Code
self.setTag(p);


Replace:

Code
self.setTag(p, editor);


and

Find:


Code
InsertSmiley.prototype.setTag = function(param) {  
HTMLAreaeditor.insertHTML("<img src=\"" + param.imgURL + "\" alt=\"\" />");
};


Replace:


Code
InsertSmiley.prototype.setTag = function(param, editor) {  
editor.insertHTML("<img src=\"" + param.imgURL + "\" alt=\"\" />");
};



bableson
New User

Feb 19, 2005, 9:39 PM


Views: 102011
Re: [kimastergeorge] Insert Smiley Plugin

I've got your plugin working (thanks!), but I have one problem - I can't find the smiley icons you used anywhere. I went over to the 2.03 forum and tried to download from your post there, but the link isn't working. Is there someplace else where the smileys folder can be found or can you post it here?

Thanks.