View Full Version : Give an option to see certain modules or not.
This hack will allow you to give your users an option if they want to see a certain module.
Installation should be less then 5 minutes for one module.
* Add a new ‘User profile field’. It should be a ‘Multiple-Selection Checkbox’.
Title: *** Module
Description: Do you want to show the *** module?
Limit Selection: 1
Boxes Per Line: 1
Options: Yes. (Shouldn’t be check if you don’t want to see it.)
Display Order: Any thing
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Which page displays this option? Options:Other
* Save it. Look and remember what the number of the field is.
* Go into the template of the module you are changing.
* Add this BEFORE any other code there: <if condition="$bbuserinfo[fieldXX] == True"> REPLACE THE ‘XX’ WITH THE FIELD NUMBER OF THE PROFILE FIELD YOU JUST MADE
* Add this AFTER all the code:</if>
* Save and enjoy!
58sniper
07-28-2004, 01:11 PM
Cool idea, but shouldn't you build in some default settings for non-logged in users, such as guests? I haven't implemented your idea, but from looking at it, non of the modules would display to a guest/non-registered user. Probably not a good idea.
Ok. Here are instructions how to make it viewed by all automatically and it will only not be viewed if the user puts a check mark in the profile. This way, all guests can see it and a regular user sees it by default.
* Add a new ‘User profile field’. It should be a ‘Multiple-Selection Checkbox’.
Title: *** Module
Description: Do you want to show the *** module?
Limit Selection: 1
Boxes Per Line: 1
Options: No. (Shouldn’t be check if you want to see it.)
Display Order: Any thing
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Which page displays this option? Options:Other
* Save it. Look and remember what the number of the field is.
* Go into the template of the module you are changing.
* Add this BEFORE any other code there: <if condition="$bbuserinfo[fieldXX] == False"> REPLACE THE ‘XX’ WITH THE FIELD NUMBER OF THE PROFILE FIELD YOU JUST MADE
* Add this AFTER all the code:</if>
* Save and enjoy!
tomshawk
07-29-2004, 10:41 AM
This is awesome;
I'll be installing this tonight
Combine this with the request, I just made for a module for subscribed boards, this is getting more and more like what I have been trying to do for a while.
Excellent stuff Abe, Thank you!!
Natch
08-05-2004, 12:22 AM
OMG - this is just what I was after - all we need now is a small CMPS addon to the UserCP and we have have User customised Homepages! :)
KW802
08-05-2004, 04:26 PM
OMG - this is just what I was after - all we need now is a small CMPS addon to the UserCP and we have have User customised Homepages! :)Why would you need a new add-on? If each module on the CMPS had a corresponding user profile field then the user could just go to their UserCP --> Edit Profile --> Additional Options section and choose which module they'd want to see or not. Taking it a step further the phrase could be changed from "Additional Options" to "Portal Options". :D
Unless you're talking a full-blown interface that'd allow them to change the module placements, etcetra.
Edit: Kudos to Abe for this one; it opens the door up for interesting possibilities.
Edit #2: Thinking out loud.... what would be really cool then would be a hack to the "Add module" code to give a new option that when a new module is added that it would create a new user profile field with the defaults filled in.
Natch
08-05-2004, 11:32 PM
Why would you need a new add-on?
...
Unless you're talking a full-blown interface that'd allow them to change the module placements, etcetra.This was what I was hoping for...Edit #2: Thinking out loud.... what would be really cool then would be a hack to the "Add module" code to give a new option that when a new module is added that it would create a new user profile field with the defaults filled in.This is a great idea!
04screamer
02-15-2005, 07:37 PM
Edit #2: Thinking out loud.... what would be really cool then would be a hack to the "Add module" code to give a new option that when a new module is added that it would create a new user profile field with the defaults filled in.
That would make this perfect!!
trulylowcarb
04-01-2005, 09:56 PM
Excellent! Thanks for this user-friendly mod.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.