vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Hide number of votes in poll (https://vborg.vbsupport.ru/showthread.php?t=315000)

Apexi 10-21-2014 01:18 PM

Hide number of votes in poll
 
Hi again guys.
I'm looking for a plugin or any other method to hide the number of votes in polls.
I found Sakera's Hide Poll Results, but that plugin only hide the result and not the number of voters.

Any suggestion?

fxdigi-cash 10-21-2014 01:50 PM

Quote:

Originally Posted by Apexi (Post 2519617)
Hi again guys.
I'm looking for a plugin or any other method to hide the number of votes in polls.
I found Sakera's Hide Poll Results, but that plugin only hide the result and not the number of voters.

Any suggestion?

well this is the code you want to hide:

HTML Code:

<dl class="stats">
                        <dt class="totalvotes">{vb:rawphrase voters}</dt>
                        <dd><span class="totalvotes">{vb:raw pollinfo.numbervotes}</span>. {vb:raw pollstatus}</dd>
                </dl>

you have the choice what to do. if you want to delete it then you won't see it anymore unless you make a revert for your template where you deleted this code from...OR

you can set conditional permission that allow mods and admins to see that content only...

Solved? :)

Apexi 10-21-2014 02:05 PM

Thanks :)
But is there any way to add this change only for one sub-forum and not the entire forum?

fxdigi-cash 10-21-2014 02:37 PM

Quote:

Originally Posted by Apexi (Post 2519623)
Thanks :)
But is there any way to add this change only for one sub-forum and not the entire forum?

yes, you can also add a condition to the subforum you don't want show up at,

Show in one forum: Remember to change x

HTML Code:

<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
Show in several forums:

HTML Code:

<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
--------------- Added [DATE]1413906087[/DATE] at [TIME]1413906087[/TIME] ---------------

this is a good link for more info:

vB4 Template Conditionals List

Apexi 10-21-2014 02:59 PM

Again, thanks.
Will give it a try.

--------------- Added [DATE]1413913272[/DATE] at [TIME]1413913272[/TIME] ---------------

Did not work for me.
I've googled it and some claims that $forum[forumid] have to be registered to the template.

Not much more info is given.

--------------- Added [DATE]1413917060[/DATE] at [TIME]1413917060[/TIME] ---------------

No wonder why it doesn't work.
First of, it seems as <vb:if condition="$forum[forumid] != x"> is not supported anymore https://vborg.vbsupport.ru/showpost....&postcount=399

Second. Even if i remove
HTML Code:

<dl class="stats">
                        <dt class="totalvotes">{vb:rawphrase voters}</dt>
                        <dd><span class="totalvotes">{vb:raw pollinfo.numbervotes}</span>. {vb:raw pollstatus}</dd>
                </dl>

the poll is still showing up

ozzy47 10-22-2014 01:03 AM

Try this, and make sure you are editing the right style.

Code:

<vb:if condition="$GLOBALS[forumid] == X"></vb:if>

Apexi 10-22-2014 07:34 AM

Quote:

Originally Posted by ozzy47 (Post 2519681)
Try this, and make sure you are editing the right style.

Code:

<vb:if condition="$GLOBALS[forumid] == X"></vb:if>

Thanks but i i've tried that already.
I don't think it is problems with the code. As i said before, even if i remove

HTML Code:

<dl class="stats">
                        <dt class="totalvotes">{vb:rawphrase voters}</dt>
                        <dd><span class="totalvotes">{vb:raw pollinfo.numbervotes}</span>. {vb:raw pollstatus}</dd>
                </dl>

the poll is still shown. The test forum only has one template and i'm editing pollresults_table

The text "Voters: xx" is gone, but the votes is also shown next by the diagram.

--------------- Added [DATE]1413969320[/DATE] at [TIME]1413969320[/TIME] ---------------

After some time of testing i finally find out which one to change.
But still, <vb:if condition="$GLOBALS[forumid] == X"></vb:if> wont work


All times are GMT. The time now is 09:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02992 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete