Author Topic: Emoticons and Reply in Comments!  (Read 57195 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #15 on: March 03, 2003, 01:43:35 AM »
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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Biggi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • http://www.bibodia.de/
Emoticons and Reply in Comments!
« Reply #16 on: March 03, 2003, 01:59:38 AM »
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:

Offline Biggi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • http://www.bibodia.de/
Emoticons and Reply in Comments!
« Reply #17 on: March 03, 2003, 02:02:42 AM »
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!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #18 on: March 03, 2003, 02:50:33 AM »
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:
Code: [Select]
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^))('.str_replace('|','\|', quotemeta(str_replace("<", "&lt;", str_replace(">", "&gt;", str_replace("\/", "\\\/", $key))))).')/s';
Replace with:
Code: [Select]
$smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "&lt;", str_replace(">", "&gt;", str_replace("\/", "\\\/", $key))))).')/s';

I just edited the original code, so if u install this mod now, then, ignore this fix.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Biggi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • http://www.bibodia.de/
Emoticons and Reply in Comments!
« Reply #19 on: March 03, 2003, 08:41:42 AM »
Yippeeeeeeeee! That's it!

Thank you very much!!!

Offline Tutych

  • Pre-Newbie
  • Posts: 1
    • View Profile
Emoticons and Reply in Comments!
« Reply #20 on: March 08, 2003, 12:49:30 AM »
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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #21 on: March 20, 2003, 08:51:25 AM »
Quote from: Tutych
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 "
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #22 on: March 20, 2003, 08:57:02 AM »
Quote from: drhtm

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 ;) )
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline PREACHER

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://www.desktopart.de
Emoticons and Reply in Comments!
« Reply #23 on: March 20, 2003, 07:22:59 PM »
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:
Schreibfehler sind beabsichtigt und dienen der allgemeinen Belustigung.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #24 on: March 20, 2003, 09:54:15 PM »
Quote from: PREACHER
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? :?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline PREACHER

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://www.desktopart.de
Emoticons and Reply in Comments!
« Reply #25 on: March 21, 2003, 11:44:21 AM »
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 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  :)
Schreibfehler sind beabsichtigt und dienen der allgemeinen Belustigung.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #26 on: March 24, 2003, 08:12:39 PM »
Quote from: PREACHER
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
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline itme

  • Pre-Newbie
  • Posts: 2
    • View Profile
Emoticons and Reply in Comments!
« Reply #27 on: May 02, 2003, 04:14:24 AM »
hello V@no can u give code smile in your file includes/functions.php thank's :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Emoticons and Reply in Comments!
« Reply #28 on: May 02, 2003, 09:22:34 AM »
Quote from: itme
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 )
Code: [Select]
//--------------------------
//--------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("<", "&lt;", str_replace(">", "&gt;", 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\">&nbsp;&nbsp;&nbsp;All Emoticons</a>";
return $smiles_text;
}
}
return $smiles_text;
}
//------End Smiles-------
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline itme

  • Pre-Newbie
  • Posts: 2
    • View Profile
Emoticons and Reply in Comments!
« Reply #29 on: May 02, 2003, 12:50:44 PM »
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