Where do I put this code?
I would like to show if a topic was resolved or not. Here is the code. I cannot figure out where to put it./** * Show Unresolved meta tag. */ public function Base_BeforeDiscussionMeta_Handler($Sender, $Args) { $Resolved = GetValue('Resolved', GetValue('Discussion', $Args)); // if (CheckPermission('Plugins.Resolved.Manage') && !$Resolved) { if (!$Resolved) { echo ' <span class="Tag Tag-Unresolved">'.T('Unresolved').'</span> '; } } /** * Show [RESOLVED] in discussion title when viewing single. */ public function DiscussionController_BeforeDiscussionOptions_Handler($Sender, $Args) { $Discussion = $Sender->Data('Discussion'); // if (CheckPermission('Plugins.Resolved.Manage') && $Discussion->Resolved) { if ($Discussion->Resolved) {
Thanks, have a nice night!
Comments
if you are referring to this discussion.
http://vanillaforums.org/discussion/comment/218808/#Comment_218808
then make the appropriate changes in
class.resolved.plugin.php
search for the function and cut and paste and modify.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes thanks. What exactly do i replace? I think something went wrong because I can no longer load my forum.
I replaced
/** * Show Unresolved meta tag. */ public function Base_BeforeDiscussionMeta_Handler($Sender, $Args) { $Resolved = GetValue('Resolved', GetValue('Discussion', $Args)); if (CheckPermission('Plugins.Resolved.Manage') && !$Resolved) { echo ' <span class="Tag Tag-Unresolved">'.T('Unresolved').'</span> ';
with
/** * Show Unresolved meta tag. */ public function Base_BeforeDiscussionMeta_Handler($Sender, $Args) { $Resolved = GetValue('Resolved', GetValue('Discussion', $Args)); // if (CheckPermission('Plugins.Resolved.Manage') && !$Resolved) { if (!$Resolved) { echo ' <span class="Tag Tag-Unresolved">'.T('Unresolved').'</span> '; } } /** * Show [RESOLVED] in discussion title when viewing single. */ public function DiscussionController_BeforeDiscussionOptions_Handler($Sender, $Args) { $Discussion = $Sender->Data('Discussion'); // if (CheckPermission('Plugins.Resolved.Manage') && $Discussion->Resolved) { if ($Discussion->Resolved) {
essentially all you need to do is replace
if (CheckPermission('Plugins.Resolved.Manage') && !$Resolved) {
with
in the two functions.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I have changed the code and it still does not show.
Link: forums.yourtechadvisors.com
correction to above regarding
if you want to see [RESOLVED] in discussion title when viewing the individual discussion.
change in
public function DiscussionController_BeforeDiscussionOptions_Handler($Sender, $Args) {
change
if (CheckPermission('Plugins.Resolved.Manage') && $Discussion->Resolved) {
to
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I really do thank you for your help. I have changed the code, and it still does not show up.
What am i doing wrong? It would be nice if this was already done.
it is already done. . just cut and paste in the correct places. it helps you learn.
what exactly doesn't show up?
you just have to explain more expicitly step by step what you want to see with more detail as well as screenshots of what you expect to show where.
also provide the code changes your made.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I would like to see a Resolved badge where the unresolved badge is when a topic is resolved. As of now, there is nothing that says Resolved when a topic is Resolved other than you cannot post a reply.
Here is my code.
Link: forums.yourtechadvisors.com`
Your wish is my command.
ok. change
to
sometimes links are good. sometimes images are better with circles around what you want or expect to see. thats why I asked for image.
I rarely click on web page links unless trying to solve a js or css problem.
please click here
or press 9 to continue.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks for the help. It is now showing a resolved badge.
(Topic Closed)