| View previous topic :: View next topic |
| Author |
Message |
jazz
Joined: 30 Jan 2005 Posts: 5
|
Posted: Sun Jan 30, 2005 4:55 am Post subject: Smilies Plugins |
|
|
How about emoticons/smilies plugin under comments section?  |
|
| Back to top |
|
splash
Joined: 09 Feb 2005 Posts: 107 Location: Japan
|
Posted: Wed Feb 16, 2005 9:15 pm Post subject: A JavaScript will do. |
|
|
If you want emoticons like this forum's, this JavaScript will do.
1. Add this code between <head> and </head>
| Code: | <!--Smilies Start-->
{literal}
<script type="text/javascript" language="javascript">
<!--
function smilies(tag) {
var myField;
if (document.getElementById('content') && document.getElementById('content').type == 'textarea') {
myField = document.getElementById('content');
}
else if (document.getElementById('comment') && document.getElementById('comment').type == 'textarea') {
myField = document.getElementById('comment');
}
else {
return false;
}
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = tag;
myField.focus();
}
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
var cursorPos = endPos;
myField.value = myField.value.substring(0, startPos)
+ tag
+ myField.value.substring(endPos, myField.value.length);
cursorPos += tag.length;
myField.focus();
myField.selectionStart = cursorPos;
myField.selectionEnd = cursorPos;
}
else {
myField.value += tag;
myField.focus();
}
}
//-->
</script>
{/literal}
<!--Smilies End-->
|
2. Save the images from http://www.blogsome.com/blogs/blogs/wp-images/smilies/ or from http://www.1me.jp/users/files/filedownload.asp?fileid=8344.82244814428 (zipped file) to you PC and upload them to your blog.
3.Add this code below <label for="comment">{_e text="Your Comment"}</label> (from "comments" template)
You need to copy and pate the urls of the images you uploaded. src="Image Url"
| Code: |
<div id="smilies">
<img onclick="smilies(':smile:');" alt=":smile:"
src="/uploads/username/icon_smile.gif" width="15" height="15" />
<img onclick="smilies(':grin:');" alt=":grin:"
src="/upploads/username/icon_biggrin.gif" width="15" height="15" />
<img onclick="smilies(':lol:');" alt=":lol:"
src="/uploads/username/icon_lol.gif" width="15" height="15" />
<img onclick="smilies(':wink:');" alt=":wink:"
src="/uploads/username/icon_wink.gif" width="15" height="15" />
<img onclick="smilies(':cool:');" alt=":cool:"
src="/uploads/username/icon_cool.gif" width="15" height="15" />
<img onclick="smilies(':oops:');" alt=":oops:"
src="/uploads/username/icon_redface.gif" width="15" height="15" />
<img onclick="smilies(':mrgreen:');" alt=":mrgreen:"
src="/uploads/username/icon_mrgreen.gif" width="15" height="15" />
<img onclick="smilies(' :???:');" alt=":???:"
src="/uploads/username/icon_confused.gif" width="15" height="15" />
<img onclick="smilies(':sad:');" alt=":sad:"
src="/uploads/username/icon_sad.gif" width="15" height="15" />
<img onclick="smilies(':cry:');" alt=":cry:"
src="/uploads/username/icon_cry.gif" width="15" height="15" />
<img onclick="smilies(':roll:');" alt=":roll:"
src="/uploads/username/icon_rolleyes.gif" width="15" height="15" />
<img onclick="smilies(':shock:');" alt=":shock:"
src="/uploads/username/icon_surprised.gif" width="15" height="15" />
<img onclick="smilies(':eek:');" alt=":eek:"
src="/uploads/username/icon_eek.gif" width="15" height="15" />
<img onclick="smilies(':neutral:');" alt=":neutral:"
src="/uploads/username/icon_neutral.gif" width="15" height="15" />
<img onclick="smilies(':razz:');" alt=":razz:"
src="/uploads/username/icon_razz.gif" width="15" height="15" />
<img onclick="smilies(':mad:');" alt=":mad:"
src="/uploads/username/icon_mad.gif" width="15" height="15" />
<img onclick="smilies(':evil:');" alt=":evil:"
src="/uploads/username/icon_evil.gif" width="15" height="15" />
<img onclick="smilies(':twisted:');" alt=":twisted:"
src="/uploads/username/icon_twisted.gif" width="15" height="15" />
<img onclick="smilies(':!:');" alt=":!:"
src="/uploads/username/icon_exclaim.gif" width="15" height="15" />
<img onclick="smilies(':?:');" alt=":?:"
src="/uploads/username/icon_question.gif" width="15" height="15" />
<img onclick="smilies(':arrow:');" alt=":arrow:"
src="/uploads/username/icon_arrow.gif" width="15" height="15" />
<img onclick="smilies(':idea:');" alt=":idea:" rc="/uploads/username/icon_idea.gif" width="15" height="15" />
</div>
|
And done. It should work okay.  |
|
| Back to top |
|
obod Guest
|
Posted: Sat Apr 16, 2005 6:50 am Post subject: im-smiley |
|
|
| how 'bout im-smiley plugin (from priyadi.net)? gonna be awesome |
|
| Back to top |
|
numb
Joined: 25 Mar 2005 Posts: 13 Location: Singapore
|
Posted: Sat Apr 23, 2005 4:15 pm Post subject: |
|
|
I downloaded the zip file and tried to upload it.
But I was told "File Smilies.zip of type zip is not allowed."
what went wrong? _________________ Earth is not a cold dead place |
|
| Back to top |
|
splash
Joined: 09 Feb 2005 Posts: 107 Location: Japan
|
|
| Back to top |
|
numb
Joined: 25 Mar 2005 Posts: 13 Location: Singapore
|
Posted: Sun Apr 24, 2005 1:43 am Post subject: |
|
|
i see. thank u very much. I will try that. _________________ Earth is not a cold dead place |
|
| Back to top |
|
numb
Joined: 25 Mar 2005 Posts: 13 Location: Singapore
|
Posted: Sun Apr 24, 2005 6:13 am Post subject: |
|
|
I've uploaded the images, but I don't understand about the 3rd step.
Do I need to add " <label for="comment">{_e text="Your Comment"}</label>" myself?
And where's the "comment" template?
Thanks in advance. _________________ Earth is not a cold dead place |
|
| Back to top |
|
splash
Joined: 09 Feb 2005 Posts: 107 Location: Japan
|
Posted: Sun Apr 24, 2005 6:50 am Post subject: |
|
|
| numb wrote: | I've uploaded the images, but I don't understand about the 3rd step.
Do I need to add " <label for="comment">{_e text="Your Comment"}</label>" myself? And where's the "comment" template?
|
The comment template is Manage >> Files >> Comments. _________________ Search the Forum First
http://www.blogsome.com/forum/search.php
Got a question about CSS or HTML?
Then go to http://www.blogsome.com/forum/viewforum.php?f=8 NOT HERE!
Last edited by splash on Sun Apr 24, 2005 11:06 am; edited 1 time in total |
|
| Back to top |
|
numb
Joined: 25 Mar 2005 Posts: 13 Location: Singapore
|
Posted: Sun Apr 24, 2005 7:14 am Post subject: |
|
|
Finally I got it done.
Thank you so much splash! _________________ Earth is not a cold dead place |
|
| Back to top |
|
herry
Joined: 07 Jan 2006 Posts: 42
|
Posted: Wed Oct 18, 2006 9:36 am Post subject: |
|
|
i couldn't download it from the links you've mentioned above, splash. So i had to figure some way around.
I understand that all the smilies is placed in
| Code: | | http://xxxxxx.blogsome.com/wp-images/smilies/ |
so instead of download the file and upload it one by one, i just 'tweak' splash's html code. every
| Code: | | src="/upload/username/xxxxxxxx.gif" |
i renamed into
| Code: | | "src="/wp-images/smilies/xxxxxxxx.gif" |
Just place the javascript as splash has mentioned, and place the html code just where you want the smileys to be shown.
no need to download and reupload it one by one  _________________ :: suluk.blogsome.com |
|
| Back to top |
|
|