Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2014, 01:18 PM
Apexi Apexi is offline
 
Join Date: Oct 2010
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 10-21-2014, 01:50 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Apexi View Post
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?
Reply With Quote
  #3  
Old 10-21-2014, 02:05 PM
Apexi Apexi is offline
 
Join Date: Oct 2010
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
But is there any way to add this change only for one sub-forum and not the entire forum?
Reply With Quote
  #4  
Old 10-21-2014, 02:37 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Apexi View Post
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
Reply With Quote
  #5  
Old 10-21-2014, 02:59 PM
Apexi Apexi is offline
 
Join Date: Oct 2010
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 10-22-2014, 01:03 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Code:
<vb:if condition="$GLOBALS[forumid] == X"></vb:if>
Reply With Quote
  #7  
Old 10-22-2014, 07:34 AM
Apexi Apexi is offline
 
Join Date: Oct 2010
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07723 seconds
  • Memory Usage 2,232KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (5)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete