Author Topic: Smileys/Smilies/Smiles after PMv2 installation in guestbook & image discription  (Read 37268 times)

0 Members and 1 Guest are viewing this topic.

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
This little help is for everybody who has installed the PMv2 Tutorial -> http://www.4homepages.de/forum/index.php?topic=6692.0
and now wants to use smileys in guestbook -> http://www.4homepages.de/forum/index.php?topic=7409.0 & perhaps wish to use smileys in image description too

a.) use smileys after PMv2 installation in guestbook

1. open guestbook.php

Find:
Code: [Select]
"comment_site" => format_text($comment_row[$i]['comment_site'], 0, $config['wordwrap_comments'], 0, 0),
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),

Replace:
Code: [Select]
"comment_site" => format_text($comment_row[$i]['comment_site'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1, 1),

b.) when you want to use smileys after PMv2 installation in image description, you have to do the following changes

1. open includes/functions.php

find
Code: [Select]
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0, $smiles = 0, $brackets = 1) {
here u can set
Code: [Select]
$smiles = 0 to $smiles = 1
Thatīs all! * I hope it works *

cya by Flo2005

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Hi

I have done the few steps and it works fine, but there is only a little problem: I don't see the smilies, that means if I type in for example
Code: [Select]
:) I see after posting a smilie like that  :), but before I can't see the smilies in a table or something else....

Where is the problem :?:

Thanks  :)

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Itīs like here in this forum when you post something!

e.g. you click this one :lol: at first you see

Code: [Select]
:lol:
So itīs not shown in realtime...

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Itīs like here in this forum when you post something!

e.g. you click this one :lol: at first you see

Code: [Select]
:lol:
So itīs not shown in realtime...

No, the problem is I don't see the  :lol:
But if I type in
Code: [Select]
:lol: I can see the :lol: in my post.... Ok?

Why can't I see the smilies?

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
What kind of MODīs have you allready installed :?:

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
What kind of MODīs have you allready installed :?:

A lot, but i think the relevant are the guestbook, the pmv2 and the contact mod...

The smilies are no problem with the pmv2, but I can't see them in the guestbook and in the details.html.... If I insert the code I'm going to see them after posting!

 :?: :?: :?:


PS: Don't know if it's important, but I have to delete the get smiles function in the guestbook mod, because I've always got an error...   --->  http://www.4homepages.de/forum/index.php?topic=7409.0

Code: [Select]
tikle wrote:
Fatal error: Call to undefined function: get_smiles_text() in /home/www/web22/html/foto/guestbook.php on line 362

Remove this line in guestbook.php

Code:
"smiles_text" => get_smiles_text(),




Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
PM2 use his own bbcode (bbcode2.html)

I use for comments & guestbook bbcode.html

Have you changed {bbcode} tag ? e.g. in guestbook_form.html

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
PM2 use his own bbcode (bbcode2.html)

I use for comments & guestbook bbcode.html

Have you changed {bbcode} tag ? e.g. in guestbook_form.html

Yeah, I know this fact, but I haven't changed the bbcode-tag! Should I?

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Mmm no, guestbook mod use normaly {bbcode} tag.

Perhaps something is wrong with your bbcode.html

I post my code from this file
Code: [Select]
<br />
<script language="JavaScript" type="text/javascript">
tag_prompt = "{lang_tag_prompt}";

link_text_prompt = "{lang_link_text_prompt}";
link_url_prompt = "{lang_link_url_prompt}";
link_email_prompt = "{lang_link_email_prompt}";

list_type_prompt = "{lang_list_type_prompt}";
list_item_prompt = "{lang_list_item_prompt}";

tags = new Array();

function getarraysize(thearray) {
  for (i = 0; i < thearray.length; i++) {
    if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) {
      return i;
    }
  }
  return thearray.length;
}

function arraypush(thearray,value) {
  thearraysize = getarraysize(thearray);
  thearray[thearraysize] = value;
}

function arraypop(thearray) {
  thearraysize = getarraysize(thearray);
  retval = thearray[thearraysize - 1];
  delete thearray[thearraysize - 1];
  return retval;
}

function bbcode(theform,bbcode,prompttext) {
  inserttext = prompt(tag_prompt+"\n["+bbcode+"]xxx[/"+bbcode+"]",prompttext);
  if ((inserttext != null) && (inserttext != "")) {
    theform.comment_text.value += "["+bbcode+"]"+inserttext+"[/"+bbcode+"] ";
    theform.comment_text.focus();
  }
}

function namedlink(theform,thetype) {
  linktext = prompt(link_text_prompt,"");
  var prompttext;
  if (thetype == "URL") {
    prompt_text = link_url_prompt;
    prompt_contents = "http://";
  }
  else {
    prompt_text = link_email_prompt;
    prompt_contents = "";
  }
  linkurl = prompt(prompt_text,prompt_contents);
  if ((linkurl != null) && (linkurl != "")) {
    if ((linktext != null) && (linktext != "")) {
      theform.comment_text.value += "["+thetype+"="+linkurl+"]"+linktext+"[/"+thetype+"] ";
    }
    else {
      theform.comment_text.value += "["+thetype+"]"+linkurl+"[/"+thetype+"] ";
    }
  }
  theform.comment_text.focus();
}

function dolist(theform) {
  listtype = prompt(list_type_prompt, "");
  if ((listtype == "a") || (listtype == "1")) {
    thelist = "[list="+listtype+"]\n";
    listend = "[/list="+listtype+"] ";
  }
  else {
    thelist = "[list]\n";
    listend = "[/list] ";
  }
  listentry = "initial";
  while ((listentry != "") && (listentry != null)) {
    listentry = prompt(list_item_prompt, "");
    if ((listentry != "") && (listentry != null)) {
      thelist = thelist+"[*]"+listentry+"\n";
    }
  }
  theform.comment_text.value += thelist+listend;
  theform.comment_text.focus();
}

// Smilie Mod
function smilie(theform,smiliecode) {
  theform.comment_text.value += smiliecode;
  theform.comment_text.focus();
}
// End Smilie Mod
</script>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="head1">
      <table border="0" cellspacing="1" cellpadding="3">
        <tr>
          <td class="head1">{lang_bbcode}</td>
        </tr>
        <tr>
          <td class="row1">
            <input type="button" value=" F " onclick="bbcode(this.form,'B','')" name="button" class="button" />
            <input type="button" value=" K " onclick="bbcode(this.form,'I','')" name="button" class="button" />
            <input type="button" value=" U " onclick="bbcode(this.form,'U','')" name="button" class="button" />
            <input type="button" value="Bild" title="IMG" onclick="bbcode(this.form,'IMG','http://')" name="button" class="button" />
            <input type="button" value="http://" title="URL" onclick="namedlink(this.form,'URL')" name="button" class="button" />
            <input type="button" value="Code" title="CODE" onclick="bbcode(this.form,'code','')" name="button" class="button" />
            <input type="button" value="Liste" title="LIST" onclick="dolist(this.form)" name="button" class="button" />
          </td>
        </tr>
<!-- Smilie Mod -->
        <tr>
          <td class="row2">
            <input type="button" value=" " onClick="smilie(this.form,' :) ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/happy.gif); width: 20px;" />
    <input type="button" value=" " onClick="smilie(this.form,' :)) ')"        name="button" class="smilie" style="background-image: url({template_url}/smiles/very_happy.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :D ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/big_smile.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :O ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/surprised.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' ;) ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/wink.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :( ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/sad.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :*( ')"        name="button" class="smilie" style="background-image: url({template_url}/smiles/very_sad.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :confused: ')" name="button" class="smilie" style="background-image: url({template_url}/smiles/confused.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :shy: ')"      name="button" class="smilie" style="background-image: url({template_url}/smiles/embarrassed.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :vicious: ')"  name="button" class="smilie" style="background-image: url({template_url}/smiles/vicious.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :| ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/undecided.gif); width: 20px;" /><br />
            <input type="button" value=" " onClick="smilie(this.form,' :pig: ')"      name="button" class="smilie" style="background-image: url({template_url}/smiles/pig.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :P ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/tongue.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' B) ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/cool.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :B ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/nerd.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' X( ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/angry.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' :X ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/in_love.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' |) ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/asleep.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' =; ')"         name="button" class="smilie" style="background-image: url({template_url}/smiles/talk_to_hand.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' @};- ' )"      name="button" class="smilie" style="background-image: url({template_url}/smiles/rose.gif); width: 20px;" />
            <input type="button" value=" " onClick="smilie(this.form,' ):) ')"        name="button" class="smilie" style="background-image: url({template_url}/smiles/cowboy.gif); width: 20px;" />
          </td>
        </tr>
        <!-- End Smilie Mod -->
      </table>
    </td>
  </tr>
</table>
<br />

Note: thereīs a little mistake with this smiley :)) itīll also print this  :) out -> I used the same smilys from the images file of pm2

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Thanks...

Now I can see under the buttons a table, but without the smilies, only white squares...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Thanks...

Now I can see under the buttons a table, but without the smilies, only white squares...

like this one?



perhaps this topic can help ->http://www.4homepages.de/forum/index.php?topic=6646.0

Project offline

Offline Olphi

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Thanks...

Now I can see under the buttons a table, but without the smilies, only white squares...

like this one?



perhaps this topic can help ->http://www.4homepages.de/forum/index.php?topic=6646.0

Yes that is the error...

Thank you very much for your help! have you installed the smiley-MOD before you have installed the "Smilies after PMv2 installation"-MOD?? Should I install the whole MOD (http://www.4homepages.de/forum/index.php?topic=6646.0) ????

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Yes, I have installed this mod before I installed PMv2.

But it is recommend to do the changes of Step 6.2 PMv2 http://www.4homepages.de/forum/index.php?topic=6692.0

Project offline