solved templates that add profile menu items and user control to hide them

soaringeagle
@soaringeagle
11 years ago
3,304 posts
heres the situation
i want to build custom fields into the profile modification form

like
profile_hidemenuitem_faqs
profile_hidemenuitem_files

etc etc
id like to enable everything (except shops) for all profiles (including shops) then in the profile modification form alow them to check off the items they want hiden

then in the right templates insert a code that adds display:none to the menu items (desktop and mobile)

i need to know where to look for the template codes that add the menu itemns and how to hide them based in each field being "on"
unfortunately im not so sure it will be that easy cause it looks like theres a for loop that ads each module assigned to the quota
wait.. maybe i need to edit that for loop somehow with for each ..active in quota and custom field !not on in profile_id type logic?

if i matched the part after profile with the identifer that turns on the menu irtem is there a way to write the code so it takes the identifyer itself as a variable

what i mean my that say
jrAudio being allowed on profile is what adds that audio link
and say i make the checkbox named profile_hide_jrAudio

is there a way to rewrite that for look so it checks if profile_hide_(the module name) is on it wont display it

i just want a way that the profiles can choose what menu items show up on thier profiles without having to design a dozen custom quotas to accomplish it

(and sorry for the long post was trying to wrap my brain around the logic behind what i want to accomplish)


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 07/09/16 09:21:02AM
michael
@michael
11 years ago
7,793 posts
If you enable something for the profile eg: VIDEOS and that profile does not have any videos uploaded the the VIDEO tab will not show.

So what your wanting to do is already done automatically.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
hmm really ok i guess its just cause im an admin that i see all them
i guess the profile owners will see the buttons so they can upload things though?

that makes sence and should have been obvious

i did not expect a quick answer at 1 am! corection..2 am
u guys never fail to impress


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
Yeah, admin will always see all the options available to everyone.

The profile owner will see all options available to them to add stuff too.

The visitor will only see tabs that have content in them.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
thnx figured that out now if i could only figureout why my members wont import id be happy


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
soaringeagle:...now if i could only figureout why my members wont import id be happy...
Haven't done any imports myself, so not much help on that one sorry.

One tool I do use sometimes is this one:
http://jsonviewer.stack.hu/

You paste the json into the 'text' area, the change to the 'viewer' area to see whats in it. It will tell you if the json is broken.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
ill try that thnx


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
all it said was invalid json variable


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
That's the issue then. The json you have is not valid so it can't be read.

The json you have came from ning? I've read its sometimes not valid.

eg: This is valid json:
["apples","pears","carrots"]
but put one extra " in there and it all breaks. No 'sort of broken', it either all works or all doesn't work.
["apples","pears","carr"ots"]

Need to figure out why its breaking or get it not broken. Not sure how to advise you to do that though sorry.

--
I think @paul has built some checks into the importer for broken things. It might be a case of you having found a new thing that needs checking for.
updated by @michael: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
Lets continue in the other thread so all the needed info is in that thread:
https://www.jamroom.net/ning-to-jamroom/forum/new_posts/18555/member-localjson-wont-import-says-zero-entries

Closing this.
updated by @michael: 12/29/14 09:23:54AM

Tags