PDA

View Full Version : if user dont want see a widget..disable it. how?


cloferba
02-17-2010, 01:22 PM
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 )