Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Relocating Like Button
aery
✭✭✭
Heya,
First of all thanks for making such a wonderful plugin
I would like this functionality after author name and not beside options.
So the even we are talking about is AuthorInfo and not before BeforeDiscussionOptions
Where do I change that in plugin? I couldn't find it at default.php
There was an error rendering this rich post.
0
Comments
I didn't look closely but look for
it might be what you are looking for - it is not clear whether you are talking about the click.
change that to the event that exists where you want.
e.g.
public function ..... AuthorInfo..... ($Sender, $Args)
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
found it. It was line 209 -
public function DiscussionController_CommentInfo_Handler($Sender)
For all -
To relocate like button to place of your choice like near name, author picture, below comment, near options or whatever; follow these steps -
1) Find the event with eventi plugin or text search fireevent in local vanilla directory.
This will give you all the places you can modify or insert your custom code/design.
2) Once you found out your event, replace middle term of line 209. So it will be something like -
public function DiscussionController_EVENTNAME_Handler($Sender)
Refresh page, and you will have your like button wherever you want
Example (new location near author info) -
There was an error rendering this rich post.
@aery -
I agree with scuba323 .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Okay, so it copied like button not replaced it.
Perhaps @hbf can help me.
There was an error rendering this rich post.
I can help with that, just use good old css to hide the one near the options, I found that on 2.1 they hid a few things using css and I uncovered them . So it is perfectly valid to remove things using css alone
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder But then it is not the right way just hiding things. They should not appear first of all.
There was an error rendering this rich post.
i'm not looking at the code at the moment, but there is more than one handler, in fact ther is one handler, that calls the code in the other handler. so you'll need to make sure you have the correct handlers called out in all places to ensure it executes the code only once and at the right time.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
yayyyy... you are back.
Thanks for the support.
There was an error rendering this rich post.
thanks for the warm reception.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Where you have been wiki guy?
There was an error rendering this rich post.
i've mostly been lurking the darker corners of the internet. places like homebrewforums.net well, that and i have a lot going on in the "real world"
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained