vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   On/Off Switch user profile fields (https://vborg.vbsupport.ru/showthread.php?t=79044)

lasto 03-30-2005 01:55 AM

On/Off Switch user profile fields
 
ok just installed photopost and on forum index it displays the featured photos and this is called by one line of code in forumhome which is

$photopostfeature

now some members prefer to see that box whereas others dont so im lookin for a way where i can add a new profile field or whatever it is so in their options they can tick a box to turn it on or turn it off.

Anyone know how to do this ?

Oblivion Knight 03-30-2005 08:21 AM

First of all, set up a custom profile field..
Admin CP -> User Profile Fields -> Add New User Profile Field


Create it as a "Single-Selection Menu" type..

Title: Display Featured Photos
Description: By default, we display some featured photos from our gallery on the forum home. If you wish, you may turn these off.
Options: Yes, leave them on
No, turn them off

Set Default: Yes, but No First Blank Option

The rest of the options are up to you, and then click "Save".

Make a note of the field number on the "User Profile Field Manager" (ie. field5).


Now go and edit your FORUMHOME template and find:
HTML Code:

$photopostfeature
Replace it with:
HTML Code:

<if condition="$bbuserinfo['field5']!='No, turn them off'">$photopostfeature</if>
Replacing field5 with your field number that you made a note of earlier..

lasto 03-30-2005 08:41 AM

thanks a lot oblivion knight.

EDIT - tested and worked perfect - cheers again for your help

MathewC 05-09-2007 07:49 PM

how would i get it so if you havent filled in a profile field it shows a message on forum home (or where ever i want to display message)

Sorry for bump :]


All times are GMT. The time now is 05:13 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.00898 seconds
  • Memory Usage 1,711KB
  • 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_html_printable
  • (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