vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Custom field required to post in this forum (https://vborg.vbsupport.ru/showthread.php?t=249393)

Bouncer222 08-26-2010 09:12 PM

Custom field required to post in this forum
 
I need a simple mod.

A user must have a specific custom field, in this case, custom field 5 filled out in order to post in a specific forum id.

any takers please?

BirdOPrey5 08-26-2010 09:20 PM

I could give you fairly easy instructions to do this yourself using conditionals and editing 1 template...

You could put the quick reply box in the showthread template in a <vb:if condition="..."></vb:if> statement using the condition IF field 5 isn't empty and if in forum x don't show the quick reply box, otherwise do show it.

There's an article in the VB4 articles section that explains the use of conditionals in templates... it's near the top of the firs page at the moment so not hard to find.

Bouncer222 08-28-2010 01:05 PM

I don't want not to show it, and it's not the reply button, its the create new thread button.

If a user clicks create new thread in forum id 2, and user profile field 5 is not filled in, give them a message instead. This message must appear not after they try to submit a new thread, but before they even try to create it.

BirdOPrey5 08-28-2010 01:27 PM

Well in any case you could hide the "New Reply" button the same way, you could even display a short message or an alternate "new Reply" button that takes them to a custom error page if you wanted- both are possible using template conditionals if you don't find anyone to make a dedicated mod for this. Just FYI.


All times are GMT. The time now is 12:45 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.01039 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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