PDA

View Full Version : Modules displayed by user choice?


Delirion
07-01-2004, 06:32 AM
Is there some way to hack the code so that the users can chose which modules they want to have displayed on their homepage? I've installed a bunch of modules and my users all seem to be divided about which ones are useful to them and which aren't. To display all of them would clutter up the homepage - I know I can set what usergroup can see what modules, but can't there be a hack that the users can freely chose which modules they would like to have displayed and which ones they don't want?

attroll
07-01-2004, 01:26 PM
That would be a cool idea, having the user pick which module they want to display.

Our Sponsors
 

Polo
07-07-2004, 11:48 AM
definetly a nice idea

nexia
07-07-2004, 04:48 PM
this can be done easily... just take the admin part where you set the display of modules, create a special storage place in the db for each member pref, and usercp to access the admin part just named... when a user with proper permissions modify the display, it is saved in his own... if the user reset, the saved pref is deleted.

and in the portal construction, simply switch between board prefs and user pref...

also, to disable a block, instead of a switch, using the "0" as a display order would disable the block for the user's view...

i think it browse the entire need for this hack... someone for the job ?!

Our Sponsors
 

Polo
07-08-2004, 08:57 AM
sounds complex, but i'm glad is something that someone can do.. hope someone with more php experience than me can accomplish this

Milorad
07-08-2004, 11:06 AM
you can do this yourself using User Profile fields, and basic conditionals.

Polo
07-08-2004, 11:17 AM
mm......yeah, i think i'm grasping the idea and the method that could be used... anyone else has any more ideas?

Delirion
07-13-2004, 07:00 PM
Okay, makes sense.... but I wouldn't know where to begin coding it myself. Hence I asked :P

Milorad
07-13-2004, 07:14 PM
well here it is... its really all template-based, IMO.

If you create a custom user profile field called fieldX, and set it so you can choose Yes or No as the two options (with a title describing the module in question)... then you can just do the following in the template your module is based on:


<if condition="$bbuserinfo[fieldX] =='Yes'">

Module template code

</if>



You could even replace that content with something else, by doing this:



<if condition="$bbuserinfo[fieldX] =='Yes'">

Module template code

<else />

Totally different module code

</if>

zokucivic
07-21-2004, 05:14 PM
Has anyone tested this... Sounds like it would work.

Polo
07-21-2004, 07:11 PM
I'm pretty sure it works, but it will require some work on your side to set everything up......

djnth
09-21-2004, 02:55 PM
Did anyone get this working? I would love to see a working version of this. Seems like such a great feature to have.

djnth

58sniper
09-21-2004, 04:03 PM
Search is your friend. This method (http://www.vbadvanced.com/forum/showthread.php?t=2047) works fine.