vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   if user dont want see a widget..disable it. how? (https://vborg.vbsupport.ru/showthread.php?t=236123)

cloferba 02-17-2010 01:22 PM

if user dont want see a widget..disable it. how?
 
i was wondering about make an select option on user control panel, to give user the permission for disable or enable a widget of forumblock

for example..

on my site i have 2 news widgets (a widget from a newspaper of spain and other from argentina).
if user is from spain..their dont want to see news from argentina,...so how can he disable argentinian news widget?

is any way to do this?

thank you very much!

Lynne 02-17-2010 08:08 PM

Create a user profile field for the users that they can set to Yes or No and then put a condition around your widget code (assuming it is a php widget you wrote yourself) that will either do, or not do the contents based on the profile field value. If it's not a php widget, then create your own template to use with the other widget and put the condition around the template code.

cloferba 02-17-2010 08:39 PM

no really what to do...
i use html for the widget

how should i wrote the condition? i dont know the syntax

i know is easy, i only need a hand (or two :P )


All times are GMT. The time now is 09:13 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.00896 seconds
  • Memory Usage 1,712KB
  • 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
  • (3)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