solved What does jrProfile_is_profile_owner() do?

alt=
@dim
9 years ago
167 posts
Please let me know what is the code doing in profile_header.tpl
{if jrProfile_is_profile_owner($_profile_id)}
    {assign var="from_profile" value="yes"}
{/if}
what is it and can I delete it?
updated by @dim: 03/26/15 12:02:38PM
douglas
@douglas
9 years ago
2,790 posts
That is being used for the main menu, to highlight a link if it is the active page. There maybe another reason for it, but I know that is one of them.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
brian
@brian
9 years ago
10,148 posts
dim:
Please let me know what is the code doing in profile_header.tpl
{if jrProfile_is_profile_owner($_profile_id)}
    {assign var="from_profile" value="yes"}
{/if}
what is it and can I delete it?

No - do not delete it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@dim
9 years ago
167 posts
Hello,
Thanks for the answers.
I get the wrong profile page, if I use that code.
<!doctype html>
<html lang="en" dir="ltr">
<head></head>
<body>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="generator" content="5.2.28/diSa" />
<link rel="stylesheet" href="http:// etc
<script type="text/javascript" src="http:// etc

<div id="wrapper">
    <div id="header">
        <div id="header_content"> 
...etc

Look at <head></head> <body>

{if jrProfile_is_profile_owner($_profile_id)}
    {assign var="from_profile" value="yes"}
{/if}
If I remove this code, the page is displayed correctly.
updated by @dim: 03/26/15 12:49:40PM
brian
@brian
9 years ago
10,148 posts
That is used in a lot of our skins without issue - if you're seeing a problem then likely a customization elsewhere has broken it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@dim
9 years ago
167 posts
douglas: That is being used for the main menu, to highlight a link if it is the active page. There maybe another reason for it, but I know that is one of them.

@brian, what the code is doing more?
I want to understand that I will lose if I do not use it.
brian
@brian
9 years ago
10,148 posts
dim:
douglas: That is being used for the main menu, to highlight a link if it is the active page. There maybe another reason for it, but I know that is one of them.

@brian, what the code is doing more?
I want to understand that I will lose if I do not use it.

It lets the header template "know" if it is being included by a profile templates versus a skin template.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@dim
9 years ago
167 posts
brian:It lets the header template "know" if it is being included by a profile templates versus a skin template.
I'm sorry, but why is it necessary?
brian
@brian
9 years ago
10,148 posts
So that it can adjust menu items, show menu items, hide menu items, etc, - I can think of a number of reasons why it would be good to know. It's currently used to highlight specific menu options depending on what you are viewing.

if you want to remove it, then feel free to remove it - I don't think it will "break" anything, it's just you may not see something highlighted that previously would have been.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@dim
9 years ago
167 posts
OK, thank you!
brian
@brian
9 years ago
10,148 posts
No problem!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@dim
9 years ago
167 posts
@brian, now I have a similar problem with other pages (blogs, community, galleries, etc...).
Page headers are not formed properly:
<!doctype html>
<html lang="en" dir="ltr">
<head>Community</head>
<body>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="generator" content="5.2.28/diSa" />
<link rel="stylesheet" href="http:// etc...
If I remove this code
{assign var="selected" value="community"}
{jrCore_lang skin=$_conf.jrCore_active_skin id="26" default="community" assign="page_title"}
{jrCore_page_title title=$page_title}
from community.tpl, then I see the correct page headers for the community page.

Why is this happening?
Where can I find the cause of the error?
I made only the changes in the css files, and a few small changes in the templates. By the way, I did not change the community.tpl so far.
michael
@michael
9 years ago
7,714 posts
Please ask new questions in new threads. The titles of the threads help others searching later on. Thanks.

Tags