Poll

Is is possible and useful?

Yes
10 (83.3%)
No
2 (16.7%)

Total Members Voted: 12

Voting closed: March 22, 2003, 09:28:27 AM

Author Topic: .  (Read 59722 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
Re: a question 2 v@no
« Reply #45 on: January 07, 2006, 04:32:13 AM »
Otherwise, by leaving the comma there, it will return an error message from the header.
Where do you get this information? There is no error, not even notice message will be displayed if you leave a comma on last element in the array. It does not required, but there is no punishment for leaving it there either.
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 mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: a question 2 v@no
« Reply #46 on: January 07, 2006, 03:15:21 PM »
@ TheOracle,
... actually you are right ... but ... I think the comma stand already for the next smiles ...  :mrgreen:
... and on the other hand I can confirm V@nos statement ... there is no error message !
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: a question 2 v@no
« Reply #47 on: January 07, 2006, 04:25:15 PM »
Quote

actually you are right ... but ... I think the comma stand already for the next smiles


I see. From your example, it wasn't quite obvious.  :mrgreen:

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: a question 2 v@no
« Reply #48 on: January 09, 2006, 07:00:54 PM »
thanks!!!!!
but I saw in V@no site that in the bbcode form he had 14 or more smilies displaying, and I have only 9
or v@no can you post you latest function for smilies and bbcode?
thanks again!
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: a question 2 v@no
« Reply #49 on: January 09, 2006, 07:29:04 PM »
@live@ct
... did you read my answer ...  :?:roll:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: a question 2 v@no
« Reply #50 on: January 09, 2006, 07:44:13 PM »
yeah thanks, but i was edited the wrong template  :?

im having an error in the javascript of the IE
that IE expext a ")"

but the smilies and bbcode works fine
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: a question 2 v@no
« Reply #51 on: January 15, 2006, 11:46:16 PM »
Is it possible to use this mod and how can I implement it into http://www.4homepages.de/forum/index.php?topic=6824.0 ?

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: a question 2 v@no
« Reply #52 on: March 03, 2006, 03:29:37 AM »
I get this error when I change all the smiles for the new yahoo emoticons:

Quote
Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716

Warning: preg_replace(): Unknown modifier ':' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716

Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716

Warning: preg_replace(): Unknown modifier ')' in /home/content/d/i/g/digitaldose/html/includes/functions.php on line 1716

this the code for the smiles

from the line 1693 to 1833
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",
":(" => "sad",
";)" => "winking",
":D" => "big_grin",
";;)" => "batting_eyelashes",
">:D<" => "big_hug",
":-/" => "confused",
":x" => "love_struck",
":>" => "blushing",
":P" => "tongue",
":-*" => "kiss",
"=((" => "broken_heart",
":-O" => "surprise",
"X(" => "angry",
":>" => "smug",
"B-)" => "cool",
":-S" => "worried",
"w:-S" => "whew",
">:)" => "devil",
":((" => "crying",
":))" => "laughing",
":|" => "straight_face",
"/:)" => "raised_eyebrow",
"=))" => "rolling_on_the_floor",
"O:)" => "angel",
":-B" => "nerd",
"=;" => "talk_to_the_hand",
               
":-c" => "call_me",
":)]" => "on_the_phone",
"~X(" => "at_wits_end",
":-h" => "wave",
":-t" => "time_out",
"8->" => "daydreaming",
"I-|" => "sleepy",
"8-|" => "rolling_eyes",
"L-)" => "loser",
":-&" => "sick",
":-$" => "dont_tell_anyone",
"[-(" => "not_talking",
":O)" => "clown",
"8-}" => "silly",
"<:-P" => "party",
"(:|" => "yawn",
"=P~" => "drooling",
":-?" => "thinking",
"d-o" => "doh",
"=D>" => "applause",
":-SS" => "nailbiting",
"h-)" => "hypnotized",
":^o" => "liar",
":-w" => "waiting",
":-<" => "sigh",
">:P" => "phbbbbt",
"<):)" => "cowboy",

":-??" => "i_dont_know",
"%-(" => "not_listening",
":@)" => "pig",
"3:-O" => "cow",
":(|)" => "monkey",
"~:>" => "chicken",
"@};-" => "rose",
"%%-" => "good_luck",
"(~~)" => "pumpkin",
"~O)" => "coffee",
"*-:)" => "idea",
"8-X" => "skull",
"=:)" => "bug",
">-)" => "alien",
":-L" => "frustrated",
"[-O<" => "praying",

"$-)" => "money_eyes",
":-w" => "whistling",
"b-(" => "feeling_beat_up",
":)>-" => "peace_sign",
"[-X" => "shame_on_you",
"\:D/" => "dancing",
">:/" => "bring_it_on",
";))" => "hee_hee",
":-@" => "chatterbox",
"^:)^" => "not_worthy",
":-j" => "oh_go_on",
"(*)" => "star",
"o->" => "hiro",
"o=>" => "billy",
"o-+" => "april",
"(%)" => "yin_yang",
         );

   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-------
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: a question 2 v@no
« Reply #53 on: March 14, 2006, 03:23:36 PM »
The Zip file from first post is missing.

Somone have its copy ?
I m not a  Programmer.
          But
I m a Good Learner.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: a question 2 v@no
« Reply #54 on: March 23, 2006, 03:14:50 AM »
I have a short question for V@no.
So Instead of starting a new post, I am asking it here.

V@no, would u like to share how r u showing this??

http://img386.imageshack.us/img386/6544/image11wd.jpg

I mean two previous & next images and in center "11 out of 17"

Is it something available in the forum? I tried but can’t find it.
I m not a  Programmer.
          But
I m a Good Learner.

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: a question 2 v@no
« Reply #55 on: April 24, 2006, 04:26:29 AM »
why some smiles didnt show this is my code

Code: [Select]
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",
               ":-))" => "laughing",
               ":lol:" => "laughing",
               ":D" => "big_grin",
               ":O" => "surprise",
               ":o" => "surprise",
               ";)" => "winking",
               ":wink:" => "winking",
               ":(" => "sad",
               ":*(" => "crying",
               ":cry:" => "crying",
               ":confused:" => "confused",
               ":shy:" => "blushing",
               ":vicious:" => "smug",
               ":|" => "straight_face",
               ":pig:" => "pig",
               ":P" => "tongue",
               ":p" => "tongue",
               "B)" => "cool",
               ":B" => "nerd",
               "X(" => "angry",
               ":X" => "love_struck",
               "|)" => "sleepy",
               "=;" => "talk_to_the_hand",
               "@};-" => "rose",
               "):)" => "cowboy",
               "8X" => "skull",
               "=:)" => "alien",
               "0:)" => "angel",
               ":devil:" => "devil",
               ":clown:" => "clown",
               "3:O" => "cow",
               "3:o" => "cow",
               ":monkey:" => "monkey",
               "(~~)" => "pumpkin",
               "[-(" => "not_talking",
               "*:)" => "idea",
               ":$" => "dont_tell_anyone",
               ":chicken:" => "chicken",
               "~o)" => "coffee",
               "%%-" => "good_luck",
               "b(" => "feeling_beat_up",
               ":E:" => "peace_sign",
               ":&" => "sick",
               "=*" => "kiss",
               ";;)" => "batting_eyelashes",
               ":?)" => "raised_eyebrow",
               "(%)" => "yin_yang",
               "o-+" => "april",
               ":billy:" => "billy",
               ":hiro:" => "hiro",
               ":mad:" => "frustrated",
               ":R:" => "praying",
               "[-x" => "shame_on_you",
               "[:D]" => "big_hug",
               ":dance:" => "dancing",
               "=D" => "applause",
               "(?)" => "thinking",
               ":^o" => "liar",
               "@)" => "hypnotized",
               "8|" => "rolling_eyes",
               "8}" => "silly",
               "?|" => "yawn",
               "=p~" => "drooling",
               "$)" => "money_eyes",
               ":whistle:" => "whistling",
               "#o" => "doh",
               ":alien:" => "bug",
               ":S" => "worried",
   "~X(" => "at_wits_end",
   "o=>" => "billy",
   ">:b" => "bring_it_on",
   "=((" => "broken_heart",
   ":-c" => "call_me",
   ":-@" => "chatterbox",
   "8->" => "daydreaming",
   ";))" => "hee_hee",
   ":-??" => "i_dont_know",
   "L-)" => "loser",
   ":-SS" => "nailbiting",
   "%-(" => "not_listening",
   "^:)^" => "not_worthy",
   ":-j" => "oh_go_on",
   ":)]" => "on_the_phone",
   "<:-p" => "party",
   ">:-p" => "phbbbbt",
   "=))" => "rolling_on_the_floor",
   ":-<" => "sigh",
   "(*)" => "star",
   ":-t" => "time_out",
   ":-w" => "waiting",
   ":-h" => "wave",
   "w:-S" => "whew",
   
         );

   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 > 100) {
               $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;Mostrar Todas</a>";
            return $smiles_text;
            }
   }
   return $smiles_text;
}
//------End Smiles-------

the smilies like <:-p dindt show, it show like text and didnt show the image


thanks for your help
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.