Posted 17 апреля, 20222 yr comment_180119 Здравствуйте еще раз форумчани , возник вопрос решил немного изменить данный шаблон(profileHeader) вроде все нормально но все равно где есть косяк и не могу понять где он ? Кто может глянуть и сказать где тут исправить нужно ) И как прописать статус под аватаркой оффлайн и онлайн через css ipsUserPhoto:after? Спойлер {{$coverPhoto = $member->coverPhoto();}} <header data-role="profileHeader"> <div class='ipsPageHead_special {{if $small === true}}cProfileHeaderMinimal{{endif}}' id='elProfileHeader' data-controller='core.global.core.coverPhoto' data-url="{$member->url()->csrf()}" data-coverOffset='{$coverPhoto->offset}'> {{if $coverPhoto->file}} <div class='ipsCoverPhoto_container'> {{if settings.lazy_load_enabled}} <img src='{expression="\IPS\Text\Parser::blankImage()"}' data-src='{$coverPhoto->file->url}' class='ipsCoverPhoto_photo' data-action="toggleCoverPhoto" alt=''> {{else}} <img src='{$coverPhoto->file->url}' class='ipsCoverPhoto_photo' data-action="toggleCoverPhoto" alt=''> {{endif}} </div> {{else}} <div class='ipsCoverPhoto_container'> <img src='{resource="pattern.png" app="core" location="global"}' class='ipsCoverPhoto_photo' data-action="toggleCoverPhoto" alt=''> </div> {{endif}} {{if \IPS\Member::loggedIn()->modPermission('can_modify_profiles') or ( \IPS\Member::loggedIn()->member_id == $member->member_id and $member->group['g_edit_profile'] )}} <ul class='ipsButton_split' id='elEditProfile' data-hideOnCoverEdit> <li> <a href='{url="app=core&module=members&controller=profile&do=edit&id={$member->member_id}" base="front" seoTemplate="edit_profile" seoTitle="$member->members_seo_name"}' class='ipsButton ipsButton_overlaid' data-ipsDialog data-ipsDialog-modal='true' data-ipsDialog-title='{lang="profile_edit"}'> <i class='fa fa-pencil'></i> <span class='ipsResponsive_hidePhone ipsResponsive_inline'> {lang="profile_edit"}</span> </a> </li> {{if $coverPhoto->editable}} <li> <a href='#elEditPhoto_menu' data-hideOnCoverEdit class='ipsButton ipsButton_overlaid' data-ipsMenu id='elEditPhoto' data-role='coverPhotoOptions'> <i class='fa fa-picture-o'></i> <span class='ipsResponsive_hidePhone ipsResponsive_inline'> {lang="profile_edit_cover_photo_tab"} <i class='fa fa-caret-down'></i></span> </a> <ul class='ipsMenu ipsMenu_auto ipsHide' id='elEditPhoto_menu'> {{if $coverPhoto->file}} <li class='ipsMenu_item' data-role="photoEditOption"> <a href='{$member->url()->setQueryString( 'do', 'coverPhotoRemove' )->csrf()}' data-action='removeCoverPhoto'>{lang="cover_photo_remove"}</a> </li> <li class='ipsMenu_item ipsHide' data-role="photoEditOption"> <a href='#' data-action='positionCoverPhoto'>{lang="cover_photo_reposition"}</a> </li> {{endif}} <li class='ipsMenu_item'> <a href='{$member->url()->setQueryString( 'do', 'coverPhotoUpload' )}' data-ipsDialog data-ipsDialog-title="{lang="cover_photo_add"}">{lang="cover_photo_add"}</a> </li> </ul> </li> {{endif}} </ul> {{endif}} <div class='ipsColumn ipsColumn_fluid'> <div id="elProfileInfos"> <h2 class="nickname"> {$member->name} {{if \IPS\Member::loggedIn()->group['g_view_displaynamehistory'] AND $member->hasNameChanges()}} <a href='{$member->url()->setQueryString( 'do', 'namehistory' )}' class='cProfileHeader_history ipsType_large ipsPos_right' title='{lang="membername_history"}' data-ipsTooltip data-ipsDialog data-ipsDialog-modal='true' data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="membername_history"}'> <i class='fa fa-history'></i> </a> {{endif}} {{if \IPS\Member::loggedIn()->member_id AND \IPS\Member::loggedIn()->member_id === $member->member_id AND $member->isOnlineAnonymously()}} <span class='cProfileHeader_history ipsType_large ipsPos_right' title='{lang="member_is_currently_anon"}' data-ipsTooltip> <i class='fa fa-eye-slash'></i> </span> {{endif}} </h2> <p class="rang">{expression="\IPS\Member\Group::load( $member->member_group_id )->formattedName" raw="true"}</p> <div class="avatar online"> <div class="avatar_content"> <span class="ipsUserPhoto"> {{if $member->pp_main_photo and ( mb_substr( $member->pp_photo_type, 0, 5 ) === 'sync-' or $member->pp_photo_type === 'custom' )}} <a href="{file="$member->pp_main_photo" extension="core_Profile"}" data-ipsLightbox class='ipsUserPhoto ipsUserPhoto_xlarge'> <img src='{$member->photo}' alt=''> </a> {{else}} <span class='ipsUserPhoto ipsUserPhoto_xlarge'> <img src='{$member->photo}' alt=''> </span> {{endif}} {{if ( \IPS\Member::loggedIn()->modPermission('can_modify_profiles') or ( \IPS\Member::loggedIn()->member_id == $member->member_id and $member->group['g_edit_profile'] ) ) AND explode( ':', $member->group['g_photo_max_vars'] )[0]}} <a href='{url="app=core&module=members&controller=profile&do=editPhoto&id={$member->member_id}" base="front" seoTemplate="edit_profile_photo" seoTitle="$member->members_seo_name"}' class='ipsButton ipsButton_verySmall ipsButton_light ipsButton_narrow' data-action='editPhoto' data-ipsDialog data-ipsDialog-forceReload='true' data-ipsDialog-modal='true' data-ipsDialog-title='{lang="profile_edit_photo_tab"}' title='{lang="profile_edit_photo_tab"}' data-ipsTooltip><i class='fa fa-photo'></i></a> {{endif}} </div> </span> </div> {{if \IPS\Member::loggedIn()->member_id != $member->member_id}} <ul class='ipsList_inline ipsPad ipsResponsive_hidePhone ipsResponsive_block ipsPos_left profileUserFollowAndMess'> {{if \IPS\Member::loggedIn()->member_id != $member->member_id and ( !$member->members_bitoptions['pp_setting_moderate_followers'] or \IPS\Member::loggedIn()->following( 'core', 'member', $member->member_id ) )}} <li>{template="memberFollow" app="core" group="profile" params="'core', 'member', $member->member_id, $member->followersCount()"}</li> {{endif}} {{if \IPS\Member::loggedIn()->member_id && !$member->members_disable_pm and !\IPS\Member::loggedIn()->members_disable_pm and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) )}} <li><a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$member->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" class='ipsButton ipsButton_primary'><i class='fa fa-envelope'></i> <span class='ipsResponsive_showDesktop ipsResponsive_inline'> {lang="message_send"}</span></a></li> {{endif}} </ul> {{endif}} </div> </div> </div> <div class='ipsGrid ipsAreaBackground ipsPad ipsResponsive_showPhone ipsResponsive_block'> {{$span = 1;}} {{if \IPS\Member::loggedIn()->member_id && \IPS\Member::loggedIn()->member_id != $member->member_id and !$member->members_bitoptions['pp_setting_moderate_followers']}} {{$span++;}} {{endif}} {{if \IPS\Member::loggedIn()->member_id != $member->member_id && \IPS\Member::loggedIn()->member_id && !$member->members_disable_pm and !\IPS\Member::loggedIn()->members_disable_pm}} {{$span++;}} {{endif}} {{if \IPS\Member::loggedIn()->member_id && \IPS\Member::loggedIn()->member_id != $member->member_id and !$member->members_bitoptions['pp_setting_moderate_followers']}} <div class='ipsGrid_span{{if $span == 1}}12{{elseif $span == 2}}6{{else}}4{{endif}}'> {template="memberFollow" app="core" group="profile" params="'core', 'member', $member->member_id, $member->followersCount()"} </div> {{endif}} {{if \IPS\Member::loggedIn()->member_id != $member->member_id && \IPS\Member::loggedIn()->member_id && !$member->members_disable_pm and !\IPS\Member::loggedIn()->members_disable_pm}} <a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$member->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" data-ipsDialog-forceReload class='ipsGrid_span{{if $span == 1}}12{{elseif $span == 2}}6{{else}}4{{endif}} ipsButton ipsButton_alternate ipsButton_small'><i class=' fa fa-envelope'></i> <i class='fa fa-caret-right'></i></a> {{endif}} <div data-role='switchView' class='ipsGrid_span{{if $span == 1}}12{{elseif $span == 2}}6{{else}}4{{endif}}'> <div data-action="goToProfile" data-type='phone' class='{{if $small != true}}ipsHide{{endif}}'> <a href='{$member->url()}' class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth' title="{lang="members_profile" sprintf="$member->name"}"><i class='fa fa-user'></i></a> </div> <div data-action="browseContent" data-type='phone' class='{{if $small == true}}ipsHide{{endif}}'> <a href="{url="app=core&module=members&controller=profile&do=content&id={$member->member_id}" base="front" seoTemplate="profile_content" seoTitle="$member->members_seo_name"}" class='ipsButton ipsButton_alternate ipsButton_small ipsButton_fullWidth' title="{lang="members_content" sprintf="$member->name"}"><i class='fa fa-newspaper-o'></i></a> </div> </div> </div> <div id='elProfileStats' class='ipsClearfix'> <div data-role='switchView' class='ipsResponsive_hidePhone ipsResponsive_block'> <a href='{$member->url()}' class='ipsButton ipsButton_veryLight ipsButton_medium ipsPos_right {{if $small != true}}ipsHide{{endif}}' data-action="goToProfile" data-type='full' title="{lang="members_profile" sprintf="$member->name"}"><i class='fa fa-user'></i> <span class='ipsResponsive_showDesktop ipsResponsive_inline'> {lang="profile_view_profile"}</span></a> <a href="{url="app=core&module=members&controller=profile&do=content&id={$member->member_id}" base="front" seoTemplate="profile_content" seoTitle="$member->members_seo_name"}" class='ipsButton ipsButton_light ipsButton_medium ipsPos_right {{if $small == true}}ipsHide{{endif}}' data-action="browseContent" data-type='full' title="{lang="members_content" sprintf="$member->name"}"><i class='fa fa-newspaper-o'></i> <span class='ipsResponsive_showDesktop ipsResponsive_inline'> {{if member.member_id === $member->member_id}}{lang="profile_browse_my_content"}{{else}}{lang="profile_browse_content"}{{endif}}</span></a> </div> <ul class='ipsList_inline ipsPos_left'> <li> <h4 class='ipsType_minorHeading'>{lang="members_member_posts"}</h4> {number="$member->member_posts"} </li> <li> <h4 class='ipsType_minorHeading'>{lang="joined"}</h4> {datetime="$member->joined"} </li> {{if ( !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() )}} <li> <h4 class='ipsType_minorHeading'>{lang="members_last_visit"}</h4> <span> {{if ( $member->isOnline() AND !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() )}} <i class="fa fa-circle ipsOnlineStatus_online" data-ipsTooltip title='{{if $member->isOnlineAnonymously()}}{lang="online_now_anon" sprintf="$member->name"}{{elseif $member->isOnline()}}{lang="online_now" sprintf="$member->name"}{{endif}}'></i> {{endif}} {{if $member->last_activity}}{datetime="$member->last_activity"}{{else}}{lang="never"}{{endif}} </span> </li> {{endif}} {{if settings.reputation_leaderboard_on and settings.reputation_show_days_won_trophy and $member->getReputationDaysWonCount()}} <li> <h4 class='ipsType_minorHeading'>{lang="members_days_won_count"}</h4> <span data-ipsTooltip title='{lang="members_days_won_count_desc" sprintf="$member->name"}'>{number="$member->getReputationDaysWonCount()"}</span> </li> {{endif}} </ul> </div> </header> Link to comment https://ipbmafia.ru/topic/24343-profileheader/ Share on other sites Больше вариантов
17 апреля, 20222 yr comment_180129 Didn't understand much on what you wanted. But I'm just gonna throw this tip here on how to change Profile Header size. Search for #elProfileHeader, will be the very first in the begginning. Now, just change the height value to 550px. But if that's too much, I recommend 375 - 400px. (my personal taste xD) while we're here, change padding-top to 10px; and the profile picture will be at the top. Preview: https://i.imgur.com/02j6X6n.png https://i.imgur.com/guFjJ2n.png When done the changes you want, save it. Edited 17 апреля, 20222 yr by newload Link to comment https://ipbmafia.ru/topic/24343-profileheader/?&do=findComment&comment=180129 Share on other sites Больше вариантов
17 апреля, 20222 yr Author comment_180141 2 часа назад, newload сказал: Не очень понял, что ты хотел. Но я просто хочу бросить сюда этот совет о том, как изменить размер заголовка профиля. Поиск #elProfileHeader будет самым первым в начале. Теперь просто измените значение высоты на 550px. Но если это слишком много, я рекомендую 375-400px. (мой личный вкус xD) пока мы здесь, измените padding-top на 10px; и изображение профиля будет вверху. Предварительный просмотр: https://i.imgur.com/02j6X6n.png https://i.imgur.com/guFjJ2n.png Когда внесете нужные изменения, сохраните их. I threw off the code so that smart people check for errors in it and give the right advice) Link to comment https://ipbmafia.ru/topic/24343-profileheader/?&do=findComment&comment=180141 Share on other sites Больше вариантов
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.