multiple smilies for reply on comment
« on: February 26, 2013, 01:14:55 AM »
Hi,

I added smilies for replies on comments in showprofile.php

It is working fine when I want to reply on 1 comment with this code:

Code: [Select]
$commentrpl  = strtr($commentrpl, $rpl_arr);
$osDB->query( 'UPDATE ! SET reply = ? WHERE id = ?', array( COMMENTS_TABLE, $commentrpl, $_REQUEST["commentid"] ) );

But as soon as there are more comments that needs a reply the smilies won't work anymore. (not clickable) What do I need to change so that for every reply I can use the smilies.
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

Re: multiple smilies for reply on comment
« Reply #1 on: February 26, 2013, 01:20:33 PM »
Hi anybody who can help me with this???? Realy need an sollution it is driving me nuts for the whole weekend  :'(
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: multiple smilies for reply on comment
« Reply #2 on: February 26, 2013, 02:39:02 PM »
Hi Oppeneer
I worked in the past on this as well and never found the solution ...It has to do with the stripped html tags i remember so the url of the smilies are striped
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

Re: multiple smilies for reply on comment
« Reply #3 on: February 26, 2013, 02:50:52 PM »
As long if there is only 1 comment on the profile it works fine. But as soon if there are multiple comments with no reply it stops working. Text is working fine but it looks like for the smilies it isn't recognized for which ID it should enter a smilie.

I tried to add request['id'] but it looks like it is getting ignored.

Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: multiple smilies for reply on comment
« Reply #4 on: February 26, 2013, 03:04:09 PM »
Have you looked in your database if the smilies are stored in the next cooment?
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

Re: multiple smilies for reply on comment
« Reply #5 on: February 26, 2013, 03:16:13 PM »
If I have  1 comment and reply in the profile I can click on the smilie and submit it. The smilie gets recorded in Database and on the correct Comment.

If I have 2 comments that needs a reply in the profile there are 2 textareas available both with smilies. But none of them are are clickable anymore. plain text is working fine.

If there are more comments and no reply and 1 of the comments is on the next page it works again. So 1 reply on one page is working but as soon as there are multiple replies on that pages it stops working.
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: multiple smilies for reply on comment
« Reply #6 on: February 26, 2013, 03:32:17 PM »
Can it be the smilie onclick function looks for the input id=comment but thats allready been set in the first commentbox?
Code: [Select]
function smile( txt ) {
    doInsert(" " + txt + " ", "",  false,document.getElementById('comment'));
}

Java allways looks for the first element id and if there are two with the same id java icnores the second because he allready found one.
I am not sure but igess it has to do with this (on your new page it workes because there is only one id)
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

Re: multiple smilies for reply on comment
« Reply #7 on: February 26, 2013, 03:38:07 PM »
Hi,

Never thought of that. Is there a way to work around this?
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: multiple smilies for reply on comment
« Reply #8 on: February 26, 2013, 04:14:06 PM »
If a user may post only once.....(!)  maybe you can use the userid for the textarea commentid
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

Re: multiple smilies for reply on comment
« Reply #9 on: February 27, 2013, 08:28:45 AM »
Hi,

My guess is that you are correct and something needs to change in the javascript. I tried all kind of variants but nothing works. Don't know enough of javascript or PHP to make any extensive changes and get this to work. Everything is working fine except smilies when there are multiple replies. So if nobody has an answer for this I probably will forget about all the smilies in the comments and replies and finish the styling (makes it easier without those funny images in the way making alignment an hell  :) )
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: multiple smilies for reply on comment
« Reply #10 on: February 27, 2013, 08:47:14 AM »
Hi
For a unknown reason the same issue I  encounter when I tried in the past to add smilies to a single! textarea in edit user.. (but only one textarea)....... worked around it to let members manualy insert the code..
They don't mind and use it..
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

Re: multiple smilies for reply on comment
« Reply #11 on: February 27, 2013, 09:12:08 AM »
Hi,

Nice workaround. That works indeed tried that allready. Thinking about using Tinymce for these areas that has smilies built in. Will let you know.
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.