PDA

View Full Version : User selectable modules?


trana
04-27-2007, 09:40 PM
Can someone please tell me the easiest way to have user selectable modules?

For example, I would like the user to have an option in their usercp to pick whether they want to see a certain module on the homepage.

Can anyone tell me how to do this?

Also, if there is anyway to limit this to users within a certain group or postcount, that would be great as well, but I think I know how to get around it if no one knows.

Thanks in advance!

Brian
04-28-2007, 12:02 PM
Sorry, but as far as I know, no hacks like that have been posted.

Our Sponsors
 

burley
05-08-2007, 11:11 AM
I was looking for something like that too and I found the following thread;

http://www.vbadvanced.com/forum/showthread.php?t=2047

But I guess that only works with the old cmps, right?

Limit it to certain usergroup is easy, just set the permissions of a module to a specific usergroup (>> edit module)

trana
05-08-2007, 03:16 PM
That should work fine, I just need a conditional for the page identifier as well, since I don't want to turn the module off globally....

i.e.

<if condition="$bbuserinfo[fieldXX] == True" AND PAGE=INDEX

Can anyone help me do this?

Thanks!

Our Sponsors
 

burley
05-08-2007, 04:44 PM
Well actually it doesn't work, at least not with me.

That is, the module is shown anyway, regardless of the way the field is set.
Besides, even if the field is set to "false" then it would still show the module, it would just leave it without content.

Lionel
05-08-2007, 06:41 PM
That should work fine, I just need a conditional for the page identifier as well, since I don't want to turn the module off globally....

i.e.

<if condition="$bbuserinfo[fieldXX] == True" AND PAGE=INDEX

Can anyone help me do this?

Thanks!

and $pages[name]=='adv_index'

trana
05-11-2007, 12:06 AM
and $pages[name]=='adv_index'

Thanks, but will it even work according to the above comment about the custom field conditional not working? I assume we need to manually instruct CMPS to load those fields on the homepage (index.php) hit?

Brian, can you advise?

Thanks!

Brian
05-11-2007, 11:06 AM
That hack was created for v1.0, and at the time each of the different modules had their own templates and there was no module shell template. So the same code is not going to work now except with modules that do not have the "Use Module Shell" template option enabled.

burley
05-16-2007, 02:42 PM
hmm, so is that the way the "quick moderation" module works?

trana
05-17-2007, 08:49 PM
hmm, so is that the way the "quick moderation" module works?

I think that is based on usergroups and not a custom field that has been set by the member.

trana
06-03-2007, 09:21 PM
Can anyone tell me why this won't work?

<if condition="$bbuserinfo[field25== 'Yes']">
module code
</if>

My VB/HTML is a little rusty.

Brian
06-04-2007, 09:41 AM
<if condition="$bbuserinfo['field25'] == 'Yes'">

trana
06-04-2007, 06:32 PM
It works! Thanks!