More obvious voting and solution marking for question threads

More obvious voting and solution marking for question threads 2022-02-26

Sem autorização para baixar
Compatibilidade com XF
  1. 2.2.x
Descrição curta
Enhance your question thread posts with simple template edits for better visibility. Add "vote" and "mark as solution" prompts, adjust opacity for thumbs up/down icons, and customize styling using extra.less for a seamless user experience.

Why do this?​


Users often don't realise that question thread posts can by voted on, or that OP can mark as solution.

These simple template edits make it more obvious.
Instead of:
Screenshot 2022-02-23 at 12.52.00.webp

It will be this:
Screenshot 2022-02-23 at 12.51.12.webp


Two simple template edits:​


In the template app_content_vote.less:​


  • Search for @xf-fontSizeLargest and replace with @xf-fontSizeLarge
  • Search for .m-faBefore(@fa-var-angle-up); and replace with .m-faBefore(@fa-var-thumbs-up);
  • Search for .m-faBefore(@fa-var-angle-down); and replace with .m-faBefore(@fa-var-thumbs-down);
You should now have thumbs up and down. But they are a bit faint so

  • Search for opacity: 0.2; and change to something like opacity: 0.7;

Text prompts: in the template post_question_macros:​



(1) Search for <div class="message-column"> and replace with
CÓDIGO:
<div class="message-column">
                <xf:comment>add the word "vote"</xf:comment><span style="color:gray;text-align:center;font-size:11px">Vote:</span>
(style to suit)

(2) Search for <span class="u-srOnly">{{ $post.is_question_solution ? $isSolutionText : $makeSolutionText }}</span>and replace with
Code:
CÓDIGO:
<span class="u-srOnly">{{ $post.is_question_solution ? $isSolutionText : $makeSolutionText }}</span>
                            <xf:comment>add the phrase mark as solution </xf:comment>
                           <span style="color:gray;text-align:center;font-size:11px">({{ $post.is_question_solution ? $isSolutionText : $makeSolutionText}})</span>

NB: if you unmark as solution, the text does not actually change until you refresh the page.

For more dynamic control of styling use a class and define in extra.less

NB:be careful not to erase the closing </a> or you will be sorry.
Autor
axtona
Visualizações
630
Primeiro lançamento
Última atualização
Avaliações 0,00 estrelas 0 avaliações
Link quebrado? Enviar mensagem para a equipe NP que vamos ajudá-lo rapidamente!
Apoie o desenvolvedor Se você está satisfeito com o teste ou seu projeto gerou lucro, clique no botão “Mais informações” para apoiar o desenvolvedor comprando.

Mais recursos de axtona

Perfil - Personalize Sua Identidade no Fórum A
Persona dá a cada membro em seu fórum as ferramentas para fazer sua presença única.
XenForo Galeria de Mídia / XFMG A
Galeria XenForo é um adendo oficial do XenForo que permite você adicionar uma galeria ao seu XF2
Relevio.ai A
Relevio.ai 1.0.0
Este é o addon XenForo para Relevio, um motor de moderação único, baseado em contexto e regras
Visualizações
135
Atualizado
Voltar
Top