HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Issues with 2.0.18
Hi, I just updated to 2.0.18 and the latest version of this addon and am experiencing some issues with it. Here's my EmoticonMatch array:
It works sometimes, but if there's no space on both sides of the [:0], the emoticon isn't replaced with an image. So if you have something like:
or
It doesn't work.
Also, if there's a greater than / less than sign in the post prior to the emoticon, things get all screwey and the plugin appears to insert broken HTML. For example, if you make a post like this:
or...
Then broken HTML is inserted, unfortunately.
Would love to see both these things fixed, it's the only thing preventing me from upgrading to 2.0.18 on my main forum!
$EmoticonMatch = array("[:0]" => "gasp.gif",);
It works sometimes, but if there's no space on both sides of the [:0], the emoticon isn't replaced with an image. So if you have something like:
Hey![:0]
or
h[:0]
It doesn't work.
Also, if there's a greater than / less than sign in the post prior to the emoticon, things get all screwey and the plugin appears to insert broken HTML. For example, if you make a post like this:
> [:0]
or...
blah blah blah >
blah blah
blah blah
blah
[:0]
Then broken HTML is inserted, unfortunately.
Would love to see both these things fixed, it's the only thing preventing me from upgrading to 2.0.18 on my main forum!
0
Best Answers
-
Shadowdare MVP
@imijj, open plugins/Emoticons/class.emoticons.plugin.php and go to line 321 or somewhere around there. There should be a line that looks like this:
return ' <img class="emoticon" src="'.$this->GetResource("images/$Img", FALSE, FALSE).'" alt="'.$EmoticonMasked.'" /> ';
Change that to this:
return ' <img class="emoticon" src="' . DS . Gdn_Url::WebRoot() . DS . $this->GetResource("images/$Img", FALSE, FALSE) . '" alt="' . $EmoticonMasked . '" /> ';
Add Pages to Vanilla with the Basic Pages app
3 -
Shadowdare MVP
@imijj: The other way I posted will output the relative path to the forum dispatcher if you have the forum in a subdirectory. Put TRUE in Gdn_Url::WebRoot() to include the domain.
return ' <img class="emoticon" src="' . Gdn_Url::WebRoot(TRUE) . DS . $this->GetResource("images/$Img", FALSE, FALSE) . '" alt="' . $EmoticonMasked . '" /> ';
Add Pages to Vanilla with the Basic Pages app
4
Answers
DiscussionController_BeforeCommentBody_Handler
PostController_BeforeCommentBody_Handler
PostController_BeforeDiscussionRender_Handler
PostController_BeforeCommentRender_Handler
PostController_BeforeDiscussionPreview_Handler
And in each of those callbacks a function is called which just does a str_replace on the text, replacing the emoticon code with img src HTML code. Again, works perfectly fine in 2.0.17 but for some reason it doesn't in 2.0.18.
demo ? please/
I recently installed this plugin and I'm having a problem. The emoticons seem to be calling the desired image, but from the wrong path. The plugin is pointing to "myforum.com/discussion/5/plugins/Emoticons/images/laugh.gif"
instead of
"myforum.com/plugins/Emoticons/images/laugh.gif"
Any ideas?
@imijj, open plugins/Emoticons/class.emoticons.plugin.php and go to line 321 or somewhere around there. There should be a line that looks like this:
Change that to this:
Add Pages to Vanilla with the Basic Pages app
Did that and now its trying to call an image from this path: http://plugins/Emoticons/images/laugh.gif
@imijj: The other way I posted will output the relative path to the forum dispatcher if you have the forum in a subdirectory. Put TRUE in Gdn_Url::WebRoot() to include the domain.
Add Pages to Vanilla with the Basic Pages app
Thanks a lot!