user tip the perfect groups disabling the profile header

soaringeagle
@soaringeagle
11 years ago
3,304 posts
theres been maqny requests to disable the profile header along with the profile sidebar in groups

i spend days trying to figure this out and thankfully brian came through with the answer

so i wanted to share it with you

heres my full profile_header.tpl code
and i willl explain the easy ..super easy way to make this happen

{assign var="from_profile" value="yes"}
{jrCore_include template="header.tpl"}
{if $_post.option != "group"}
   

<div class="container profilecover" {if $profile_z == 'on'}id="profile_z"{/if}>
{if isset($profile_cover_image_size) && strlen($profile_cover_image_size) > 0}
{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_cover_image" item_id=$_profile_id size="xxxlarge" class="img_scale" alt=$profile_name title=$hover width=false height=false}{/if}


    {if !isset($_conf.sebuildmynewninja_forum_profile) || strpos($current_url, $_conf.sebuildmynewninja_forum_profile) !== 0}
    <div class="row">
        <div class="col12 last">
            <div class="profile_name_box">

                <div class="block_config" style="margin-top:3px">
                    {jrCore_module_function function="jrFollower_button" profile_id=$_profile_id title="Follow This Profile"}
                    {jrCore_item_update_button module="jrProfile" view="settings/profile_id=`$_profile_id`" profile_id=$_profile_id item_id=$_profile_id title="Update Profile"}
                    {if jrUser_is_admin() || jrUser_is_power_user()}
                        {jrCore_item_create_button module="jrProfile" view="create" profile_id=$_profile_id title="Create new Profile"}
                    {/if}
                    {if jrUser_is_master()}
                        {jrCore_item_delete_button module="jrProfile" view="delete_save" profile_id=$_profile_id item_id=$_profile_id title="Delete this Profile" prompt="Are you sure you want to delete this profile?"}
                    {/if}
                </div>

                <a href="{$jamroom_url}/{$profile_url}"><h1 class="profile_name">{$profile_name}</h1></a>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col12 last">
            <div class="profile_menu">
                {if jrCore_is_mobile_device()}
                    {jrProfile_menu template="profile_menu_mobile.tpl" profile_quota_id=$profile_quota_id profile_url=$profile_url}
                {else}
                    {jrProfile_menu template="profile_menu.tpl" profile_quota_id=$profile_quota_id profile_url=$profile_url}
                {/if}
            </div>
        </div>
    </div>
    {/if}
{/if}
    <div class="row">

    {if $profile_disable_sidebar != 1}
        {jrCore_include template="profile_sidebar.tpl"}
    {/if}

    {* next <div> starts in body *}

now theres a few things diferent from yours
{if $_post.option != "group"}
   

<div class="container profilecover" {if $profile_z == 'on'}id="profile_z"{/if}>
{if isset($profile_cover_image_size) && strlen($profile_cover_image_size) > 0}
{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_cover_image" item_id=$_profile_id size="xxxlarge" class="img_scale" alt=$profile_name title=$hover width=false height=false}{/if}

and the closing if just before the div class row at the end

most of thats my custom profile cover photo code (see my other tips)
the only parts u need to worry about is
{if $_post.option != "group"}
and the
{/if}

to disable profile headers on group pages find

<div class="container">

just above that paste
{if $_post.option != "group"}
so it looks like
{if $_post.option != "group"}
<div class="container">

then find at the very bottom
<div class="row">
and paste in your closing if so it looks like
{/if}
<div class="row">

then apply the changes clear cache and go look at your newly perfected groups... and smile just like i did when i finaly got mine right




--
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
Strumelia
Strumelia
@strumelia
11 years ago
3,603 posts
SE, within which area is the profile_header.tpl you are referring to?
In the Ningja skin? In the Group module? which module?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
skin inyour cloned skin your working in or since u didnt clone in the profile_header.tpl of your skin



it doesnt solve the follow problem but makes the display absolutelyy perfect


--
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
i might in the future add a group cover photo option tip

ive gone on a serious custimizing trip just cause theres so much more we can do here then on ning

run into a couple lil issues but overall my members aere loving the site
and uber excited to move in


--
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
did you figure it out
is it not exactly what you wanted...minue the follow group


the problem i see with follow group ahnd search group is that the group is actualy seperate modules
and follow and search would have to follow the group...wich is commebts.. the diiscussions..and pages all as 1 integrated entity


--
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
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
soaringeagle: did you figure it out

I didn't, it's really difficult to decipher your posts and/or line of thinking.


--
¯\_(ツ)_/¯ 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: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
no its not its simple copy paste it tells you what to look for where to paste the code and what it should look like after you paste it

it cant possibly be any simpler


--
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
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Yes, that's what I mean.


--
¯\_(ツ)_/¯ 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: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
ok there is 1 way i can make it slightly simpler


open the template
control a to select all control c to copy

open notepad
control v to paste

in notepad edit replace

now in the find and replace aste this in the find wghat
<div class="container">
and in the replace paste this
{if $_post.option != "group"}
<div class="container">

click replace


now change those to find
<div class="row">
theres more then 1
so you dont want to do find and replace just find the past 1 in the template
its very close to the bottom

you can either type {/if} before it
or select it and paste
{/if}
<div class="row">
over it


--
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
Strumelia
Strumelia
@strumelia
11 years ago
3,603 posts
Yes I applied this code solution you described it in a way i could actually understand (this time...l o l ). It works well and should really be default for Ningja bundle users IMHO. Didn't even need to clear cache.
It's a relief to not see that personal profile stuff plastered over every group.
Thanks!

p.s. I think your second way of explaining it was way more hard to understand. I followed your first instructions and it worked fine. Only thing was you didn't say foirst where the template was (which I had to ask you), and then I was confused when i found more than 1 divclassrow but assumed it was the last one i was supposed to paste above.
It worked well.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
yea i did say the last 1 i thought there might be only 1 but double checked
but its pretty logical profile header templates the profile header
you pretty much want to disable it all except the parts that disable the sidebar
and the includes etc at the very top....all the content you wanjt skipped over in a group



and i knew youd be happy and i tried to make it extra simple for you and others new to the code


--
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
Strumelia
Strumelia
@strumelia
11 years ago
3,603 posts
Just to be clear- you said "at the very bottom". I was following your first set of instructions, had not seen your next post yet. Only it wasn't quite at the 'very bottom' and you didn't mention there were more than one. If you had said 'last one on the page' I would have been more sure. But hey I took a chance (knowing how I could undo it) and happily it worked well.

Well seems logical to you maybe but the coding is all still confusing to me. But I understand a bit more each week so that's good. And thanks much for the code- it worked nicely for me.



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
hey when i 1st looked at the code i was like oh my god someone help me im so lost
but every lil peice i figured out... wich took wayyyy longer then it should set off a lightbulb that lead to another peice of the puzzle

im still lost alot of the time
but already my sites extremely customized i still got a lil more to do but by the time im done my skin will have twice as many templates as the "clean' skin

im amazed how much ive learned already but ..i am still completely clueless about some parts and definateky not ready yet for php editing
but once im done this part i hope to dive into that

damn i got so lil done today i gotta stop going to bed after everyone else wakes up


--
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

Tags