vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Restrict Poll Option by Forum? (https://vborg.vbsupport.ru/showthread.php?t=61364)

Christine 02-09-2004 06:49 PM

Restrict Poll Option by Forum?
 
Ok, I am late getting into the game with the new conditional templates. Hoping someone can help?

Right now, I am using user security permissions to restrict polls to only be allowed in one of our forums. I would like to look at setting this as a conditional instead, or as part of the phpincludes_start settings.

Anyone have any thoughts on this?

Gary King 02-09-2004 11:31 PM

I think permissions are the right way to go with this, what's wrong with using those? :)

Christine 02-10-2004 02:22 AM

Because it is a pain when adding new usergroups (which we do more often than I like).

That is why I was looking for something like if forumid !=x then disable the poll option.

:)

Gary King 02-10-2004 11:13 AM

Then using something like
HTML Code:

<if condition="$bbuserinfo[usergroupid] != 6"><!-- show poll stuff here--></if>

Christine 02-10-2004 01:07 PM

I am not following you?

I want to allow anyone to start a poll, I just want to limit the option to start a poll to the one forum that we allow it in.

I have permissions set for 'no' on open polls, with a custom override on each usergroup for that one forum.

I want to say 'yes' to polls as the default, and then have the system override that if the forum they are trying to start the poll in isn't the designated forum.

Gary King 02-10-2004 06:55 PM

Open newthread template and find
HTML Code:

                                <if condition="$show['poll']">
Replace with
HTML Code:

                                <if condition="$show['poll'] and $forumid == [b]x[/b]">
And change x to the forum ID where people can post polls.

Christine 02-12-2004 12:22 AM

Thats all there is to it?

Oh my -- I am going to LOVE this once I get used to it.

Thanks for the help!!

:)


All times are GMT. The time now is 06:32 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.01140 seconds
  • Memory Usage 1,718KB
  • 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
  • (3)bbcode_html_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