How to add a Profile Menu item?

Eddy
Eddy
@eddy
11 years ago
479 posts
I'm using ProJam Light skin and am trying to add a profile menu item, I have tried adding this (style="background-color:#BEDD31;color:#000;") to the Url string but though it does change the tab background color, the dimensions are wrong and the font isn't the same as the other items on the menu, any help would be appreciated.

Thanks
updated by @eddy: 12/28/13 07:12:34AM
douglas
@douglas
11 years ago
2,791 posts
In your skins/jrProJamLight/profile_menu.tpl file, add this:

{jrCore_module_url module="jrPrivateNote" assign="nurl"}
<a href="{$jamroom_url}/{$nurl}/new"><div class="profile_menu_entry">Contact</div></a>

at the end of the code:

{if isset($_items)}
{foreach from=$_items key="module" item="entry"}
    {if $entry.active == '1'}
    <a href="{$entry.target}"><div class="profile_menu_entry profile_menu_entry_active">{$entry.label}</div></a>
    {else}
    <a href="{$entry.target}"><div class="profile_menu_entry">{$entry.label}</div></a>
    {/if}
{/foreach}
{/if}

{jrCore_module_url module="jrPrivateNote" assign="nurl"}
<a href="{$jamroom_url}/{$nurl}/new"><div class="profile_menu_entry">Contact</div></a>

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 11/20/13 10:09:31AM
Eddy
Eddy
@eddy
11 years ago
479 posts
Thank you Douglas, awesome! Just waiting for the 5.1.3 update so I can do this :).
Eddy
Eddy
@eddy
11 years ago
479 posts
Hey Douglas, where and what do I add to show the user_id on the url so it works with the changes done to JR 5.1.3?
updated by @eddy: 11/26/13 11:23:06AM
douglas
@douglas
11 years ago
2,791 posts
ouviste:
Hey Douglas, where and what do I add to show the user_id on the url so it works with the changes done to JR 5.1.3?

I'm not 10% sure what you mean, where do you need a user_id?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Eddy
Eddy
@eddy
11 years ago
479 posts
So when a user clicks on "contact", their userid is automatically entered into the "Recipient" field on the private note, JR 5.1.3 was updated so it works this way, instead of showing the word "Search" in the recipient field.
updated by @eddy: 11/26/13 12:42:37PM
brian
@brian
11 years ago
10,148 posts
I deleted your question on the Private Notes module that was asking the same thing as here - let's give Douglas a chance to answer.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Eddy
Eddy
@eddy
11 years ago
479 posts
Ok, sorry.
Eddy
Eddy
@eddy
11 years ago
479 posts
I still haven't figured this out, any ideas?
brian
@brian
11 years ago
10,148 posts
Sorry - I thought Douglas would see this and follow up. Basically you would do something like this in your profile_header.tpl (or where ever you want it to appear):

{capture name="tpl" assign="tpl"}
{literal}
    {jrCore_module_url module="jrPrivateNote" assign="murl"}
    {foreach $_items as $i}
        <a href="{$jamroom_url}/{$murl}/new/user_id={$i._user_id}">Send a Note to {$i.user_name}</a><br>
    {/foreach}
{/literal}
{/capture}
{jrCore_list module="jrUser" profile_id=$_profile_id template=$tpl}

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 11/27/13 04:54:47PM
Eddy
Eddy
@eddy
11 years ago
479 posts
Thank you, I appreciate it.
Eddy
Eddy
@eddy
11 years ago
479 posts
I'm getting a syntax error when saving it Brian, any idea why?
Eddy
Eddy
@eddy
11 years ago
479 posts
I'm trying to add this to the profile_menu template by the way.
brian
@brian
11 years ago
10,148 posts
I don't think you want it in the profile menu - I don't think that is going to work out unless I'm not understanding why you want that. The Profile Menu is dynamically generated based on the modules/options available to the profile.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,148 posts
Try copying it again - for some reason the quotes were "weird" quotes - must have been from my TextEdit I cut and pasted it into as the first time I posted the code snippet it messed up, and I didn't want to lose it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Eddy
Eddy
@eddy
11 years ago
479 posts
Thanks Brian, I did as you suggested and it works great, but in order for it to show properly in the menu, add the div after the link as posted above by Douglas.

updated by @eddy: 11/27/13 05:37:54PM
douglas
@douglas
11 years ago
2,791 posts
Sorry for not replying sooner.

If you want just a single contact link for the profile menu, use this...

{capture name="tpl" assign="tpl"}
    {literal}
        {jrCore_module_url module="jrPrivateNote" assign="murl"}
        {foreach $_items as $i}
        <a href="{$jamroom_url}/{$murl}/new/user_id={$i._user_id}"><div class="profile_menu_entry">Send a Note to {$i.user_name}</div></a>
        {/foreach}
    {/literal}
{/capture}
{jrCore_list module="jrUser" limit="1" profile_id=$_post._profile_id template=$tpl}

in your profile_menu.tpl file.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 11/28/13 04:03:07AM
Eddy
Eddy
@eddy
11 years ago
479 posts
No prob Douglas, all good, thanks for the update.

Tags