1

Topic: Smilies in comments, guestbook, messages, etc...

I am posting this question here in technical support, because I believe there is a problem with including smilies in comments and other areas throughout the vld script.  On the Features page it is written that

"Your members can include smilies in their messages, comments and other places in order to personalize their messages even more."

...and this seems to be true, if users have the code memorized in order to include those smilies.  For the average user who needs a handy pop-up box with the smilies, however, like what is included in the messaging section, there is a problem.  I searched and searched the forums and have found ways to integrate new smilies and how to css the pop-up box in the messaging section, but everywhere someone asked about the pop-up box being included in the other comment areas of the site there was only a brief discussion of finding the code in the other areas where the box exists and copying parts of it where we want the pop-up box to exist.  The Features area claims seem misleading to say the least.  I read that and expected a pop-up window like the one included in the messaging section. 

Instead of discussing how difficult it is, or telling everyone to browse through the files where its included, could someone please "detail" exactly which parts of the code we need to copy, and what text we'll need to change in order to make the smilies pop-up box appear in the other comment areas of the site?

I have copied this from account_messages_compose.tpl: <!-- IF settings.pm_enable_smilies -->
                                                    <div class="smilies" style="float: right">
                                                        <p class="smilies"><a href="#" onclick="showhide_field('smilies_popup_box');return false;"><img src="{virtual_tpl_path}{session.template}/media/smilies.png" border="0" align="absmiddle" /><br /></a></p>
                                                        <div class="smilies-inner">
                                                            <div class="smiliesbox" style="display: none" id="smilies_popup_box">
                                                                <!-- BEGIN smilies -->
                                                                    <div class="smiliesitem"><a href="#" onclick="selectSmiley({smiley_id},'field_body');showhide_field('smilies_popup_box');return false;" title="{name}"><img src="{top.virtual_pic_path}{filename}" alt="{name}" border="0" align="absmiddle" /><br /></a></div>
                                                                    <!-- IF rowcnt > "0" AND rowcnt mod "12" == "12" --><div class="clear"></div><!-- ENDIF -->
                                                                <!-- END smilies -->
                                                            </div>
                                                        </div>
                                                    </div>
                                                <!-- ENDIF -->

...and pasted it in the member_guestbook.tpl file.  It shows the first smiley like it should, but when clicked, the box that pop-up is empty.  I then tried:

                                                    <div class="smilies" style="float: right">
                                                        <p class="smilies"><a href="#" onclick="showhide_field('smilies_popup_box');return false;"><img src="{virtual_path}media/uploads/smilies.png" border="0" align="absmiddle" /><br /></a></p>
                                                        <div class="smilies-inner">
                                                            <div class="smiliesbox" style="display: none" id="smilies_popup_box">
                                                                <!-- BEGIN smilies -->
                                                                    <div class="smiliesitem"><a href="#" onclick="selectSmiley({smiley_id},'field_body');showhide_field('smilies_popup_box');return false;" title="{name}"><img src="{virtual_path}media/uploads/{filename}" alt="{name}" border="0" align="absmiddle" /><br /></a></div>
                                                                    <!-- IF rowcnt > "0" AND rowcnt mod "12" == "12" --><div class="clear"></div><!-- ENDIF -->
                                                                <!-- END smilies -->
                                                            </div>
                                                        </div>
                                                    </div>
                                                <div class="clear"></div>

and again the first click-able smiley is there, but the pop-up window is empty.

Can someone offer some actionable assistance please

2

Re: Smilies in comments, guestbook, messages, etc...

Hey all, 20 days have passed. I'm wondering if anyone has any word on this included feature that doesn't seem to be included...?

3

Re: Smilies in comments, guestbook, messages, etc...

I finally submitted a ticket and received some direction from Vlad. He suggested:

To add smilies in the comments box, you'll need to edit 'includes/ext/ext.comments.php' file and include the smilies php code which can be found in 'includes/lib/lib.account_messages.php' file.

Then you'll need to edit necessary template files where comment box is displayed (for example 'templates/your_template/news_view.tpl') and include smilies code again which can be found in 'templates/your_template/account_messages_compose.tpl'."

I followed his directions. My ext.comments.php file now looks like this:

********

For this one the pop-up box appears, but it is empty; there are no smilies to be selected...


I got this last response today from Vlad:

We can't really guide you through this as we don't provide support for php/html related questions.

So I'm stuck.  I was also receiving some help from Ramil on vldmagic but haven't heard back from him in several days either.

Has anyone tried this out or does anyone have any suggestions you think would work.  It seems like a simple enough edit, but it has become increasingly time consuming.  Anybody?

4

Re: Smilies in comments, guestbook, messages, etc...

Do not post entire contents of PHP files. You may post your own code that you have created yourself though.

Developer

5

Re: Smilies in comments, guestbook, messages, etc...

Seriously?! You deleted the part of my code I need help with. I've got to admit I'm petty angry right now, so please forgive me if this sounds like a rant, but I tried to get help from the forums first...then after nearly a month of waiting, and after 450+ views I submitted a ticket, which you responded to quickly; but I followed the directions verbatim and the smilies still didn't show up. I responded as such and you wrote me back that you "don't provide support for php/html related questions,"which seems really strange, since the entire script is php/html based...it would seem you shouldn't be providing any assistance at all...anyway...

I posted here again, in hopes that someone could look at what I did after you suggested it, and see if I had missed anything. I'm starting to feel like you don't want me to receive help for this issue.  I hope that's not the case, as I transitioned a clients website to this backend over SkaDate which had miserable customer service and even worse technical assistance.  I really thought that with a public forum, and a rather extensive add-on community vldPersonals would be a better situation. I am quickly finding out the contrary. How would you suggest I get the help I need? Vlad won't guide me and I can't post my code here for someone to look at and help out. Is this where I have to ask how much it would cost to have this "modification" done for me? This is starting to feel more and more like SkaDate all over again...

Can anyone help please?

6

Re: Smilies in comments, guestbook, messages, etc...

Don't touch the code too much if you dont know what you're doing.
Try re-installing if you have major errors.
Smilies should work when enabled in Control Panel.

To get everything working, you will need to spend some time to customize your site. It's pain in the ass for us and we cant expect developer to have answer to all questions. Keep studying the code, improve it, learn from it, and invest the next 5 days to develop your site and you will be fine smile

7

Re: Smilies in comments, guestbook, messages, etc...

Dan, I appreciate your response, even though it does not describe my situation at all.  I have in fact spent several days on just this feature, have received the assistance of Ramil on vldMagic, and have also received some suggestions from the developer; none of which has rendered the pop-up smilies box as in the messages area. I am no expert, but I'm far from a novice either.  I don't believe this to be a question of whether I can follow directions or not...I'm perfectly capable of copying and pasting...but I do see it as a matter of reluctance on the part of the developer to fully help a customer.  I do "touch the code," although mostly in the template to ease upgrades later, and haven't had any difficulty up to this point. There was no mention of major errors, and there are none. And I also have the smilies themselves working just fine; if the members have all the codes for them memorized they can type them out...what I require however is the same pop-up box that appears in the messages area on all the comment areas of the site.

If the smilies will render in those comment areas just fine, what is the issue with getting the box to appear for the members?  Now, is there anyone else who would like to have this particular modification for their site also? If so, please sound off...

8

Re: Smilies in comments, guestbook, messages, etc...

In another attempt to follow the "rules" and still get some help, this is the section (not the whole php file) I copied over to my ext.comments.php file:

function show_compose($id)
{
    global $DB, $LANG, $TEMPLATE, $SESSION, $PREFS;
    $smilies = array();
    $smilies_str = array();
    if ( $PREFS->conf['pm_enable_smilies'] )
    {
        $i = 0;
        foreach ($PREFS->conf['smilies'] as $smiley)
        {
            $smilies[] = array(
                "smiley_id" => $i++,
                "shortcut" => $smiley['shortcut'],
                "filename" => $smiley['filename'],
                "name" => htmlentities2utf8($smiley['name']),
            );
            $smilies_str[] = '{'.
                        '"shortcut":"'.str_replace(array("\\", '"'), array('\\\\', '\"'), $smiley['shortcut']).'",'.
                        '"filename":"'.$smiley['filename'].'",'.
                        '"name":"'.str_replace(array('\\\\', '\"'), array('\\\\', '\"'), htmlentities2utf8($smiley['name'])).'"'.
                        '}';
        }
    }
    $smilies_str = implode(",",$smilies_str);
   
    $TEMPLATE->assign("smilies", $smilies);
    $TEMPLATE->assign("smilies_str", $smilies_str);

    return 1;
}

I'm not sure that it's the correct part I need from the includes/lib/lib.account_messages.php file.

...anybody?

9

Re: Smilies in comments, guestbook, messages, etc...

http://www.vldcrowd.com/member/556/blog/view/720/

Give the world the best you have, and the best will come to you.
Tutorials and Mods for VldPersonals  Add CometChat to your vldPersonals site

10

Re: Smilies in comments, guestbook, messages, etc...

I've found a solution by using the smileys replace function and inserting some icons via a javascript. This is only to show some winks in the guestbook (I was happy 2.7 has this function now :-))