×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Problems with some emoticons

Problems with some emoticons 15 years 3 months ago #5457

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Hi guys,

I'm new to !joomlacomment, so forgive me if my question had already been answered, though I searched the forum and couldn't find the solution. That could also mean I'm doing something else wrong :)

Anyway, the thing is this: when trying to publish some emoticons I get a code combined with some other emoticons, they are interrupting it the same way that happens with ie. MSN when you type a word that contains the shortcut to an emoticon.

Apart from being new to this component, I'm really new to Joomla and programming as well, so this might be due to something I did wrong elsewhere. I'm still trying to figure out how to move to php5, so for the time being I changed the code to fit with my php4.3.11 as was explained in one of your articles. My MySQL is 5.0.18 so that should be fine.

Here's a link with some test comments, so you guys can see what I'm talking about.

Also, where would be the right place to post an updated version of the serbian_lat translation, since the current one is rather messy and not written in UTF-8?

Thanks a lot, this is by far the best comment component I found! :side:

All best,
M.

EDIT: The problem is in :s emoticon: every other that starts with S (side, silly) will be published, but followed by its unnecessary duplicated code, interrupted with :s emoticons. I guess the simple solution would be to change the code of this one, but then again if I'm the only one having this problem it must be something else.

Problems with some emoticons 15 years 3 months ago #5485

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey there!
DId you make any changes to the code?
When looking at the ouput I see this:
<img border="0" class="postemoticon" title=":s" alt="<img src=" dizzy.png="" images="" funny="" emoticons="" joscomment="" com_comment="" components="" joomla="" www.marks21.info="" http:="" src="http://www.marks21.info/Joomla/components/com_comment/joscomment/emoticons/funny/images/silly.png"/>
and the normal output is:
<img border="0" class="postemoticon" title=":0" alt=":0" src="http://localhost/liberator/components/com_comment/joscomment/emoticons/modern/images/Wooo.gif"/>

Problems with some emoticons 15 years 3 months ago #5498

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Wow, haven't touched it, how could this happen? I believe I should try and change all codes to fit the one you presented? This is really weird, I downloaded the component from this site two days ago or so...But thanks a lot for the quick reply and help!

Btw, you haven't told me - where can I upload the corrected translation to Serbian? It's not a big deal, but I guess it'd be useful... Cheers!

Problems with some emoticons 15 years 3 months ago #5499

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Upload it here in the forum.

Problems with some emoticons 15 years 3 months ago #5502

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
I actually don't know where to find the file that contains the code you're talking about...
When I change from 'funny' to some other type of emoticons, the problem disappears, still I'd like to use this specific set...

Problems with some emoticons 15 years 3 months ago #5503

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
aha. Would you go to components/com_comment/joscomment/emoticon/modern and tell me what do you have in the php file there?

Problems with some emoticons 15 years 3 months ago #5504

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
A list of lines that look like this one:
$GLOBALS["JOSC_emoticon"][':0'] = "Wooo.gif";

This index.php doesn't contain
:s
emoticon, while index.php in 'funny' does.

Problems with some emoticons 15 years 3 months ago #5505

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
well different icon packs have different icons and different syntax. That is why you don't have :s .
I don't know what the problem could be. Perhaps you can try to copy the code from the index.php file of the modern icons to the one of the other and see if you have problems? It is obvious that some emoticons are not going to load, since there is no emoticon for them, but just for the test...

Problems with some emoticons 15 years 3 months ago #5506

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Cool, will do that. If nothing, I'm fine with just outcommenting the :s or changing its shortcut. I thought maybe some other folks out there might have the same problem so if it was a small bug it'd be cool. Obviously it's something mystical so we better leave it this way :D
Thanks a lot for the feedback!

PS: I uploaded the translation in another thread, in case it's useful for some further upgrades. Cheers!

Problems with some emoticons 15 years 3 months ago #5509

  • Matija
  • Matija's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
I managed to solve the problem by just changing the following line:
$GLOBALS["JOSC_emoticon"][':s'] = "dizzy.png";

to
$GLOBALS["JOSC_emoticon"][':S'] = "dizzy.png";

Capitalization, that was all. Duh! :)

Problems with some emoticons 15 years 3 months ago #5510

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
You could also try changing the emoticons from...
$GLOBALS["JOSC_emoticon"][':s'] = "dizzy.png";
...to...
$GLOBALS["JOSC_emoticon"][' :s '] = "dizzy.png";
...which enforces a 'padding' on the emoticon trigger. Many instant messenger programs, especially the fantastic Trillian which I use for MSN, have an option for this kind of thing. It prevents :sillyperson from drawing a :s emoticon that way as it requires a whitepsace on either side, stopping mid-word emoticon catching.

Problems with some emoticons 15 years 3 months ago #5729

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I noticed another user had the same problem with emoticons. I don't understand why this happens. Do we need to fix a bug Daniel? I have no idea what is causing such a strange behaviour!

Problems with some emoticons 15 years 3 months ago #5756

  • Lucas Degiovani
  • Lucas Degiovani's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Matija wrote:

I managed to solve the problem by just changing the following line:

$GLOBALS["JOSC_emoticon"][':s'] = "dizzy.png";

to
$GLOBALS["JOSC_emoticon"][':S'] = "dizzy.png";

Capitalization, that was all. Duh! :)


I had the same problem.. But i´m using the Funny set of emoticons...

The problem was that when the user inserted the ":silly:" (silly) it showed messy code and another emoticon, the ":s" (s)

I guess this happens because they are similar to one another in the begining...

I think this needs a bug fix for next versions.... And I think this would happen to anyone using 4beta1 and some of the emoticons set... Its just that people maybe do not notice this...

The solution provided above from Matija solved the problem...

Problems with some emoticons 15 years 3 months ago #5759

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
It's a workable solution but not exactly solid... what if they do any of these emoticons:
:Silly:  :silly:  :S  :s
The new code is case sensitive so it'd only work for those who physically click on the icons. But I, like many of the Instant Messenger generation, type in :S frequently - sometimes with a big S, sometimes with a small S.

I think it'd be best to change the code of emoticon replacement to be case insensitive, and instead zero-pad the definitions as I did. That would also prevent the following sentance...
Step 2:Select the 'Self Destruct' option
From showing "Step 2 :S elect the..." as it doesn't have a whitespace on both sides of the emoticon. If you didn't notice, these Forums do a similar thing - they put a space on either side :)

I don't mean to shoot you guys down at all :P the caps substitute is a good quick fix. I'm mostly saying all that for Daniel to review, ultimately the decision is up to him :)

Problems with some emoticons 15 years 3 months ago #5760

  • Lucas Degiovani
  • Lucas Degiovani's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
agreed....

the solution was a "quick fix" for a "small problem"...

As for now, its okay, but i think you are correctly... Suggest these modifications to daniel.. So next releases wont have this issue..

And thanks for the support. :)

Problems with some emoticons 15 years 2 months ago #6483

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Daniel, just FYI - This has not been fixed in the new version.

Problems with some emoticons 15 years 2 months ago #6495

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I think it was a mistake in the emoticon design to have :s then another :something: - we could change :s to =s for example but that'd break all existing comment emoticons.

I tried re-writing the parseEmoticons() function to check for whole-word matches, but it's beyond me. If that's something Daniel wants to do then that's great.

However I think it's easier to add a whitespace to the emoticon theme php file for each one. It works fine, although ":s." will not work as it needs whitespace after ":s " to replace the graphic. However, if the user clicks an emoticon it will insert it in the comment correctly.

It's up to Daniel which he wishes to do for a fix in the next release. Chances are I/we will soon make a new default emoticon set with different, non-conflicting tags anyway.
$GLOBALS["JOSC_emoticon"][':s'] = "dizzy.png";
// Conflicts with :silly:
$GLOBALS["JOSC_emoticon"][':s '] = "dizzy.png";
// Works correctly

Problems with some emoticons 15 years 2 months ago #6496

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I'm going to rewrite the function, but right now all my attention is concentrated on BiggieSmalls

I'm really pissed from all these template clubs sites, that only take your money and don't give you anything in return and they deserve to be punished :)
  • Page:
  • 1
Time to create page: 0.137 seconds