solved How to remove links from profile_menu.tpl

derrickhand300
@derrickhand300
10 years ago
1,353 posts
I am trying to remove a few links for profile_menu.tpl and keep getting this error message
error message= jrProfile_menu: valid profile_quota_id parameter required 

Here is one of several pieces of code I have tried
{jrProfile_menu template="profile_menu.tpl" profile_url="$purl" profile_quota_id="$profile_quota_id" exclude_modules ="jrPage,jrVimeo,jrYouTube"}
I have watched a video on the debug tool- and read all the docs several times- still I do not understand what I am doing wrong here
I have entered several different pieces of code for profile_quota-id but nothing works for me
Until tonight I thought I understood quotas...but now I am not sure?

Here is another example of what I have tried
{jrProfile_menu template="profile_menu.tpl"  profile_quota_id="$profile_quota_id" profile_url="$profile_url" exclude_modules="jrPage,jrYouTube,jrVimeo" }

Can someone who has made this work on their site tell me what I am not understanding?
Thank you
updated by @derrickhand300: 12/22/16 11:55:59AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
That looks fine to me, I have used it exactly like that although it was a year or more ago.

To receive that error message means your $profile_quota_id is not a number. Put this in your template to check that:
profile_quota_id="{$profile_quota_id}"

So my guess is that you are including the menu somewhere where it cannot be used - where are you trying to make your profile menu appear?

Docs:
https://www.jamroom.net/the-jamroom-network/documentation/development/1997/jrprofile-menu


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thanks UJ- was hoping you would see this
My sole reason for this is to remove the YouTube/Vimeo links from the profile_menu.tpl which is where i am editing... I have tried adding this to the current code in there- AND i have tried using this to RREPLACE the current code in there

The debug shows something like "profile_quota-id=>2"....not sure how to add that to this code?
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Debug returns
{$profile_quota_id}	"2"

I also tried adding the code like you show it here
{jrProfile_menu template="profile_menu.tpl"  profile_quota_id={$profile_quota_id} profile_url="$profile_url" exclude_modules="jrPage,jrYouTube,jrVimeo" }

updated by @derrickhand300: 03/17/15 11:58:57AM
derrickhand300
@derrickhand300
10 years ago
1,353 posts
I have also tried a work around of going to the quotas for the 3 specific modules and unchecking " allowed on profile"...but in the youtube/vimeo modules doing this disables the videos for the site

Here is the page w/ debug window
http://theamericandriller.com/drilling-ahead
updated by @derrickhand300: 03/17/15 12:13:38PM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I menat to add that code (profile_quota_id="{$profile_quota_id}") to the template NOT inside the jrProfile_menu function. Just put it before the function and see what gets printed to the page - kind of like a poor man's debug - you see jsut the variable you are interested in.

Make it more obvious by putting it in a h1:
<h1>profile_quota_id="{$profile_quota_id}"</h1>

BUT, if your quota id is 2, that might be something now working quite right in the code. As far as I can see you should only get that error message if $profile_quota_id is not a number.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
derrickhand300
@derrickhand300
10 years ago
1,353 posts
ok got it...here is what it returns

PROFILE_QUOTA_ID="2"
PROFILE_QUOTA_ID=""
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
That returns 2 values? I don't think that is possible. Unless you have your profile menu function in a loop.

You can't put it in a loop or you would have 2 menus.

If it returns "2" it will work. If it returns "" it will not work (and you will see the error you are seeing).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 03/17/15 04:01:27PM
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thanks- I will have to spend the night studying what a loop is
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
A loop like a smarty foreach, section or while.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
derrickhand300
@derrickhand300
10 years ago
1,353 posts
As is usually the case I have been going about it wrong- I should have been editing the profile_header.tpl with the "excludes" at the end of this code
{jrProfile_menu template="profile_menu.tpl" profile_quota_id=$profile_quota_id profile_url=$profile_url exclude_modules="jrPage,jrYouTube,jrVimeo,"}
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Glad you've got it sorted.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags