vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Remove access to New Threads (https://vborg.vbsupport.ru/showthread.php?t=101365)

eNforce 11-23-2005 12:02 AM

Remove access to New Threads
 
I'm looking for a Mod to remove access to New Threads in a specific forum for a single specific member.

does one exist?

tnguy3n 11-23-2005 12:12 AM

well, you can use conditional in templates to do the trick.

eNforce 11-23-2005 12:21 AM

I don't know how to do this :surprised:

peterska2 11-23-2005 01:31 AM

In your forumdisplay template find the bit that says about newthread.gif and around that code add something like:
Code:

<if condition="$bbuserinfo[userid]!=x">
all the stuff about newthread.gif
</if>

Change the x to the userid number of the user that you dont want to display the button to.

There are two instances of this in the template so make sure that you do both of them.

BTW, I've not checked the code, just done it from memory so if theres a bug give me a poke and I'll fix it.

eNforce 11-23-2005 01:35 AM

Does that remove the users new thread privileges to all forums? I want to only remove it for a specific forum :squareeyed:

peterska2 11-23-2005 01:40 AM

ooops yeah it would.

Code:

<if condition="$forum[forumid]=x">
      <if condition="$bbuserinfo[userid]!=y">
                  stuff for button
      </if>
<else />
      stuff for button
</if>

should do it. of course this is even more untested coz of the nested if's.

x = forum id number
y = user id number

tnguy3n 11-23-2005 02:19 AM

Quote:

Originally Posted by peterska2
ooops yeah it would.

Code:

<if condition="$forum[forumid]=x">
      <if condition="$bbuserinfo[userid]!=y">
                  stuff for button
      </if>
<else />
      stuff for button
</if>

should do it. of course this is even more untested coz of the nested if's.

x = forum id number
y = user id number

you can also write:
Code:

<if condition="($forum[forumid]=x) AND ($bbuserinfo[userid]!=y")>msg</if>
;)

eNforce 11-23-2005 04:25 AM

Quote:

Originally Posted by tnguy3n
you can also write:
Code:

<if condition="($forum[forumid]=x) AND ($bbuserinfo[userid]!=y")>msg</if>
;)

I like this method, however I fiddled around with it for at least an hour and can't figure out where to paste it :disappointed:


All times are GMT. The time now is 02:35 PM.

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.01083 seconds
  • Memory Usage 1,726KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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