4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: drhtm on February 14, 2003, 04:58:36 AM
-
Is it possible to add Emoticons like here in the forum to our comments forms? if so, i have a grip of wonderful emoticons to share!
In addition, how bout adding a reply button to the comments, so visitors could reply to another comment similar to this forum
here is an example of what i'm talking about
peace! and thanks in advance!
-
4images is not a forum system, and I belive there's no need to make if full of forum features
-
4images is not a forum system, and I belive there's no need to make if full of forum features
Okay i'm not saying to convert the 4images script into a forum ( 8O )...
I think its rediculous...besides that's why we have so many mods already for integration with different forums, right? but What if a site doesn't have a forum, and is only based on the 4images script, like mine!?! :lol:
The fact that the comments system is so plain worries me.( :? )..don't you think (wait you don't like this idea 8O ) doesn't anyone else think that this is a good idea just to make the 4images more interactive and colorful...the site i've created is a very personal photo album (family and friends only) and we would like to reply to each other's comments and add silly emoticons to our messages and so forth...I've integrated the shoutbox from W E B F R O O T (http://www.webfroot.co.nz/) and so far its a great hit among my visitors.
Its just a suggestion nothing more! I'm only trying to help come up with more fun interactive mods for all of us to enjoy. If its not duable then fine, but if someone can, I think it would be very popular among our visitors!
:wink: :wink: :roll: :wink: :wink:
-
Oh and its very funny how your site's design (http://faces.dalnet.ru/details.php?image_id=390&sessionid=2e0d27af2fab0f80c6760e7f2ef254b7&l=english)is strickingly similar to phpBB. I mean even your comments buttons are similar...I'm shocked you would say what you did!?! i would have guessed you would be the first person on top of this!
Oh well, life is strange like that i guess. :wink:
-
Here is the simplest way to show emoticons, without separate control from admin control panel. Its just replace special codes like " : ) ; ) " with image.
-------------------------------------------------------------------
example:
http://come.no-ip.com/details.php?image_id=7570&page=2#comments
-------------------------------------------------------------------
Step 1.
Open /includes/functions.php
Find:
$text = preg_replace("/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU", "<u>\\5</u>", $text);
Add right after it ( before " } "): $text = smilies($text);
1.2
Add at the end of the file, just before ?> :
//--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = array(
":)" => "smiley",
";)" => "wink",
":D" => "cheesy",
";D" => "grin",
":(" => "sad",
":o" => "shocked",
":O" => "shocked",
"8)" => "cool",
":P" => "tongue",
":p" => "tongue",
"???" => "huh",
":-[" => "embarassed",
":-X" => "lipsrsealed",
":-x" => "lipsrsealed",
":-'(" => "cry",
":-\\" => "undecided",
"::)" => "rolleyes"
);
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
//------End Smiles-------
Step 2.
Create new folder: /templates/<yourtemplate>/smiles/. Upload your smiles.
U can download "sample" :roll: smiles pack from here (http://home.attbi.com/~vanowm/smiles.zip)
2.2.
Edit $smilesfrom array with this format:
"CODE" => "FILENAME"
* CODE is a code for your emoticon, e.i ; ) or : D
* FILENAME is name of the file u want use for that emoticon, WITHOUT extension.
NOTE:
1. All images must be .gif
2. All items in the array, MUST have comma at the end (e.i "CODE" => "FILENAME", And ONLY last item in the array MUST NOT have the comma.
-
That's great!
Thanks...do you think a 'reply' is possible? :oops:
-
what do u mean 'reply'?
-
I mean...for example someone posts a comment on a image...then for example the owner likes to reply to a particular user's comments. Just like here in the forum...is it possible so that it shows up like this...
I'm replying to someone's comment
:roll:
-
I installed the mod with no problem but I think i'm having trouble with it
I realized for some reason i can't add more than one emoticon.
any ideas?
What do you think about the reply feature? is that possible as well?
-
I installed the mod with no problem but I think i'm having trouble with it
I realized for some reason i can't add more than one emoticon.
any ideas?
Add where?
u must use spaces between each emotion, but must not use spaces between caracters of emotion.
btw, it has a problem using < and > . :cry:
-
well i'm not sure why I can't add more than one emoticon...
I also realized if i hit return while im typing my message and then add a emoticon, it don't display it...very wierd..
BTW - do you know if its possible to add a reply feature to our comments? I think this would be great for personal websites like mine. :oops:
-
Dear V@no,
first of all I want to thank you for all of your effort and help for everyone at this place. Thanks a lot. I use a lot of your mods and I'm really glad with it.
(sorry for my english, it isn't the best anymore since I left school :wink:)
I just added this smiley-mod and I realized, that I have the same problem as the member before:
there is only ONE smiley at a time that I can use in one comment. If I want to use and show more than one, it is only the code like ": )" which is shown.
Could you help and share an idea how this could be corrected?
I'd be very, very thankful!
-
I dont know what to tell u, because it works just fine for me, I even install this mod on fresh, 4images installation.
make sure u use smile cods like this:
:)
:D
;)
:/
but not like this:
: )
: D
; )
: /
See the difference? - no spaces between caractes of smile code.
-
Oh, your answer was very fast :D
Yes, I proved it and it's okay. There are no spaces in the codes of funktion.php and there are no spaces when I write the code into a comment.
Do you use 4images Version 1.7? Could it be possible, that there is a difference from one version to another?
I'd really love to find out where's the mistake...
Thx!
-
Well, now I found out, that it sometimes works, sometimes not...
Please have a look:
http://www.hilfebullet.de/bibodia/4images/details.php?image_id=837
I tested it in the comments
-
yes, I use v1.7, and I think it's not really good/smart idea use out of date software :lol:
can u send me a link to your gallery?
so far, I have no idea what could be wrong.
-
I use 1.7 too :D
Here's the link where I tested the smilies:
http://www.hilfebullet.de/bibodia/4images/details.php?image_id=837
Have a look :wink:
-
I think I go to bed... It is 2 in the night and maybe I find the mistake with a fresh head at the morning :wink:
Good night so far...
And thanks a lot!
-
that was a bug...
the script didnt show smiles, when smile code is first caracter in the line.
here is the fix:
in the code u added in /includes/functions.php find:$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
Replace with:$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
I just edited the original code, so if u install this mod now, then, ignore this fix.
-
Yippeeeeeeeee! That's it!
Thank you very much!!!
-
I dont now why but i have this error :
Parse error: parse error, unexpected T_DOUBLE_ARROW, expecting ')' in /home/uniscree/public_html/gallery/includes/functions.php on line 1233
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Fatal error: Call to undefined function: smilies() in /home/uniscree/public_html/gallery/includes/functions.php on line 659
-
I dont now why but i have this error :
Parse error: parse error, unexpected T_DOUBLE_ARROW, expecting ')' in /home/uniscree/public_html/gallery/includes/functions.php on line 1233
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Warning: Cannot add header information - headers already sent by (output started at /home/uniscree/public_html/gallery/includes/functions.php:1233) in /home/uniscree/public_html/gallery/includes/sessions.php on line 107
Fatal error: Call to undefined function: smilies() in /home/uniscree/public_html/gallery/includes/functions.php on line 659
u did something wrong when inserted the code in functions.php.
check all closing brackets }
or "
-
Thanks...do you think a 'reply' is possible? :oops:
I think it is ;) :D :
http://come.no-ip.com/details.php?image_id=7570&page=3#comment56
it's mostly deppence on BBCode.
will try make tutorial for it. (no deadline though ;) )
-
HI V@no!
I have visited your page and i find your intigration of the smilies for the users more simply.
Can you make an toutorial for it?? :oops:
-
HI V@no!
I have visited your page and i find your intigration of the smilies for the users more simply.
Can you make an toutorial for it?? :oops:
do u mean just the smiles?
I did on previouse page...didnt I? :?
-
Hi, i mean the intigration of the BB code what you use on your page.
The users have only to push the smilie to take him to the post and not use this code sighns like this: : )
You can take a look on my page example (http://www.desktopart.de/details.php?image_id=300) and now on yours http://come.no-ip.com/details.php?image_id=7570&page=3#comment56
My english is bad but i hope you understand me what i mean :)
-
Hi, i mean the intigration of the BB code what you use on your page.
you got it ;):
http://4homepages.de/forum/viewtopic.php?p=20105#20105
just follow the replays, to get compleate version :D
-
hello V@no can u give code smile in your file includes/functions.php thank's :)
-
hello V@no can u give code smile in your file includes/functions.php thank's :)
I use smiles from Yahoo messanger ( u can find it on innet )//--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = get_smiles();
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
function get_smiles(){
$smilesfrom = array(
":)" => "happy",
"(:" => "happy",
":-))" => "very_happy",
":lol:" => "very_happy",
":D" => "big_smile",
":O" => "surprised",
":o" => "surprised",
";)" => "wink",
":wink:" => "wink",
":(" => "sad",
":*(" => "very_sad",
":cry:" => "very_sad",
":confused:" => "confused",
":shy:" => "embarrassed",
":vicious:" => "vicious",
":|" => "undecided",
":pig:" => "pig",
":P" => "tongue",
":p" => "tongue",
"B)" => "cool",
":B" => "nerd",
"X(" => "angry",
":X" => "in_love",
"|)" => "asleep",
"=;" => "talk_to_hand",
"@};-" => "rose",
"):)" => "cowboy",
"8X" => "skull",
"=:)" => "alien",
"0:)" => "angel",
":devil:" => "devil",
":clown:" => "clown",
"3:O" => "cow",
"3:o" => "cow",
":monkey:" => "monkey",
"(~~)" => "pumpkin",
"[-(" => "huff",
"*:)" => "bulb",
":$" => "shhh",
":chicken:" => "chicken",
"~o)" => "cup",
"%%-" => "clover",
"b(" => "beat_up",
":E:" => "peace",
":&" => "sick",
"=*" => "kiss",
";;)" => "flirt",
":?)" => "what",
"(%)" => "ying",
"o-+" => "april",
":billy:" => "billy",
":hiro:" => "hiro",
":mad:" => "mad",
":R:" => "praying",
"[-x" => "nono",
"[:D]" => "hugging",
":dance:" => "dancing",
"=D" => "applause",
"(?)" => "thinking",
":^o" => "liar",
"@)" => "hypnotized",
"8|" => "rolleyes",
"8}" => "crazy",
"?|" => "tired",
"=p~" => "drooling",
"$)" => "money",
":whistle:" => "whistling",
"#o" => "doh",
":alien:" => "alien2",
":S" => "scared"
);
return $smilesfrom;
}
function get_smiles_text() {
$smilesfrom = get_smiles();
$val_old = "";
$i = 0;
$val_old = array();
foreach ($smilesfrom as $key => $val) {
if (!in_array($val, $val_old)) {
$smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
}
$val_old[] = $val;
$i++;
if ($i > 18) {
$smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', 'HEIGHT=310,resizable=yes,scrollbars=yes,WIDTH=225');return false;\" target=\"_4imagessmilies\"> All Emoticons</a>";
return $smiles_text;
}
}
return $smiles_text;
}
//------End Smiles-------
-
thank's u give me the code but i can't text if use smile i don't know why , and i want code aim in comment and online offline too can u help me ???? http://www.vietbolsa.com/Gallery/details.php?image_id=59
-
thank's u give me the code but i can't text if use smile i don't know why , and i want code aim in comment and online offline too can u help me ????
sorry, I dont understand...code for what?
-
@Vano:
thank's for this code!!!
Is it possible to enable emoticons in image description?
-
Is it possible to enable emoticons in image description?
sure, open /includes/functions.php
find: $description = (!empty($image_row['image_description'])) ? $image_row['image_description'] : REPLACE_EMPTY;
replace with: $description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1) : REPLACE_EMPTY;
this will also add ability use BBCode in the description.
-
V@no,
is the WYSIWYG you have in your own site (Under the emotions icons) for the comments area, a hack from here? I tried to search for it but didn't find it. It's just so cool.
p.s. if this doesn't fit here, plz forgive me.
-
V@no,
is the WYSIWYG you have in your own site (Under the emotions icons) for the comments area, a hack from here? I tried to search for it but didn't find it. It's just so cool.
p.s. if this doesn't fit here, plz forgive me.
Just below this topic :P
http://www.4homepages.de/forum/viewtopic.php?t=4745
-
Looks great but is there a complete package with all the modified files that are needed to make it work :?:
-
hi! how can i use this in comment_form.html :
<!-- BEGIN SMILIES -->
<br>
<script language="JavaScript">
function PopUp(aaa,zz,xx,scrb){
var wsss = eval (screen.width/2 - zz/2);
var hsss = eval(screen.height/2 - xx/2);
helpWin = window.open(aaa,"imageWin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scrb+",resizable=0,width="+ zz +",height="+ xx +",left="+ wsss +",top="+ hsss +"");
}
</script>
<a href="JavaScript:paste_strinL(':)',0)"><img src="./img/smilies/grin.gif" border=0></a>
<a href="JavaScript:paste_strinL(';)',0)"><img src="./img/smilies/wink.gif" border=0></a>
<a href="JavaScript:paste_strinL(':up:',0)"><img src="./img/smilies/up.gif" border=0></a>
<a href="JavaScript:paste_strinL(':down:',0)"><img src="./img/smilies/down.gif" border=0></a>
<a href="JavaScript:paste_strinL(':biglol:',0)"><img src="./img/smilies/biglol.gif" border=0></a>
<a href="JavaScript:paste_strinL(':confused:',0)"><img src="./img/smilies/confused.gif" border=0></a>
<a href="JavaScript:paste_strinL(':cool:',0)"><img src="./img/smilies/cool.gif" border=0></a>
<a href="JavaScript:paste_strinL(':mad:',0)"><img src="./img/smilies/mad.gif" border=0></a>
<a href="JavaScript:paste_strinL(':sad:',0)"><img src="./img/smilies/sad.gif" border=0></a>
<a href="JavaScript:paste_strinL(':shame:',0)"><img src="./img/smilies/shame.gif" border=0></a>
<a href="JavaScript:paste_strinL(':smirk:',0)"><img src="./img/smilies/smirk.gif" border=0></a>
<a href="JavaScript:paste_strinL(':tongue:',0)"><img src="./img/smilies/tongue.gif" border=0></a>
<small><a href="javascript:PopUp('hack_smilies.php?p=display',150,400,1)">...</a></small>
<!-- END SMILIES -->
-
try this:
http://4homepages.de/forum/viewtopic.php?t=4745
P.S. u might need read through all replys to get the compleat "package"
-
oki :-) thx i have change the
//--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) ..........
Now i can click my smileys . i missing only 1 thing ..... i can´t see the ALL smiles button .... :oops:
-
need smilies?
go here:
http://home.t-online.de/home/herr.kaleu/Smileys/smileys.htm
-
Sorry aber so richtig bekomme ich es immer noch nicht mit den Smilies hin. Habe alles so gemacht wie es V@no beschrieben hat. Habe z.B. ein smilie das heißt arrow. Habe in den arry also geschrieben: "arrow" => "arrow". Damit müßte er doch dann das arrow.gif smilie einfügen. Er zeigt es zwar an, aber wenn ich drauf klicke, dann passiert nichts. Der jeweilige Code dafür sieht so aus:
<a href="javascript:setsmile('arrow')"><img border="0" src="{template_url}/smilies/arrow.gif" width="15" height="15"></a>
Was ist daran falsch?
thx
HaKkE
-
Great job! Thanks a lot.
I wish it would be a list of smileys next to the comment box and the users would easily choose a smiley from the list instead of writing the codes.
Isn't it possible?
-
Here is my Skype emoticons :wink:
//--------------------------
//--------Smiles------------
//--------------------------
function smilies($text,$enablesmilies = 1) {
global $smileyfromcache, $smileytocache;
$imagesdir = TEMPLATE_PATH."/smiles";
if(gettype($smileyfromcache) != "array") {
$smilesfrom = array(
":)" => "smile",
";)" => "wink",
":(" => "sad",
":D" => "laugh",
"8-)" => "calm",
":o" => "surprised",
";(" => "sob",
"(sweat)" => "sweat",
":|" => "silence",
":*" => "kiss",
":P" => "tonque",
":$" => "blush",
"(blush)" => "blush",
":^)" => "wondering",
"|-)" => "sleepy",
"|-(" => "dull",
"|(" => "dull",
"(inlove)" => "inlove",
"]:)" => "evil-grin",
"(talk)" => "talking",
"(yawn)" => "yawn",
"(puke)" => "puke",
"(doh)" => "doh",
":@" => "angry",
"(wasntme)" => "wasntme",
"(party)" => "party",
":S" => "worried",
"(mm)" => "mm",
"8-|" => "nerdy",
":x" => "lips",
":X" => "lips",
"(wave)" => "hi",
"(devil)" => "devil",
"(angel)" => "angel",
"(makeup)" => "makeup",
"(chuckle)" => "chuckle",
"(rofl)" => "rofl",
"(whew)" => "whew",
"(happy)" => "happy",
"(smirk)" => "smirk",
"(nod)" => "nod",
"(shake)" => "shake",
"(punch)" => "punch",
"(emo)" => "emo",
"(y)" => "y",
"(n)" => "n",
"(handshake)" => "handshake",
"(h)" => "heart",
"(u)" => "brocken",
"(e)" => "mail",
"(F)" => "flower",
"(rain)" => "rain",
"(sun)" => "sun",
"(o)" => "time",
"(music)" => "music",
"(~)" => "movie",
"(mp)" => "phone",
"(coffee)" => "coffee",
"(pi)" => "pizza",
"(pizza)" => "pizza",
"(l)" => "heart",
"(L)" => "heart",
"(muscle)" => "muscle",
"(flex)" => "muscle",
"(cash)" => "cash",
"(^)" => "cake",
"(beer)" => "beer",
"(d)" => "drink",
"(dance)" => "dance",
"(ninja)" => "ninja",
"(*)" => "star",
"(bandit)" => "bandit",
"(bug)" => "bug",
"(drunk)" => "drunk",
"(evilgrin)" => "evilgrin",
"(finger)" => "finger",
"(flagbg)" => "flagbg",
"(fubar)" => "fubar",
"(hi)" => "hi",
"(call)" => "call",
"(envy)" => "envy",
"(wait)" => "wait",
"(clap)" => "clap",
"(think)" => "think",
"(hug)" => "bear",
"(skype)" => "skype",
"(ss)" => "skype",
"(bow)" => "bow",
"(headbang)" => "headbang",
"(mooning)" => "mooning",
"(poolparty)" => "poolparty",
"(rock)" => "rock",
"(smoke)" => "smoke",
"(tmi)" => "tmi",
"(toivo)" => "toivo",
"(yawn1)" => "yawn1",
"(swear)" => "swear"
);
foreach ($smilesfrom as $key => $val) {
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "<", str_replace(">", ">", str_replace("\/", "\\\/", $key))))).')/s';
$smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
}
}
if ($enablesmilies) {
$text = parsesmilies($text);
}
return $text;
}
function parsesmilies($text) {
global $smileyfromcache, $smileytocache;
$oldtext = "";
while($oldtext != $text) {
$oldtext = $text;
$text = preg_replace($smileyfromcache, $smileytocache, $text);
}
return $text;
}
//------End Smiles-------
and emoticons archive ....
-
that's an impressive list of emoticons! need to find one with $$ eyes...haha