Ahmad Diab 0 Posted February 23, 2020 Share Posted February 23, 2020 heya, i'm usually someone that likes to explore and find solutions by himself, i'm sick of this tho so i'd appreciate any help. the indicator show effect in "whos online" for example: http://prntscr.com/r6ifwa but on the profile page and hovercard it doesn't: http://prntscr.com/r6ig5r http://prntscr.com/r6igcp i tried to adapt and change the code, i've taken this code from postcontainer <li>{expression="\IPS\Member\Group::load( $comment->author()->member_group_id )->formattedName" raw="true"}</li> {{if \IPS\Member\Group::load( $comment->author()->member_group_id )->g_icon }} <li><img src='{file="$comment->author()->group['g_icon']" extension="core_Theme"}' alt='' class='cAuthorGroupIcon'></li> {{endif}} but i can't seem to add it to the hovercard nor profile code hovercard code: <h2 class="ipsType_reset ipsType_sectionHead ipsTruncate ipsTruncate_line ipsType_blendLinks"><span class='ipsPageHead_barText_small'><a href='{$member->url()}'>{$member->name}</a></span></h2 profile code: {{if !\IPS\Request::i()->isAjax()}} <!-- When altering this template be sure to also check for similar in the hovercard --> <div data-controller='core.front.profile.main' class='ipsBox'> {template="profileHeader" app="core" location="front" group="profile" params="$member, false"} <div data-role="profileContent"> {{endif}} <div class='ipsColumns ipsColumns_noSpacing ipsColumns_collapseTablet' data-controller="core.front.profile.body"> <div class='ipsColumn ipsColumn_fixed ipsColumn_veryWide ipsAreaBackground' id='elProfileInfoColumn'> <div class='ipsPad'> {{if \IPS\Application::appIsEnabled('nexus') and settings.nexus_subs_enabled and settings.nexus_subs_show_public}} {template="profileSubscription" app="nexus" location="front" group="subscription" params="$member"} {{endif}} {{if settings.reputation_enabled and settings.reputation_show_profile}} {{if settings.reputation_leaderboard_on and settings.reputation_show_days_won_trophy and $member->getReputationDaysWonCount() and $lastDayWon = $member->getReputationLastDayWon()}} {{$formattedDate = $lastDayWon['date']->dayAndMonth() . ( $lastDayWon['date']->format('Y') == \IPS\DateTime::ts( time() )->format('Y' ) ? '' : " " . $lastDayWon['date']->format('Y') );}} <div class='ipsLeaderboard_trophy_1 cProfileSidebarBlock ipsSpacer_bottom '> <div class="ipsGrid"> <div class="ipsGrid_span2 ipsType_center"> <span class='ipsLeaderboard_trophy ipsLeaderboard_trophy_1'> <i class="fa fa-trophy"></i> </span> </div> <div class="ipsGrid_span10"> <p class='ipsType_reset ipsType_medium'> <strong> <a class='ipsType_blendLinks' href="{url="app=core&module=discover&controller=popular&tab=leaderboard&custom_date_start={$lastDayWon['date']->getTimeStamp()}&custom_date_end={$lastDayWon['date']->getTimeStamp()}" seoTemplate="leaderboard_leaderboard"}"> {{if $member->member_id == \IPS\Member::loggedIn()->member_id}} {lang="profile_you_won" sprintf="$formattedDate"} {{else}} {lang="profile_member_won" sprintf="$member->name, $formattedDate"} {{endif}} </a> </strong> </p> <p class='ipsType_reset ipsType_small'>{{if $member->member_id == \IPS\Member::loggedIn()->member_id}}{lang="profile_you_congrats"}{{else}}{lang="profile_member_congrats" sprintf="$member->name"}{{endif}}</p> </div> </div> </div> {{endif}} <div class='cProfileSidebarBlock ipsBox ipsSpacer_bottom'> {{if member.group['gbw_view_reps']}} <a href="{url="app=core&module=members&controller=profile&id={$member->member_id}&do=reputation" seoTemplate="profile_reputation" seoTitle="$member->members_seo_name"}" data-action="repLog" title="{lang="members_reputation" sprintf="$member->name"}"> {{endif}} <div class='cProfileRepScore ipsPad_half {{if $member->pp_reputation_points > 1}}cProfileRepScore_positive{{elseif $member->pp_reputation_points < 0}}cProfileRepScore_negative{{else}}cProfileRepScore_neutral{{endif}}'> <h2 class='ipsType_minorHeading'>{lang="profile_reputation"}</h2> <span class='cProfileRepScore_points'>{number="$member->pp_reputation_points"}</span> {{if $member->reputation()}} <span class='cProfileRepScore_title'>{$member->reputation()}</span> {{endif}} {{if $member->reputationImage()}} <div class='ipsAreaBackground_reset ipsAreaBackground_rounded ipsPad_half ipsType_center'> <img src='{file="$member->reputationImage()" extension="core_Theme"}' alt=''> </div> {{endif}} </div> {{if member.group['gbw_view_reps']}} <p class='ipsType_reset ipsPad_half ipsType_right ipsType_light ipsType_small'> {lang="replog_show_activity"} <i class='fa fa-caret-right'></i> </p> </a> {{endif}} </div> {{endif}} {{if \IPS\Settings::i()->warn_on and !$member->inGroup( explode( ',', \IPS\Settings::i()->warn_protected ) ) and ( \IPS\Member::loggedIn()->modPermission('mod_see_warn') or ( \IPS\Settings::i()->warn_show_own and \IPS\Member::loggedIn()->member_id == $member->member_id ) )}} <div class='cProfileSidebarBlock ipsBox ipsSpacer_bottom'> <div id='elWarningInfo' class='ipsPad {{if $member->mod_posts || $member->restrict_post || $member->temp_ban}}ipsAreaBackground_negative{{endif}} ipsClearfix'> <i class='ipsPos_left {{if $member->warn_level > 0 || $member->mod_posts || $member->restrict_post || $member->temp_ban}}fa fa-exclamation-triangle{{else}}fa fa-circle-o ipsType_light{{endif}}'></i> <div> <h2 class='ipsType_sectionHead'>{lang="member_warn_level" pluralize="$member->warn_level"}</h2> <br> {{if !$member->mod_posts && !$member->restrict_post && !$member->temp_ban}} <span>{lang="no_restrictions_applied"}</span> <br> {{else}} <span>{lang="restrictions_applied"}</span> <ul class='ipsList_bullets ipsSpacer_top ipsSpacer_half'> {{if $member->mod_posts}} <li data-ipsTooltip title="{{if $member->mod_posts == -1}}{lang="moderation_modq_perm"}{{else}}{lang="moderation_modq_temp" sprintf="\IPS\DateTime::ts( $member->mod_posts )"}{{endif}}"> {lang="moderation_modq"} </li> {{endif}} {{if $member->restrict_post}} <li data-ipsTooltip title="{{if $member->restrict_post == -1}}{lang="moderation_nopost_perm"}{{else}}{lang="moderation_nopost_temp" sprintf="\IPS\DateTime::ts( $member->restrict_post )"}{{endif}}"> {lang="moderation_nopost"} </li> {{endif}} {{if $member->temp_ban}} <li data-ipsTooltip title="{{if $member->temp_ban == -1}}{lang="moderation_banned_perm"}{{else}}{lang="moderation_banned_temp" sprintf="\IPS\DateTime::ts( $member->temp_ban )"}{{endif}}"> {lang="moderation_banned"} </li> {{endif}} </ul> {{endif}} {{if ( member.canWarn( $member ) || ( member.modPermission('can_flag_as_spammer') and !$member->modPermission() and !$member->isAdmin() ) ) and $member->member_id != member.member_id }} <br> <ul class='{{if member.canWarn( $member ) && member.modPermission('can_flag_as_spammer') and $member->member_id != member.member_id and !$member->modPermission() and !$member->isAdmin()}} ipsButton_split {{else}} ipsList_inline {{endif}}'> {{if member.canWarn( $member )}} <li> <a href='{$addWarningUrl}' id='elWarnUserButton' data-ipsDialog data-ipsDialog-title="{lang="warn_member" sprintf="$member->name"}" class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="warn_member" sprintf="$member->name"}'>{lang="warn_user"}</a> </li> {{endif}} {{if member.modPermission('can_flag_as_spammer') and $member->member_id != member.member_id and !$member->modPermission() and !$member->isAdmin()}} <li> {{if $member->members_bitoptions['bw_is_spammer']}} <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=0" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="spam_unflag"}' data-confirm data-confirmSubMessage="{lang="spam_unflag_confirm"}">{lang="spam_unflag"}</a> {{else}} <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=1" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="spam_flag"}' data-confirm>{lang="spam_flag"}</a> {{endif}} </li> {{endif}} </ul> {{endif}} </div> </div> {{if \count( $member->warnings( 1 ) )}} <div data-role="recentWarnings" class=''> <ol class='ipsDataList'> {{foreach $member->warnings( 2 ) as $warning}} <li class="ipsDataItem" id='elWarningOverview_{$warning->id}'> <div class='ipsDataItem_icon ipsType_center'> <a href="{url="app=core&module=system&controller=warnings&do=view&id={$member->member_id}&w={$warning->id}" seoTemplate="warn_view" seoTitle="$member->members_seo_name"}" data-ipsDialog data-ipsDialog-size='narrow' class="ipsType_blendLinks" data-ipsTooltip title='{lang="wan_action_points" pluralize="$warning->points"}'> <span class="ipsPoints">{$warning->points}</span> </a> </div> <div class='ipsDataItem_main'> {{if $warning->canDelete()}} <a href="{$warning->url('delete')->csrf()}" title='{lang="revoke_this_warning"}' data-ipsTooltip data-action="revoke" class='ipsPos_right ipsButton ipsButton_small ipsButton_light ipsButton_narrow' data-ipsDialog data-ipsDialog-title='{lang="revoke_this_warning"}' data-ipsDialog-size='medium'><i class="fa fa-undo"></i></a> {{endif}} <a href="{url="app=core&module=system&controller=warnings&do=view&id={$member->member_id}&w={$warning->id}" seoTemplate="warn_view" seoTitle="$member->members_seo_name"}" data-ipsDialog data-ipsDialog-showFrom='#elWarningOverview_{$warning->id}' data-ipsDialog-size='narrow' class="ipsType_blendLinks" title=''> <h4 class="ipsType_reset ipsType_medium ipsType_unbold"> {{if \IPS\Settings::i()->warnings_acknowledge}} {{if $warning->acknowledged}} <strong class='ipsType_success' title='{lang="warning_acknowledged"}' data-ipsTooltip><i class='fa fa-check-circle'></i></strong> {{else}} <strong class='ipsType_light' title='{lang="warning_not_acknowledged"}' data-ipsTooltip><i class='fa fa-circle-o'></i></strong> {{endif}} {{endif}} {lang="core_warn_reason_{$warning->reason}"} </h4> <p class='ipsDataItem_meta ipsType_light'> {lang="byline" sprintf="\IPS\Member::load( $warning->moderator )->name"}{datetime="$warning->date"} </p> </a> </div> </li> {{endforeach}} </ol> <p class='ipsType_reset ipsType_center ipsType_small ipsPad_half'> <a href='{url="app=core&module=system&controller=warnings&id={$member->member_id}" seoTemplate="warn_list" seoTitle="$member->members_seo_name"}' class='ipsButton ipsButton_verySmall ipsButton_light ipsButton_fullWidth' title='{lang="see_all_warnings"}' data-ipsDialog data-ipsDialog-remoteVerify='false' data-ipsDialog-remoteSubmit='false' data-ipsDialog-title="{lang="members_warnings" sprintf="$member->name"}">{lang="see_all_c"}</a> </p> </div> {{endif}} </div> {{else}} {{if \IPS\Member::loggedIn()->modPermission('can_flag_as_spammer') and !$member->inGroup( explode( ',', \IPS\Settings::i()->warn_protected ) ) and \IPS\Member::loggedIn()->member_id != $member->member_id}} {{if $member->members_bitoptions['bw_is_spammer']}} <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=0" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' title='{lang="spam_unflag"}' data-confirm data-confirmSubMessage="{lang="spam_unflag_confirm"}">{lang="spam_unflag"}</a> {{else}} <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=1" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' title='{lang="spam_flag"}' data-confirm>{lang="spam_flag"}</a> {{endif}} {{endif}} {{endif}} {{if \count( $followers ) || \IPS\Member::loggedIn()->member_id === $member->member_id}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' id='elFollowers' data-feedID='member-{$member->member_id}' data-controller='core.front.profile.followers'> {template="followers" group="profile" app="core" params="$member, $followers"} </div> {{endif}} {{if $member->group['g_icon'] || $member->member_title || $member->rank['title'] || $member->rank['image'] || ( ( ( $member->isOnline() AND !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) ) AND $member->location ) || ( $member->birthday AND \IPS\Settings::i()->profile_birthday_type == 'public' or ( \IPS\Settings::i()->profile_birthday_type == 'private' and \IPS\Member::loggedIn()->member_id == $member->member_id ) )}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-location='defaultFields'> <h2 class='ipsWidget_title ipsType_reset'>{lang='profile_about' sprintf='$member->name'}</h2> <div class='ipsWidget_inner ipsPad'> {{if $member->group['g_icon'] }} <div class='ipsType_center ipsPad_half'><img src='{file="$member->group['g_icon']" extension="core_Theme"}' alt=''></div> {{endif}} <ul class='ipsDataList ipsDataList_reducedSpacing cProfileFields'> {{if ( ( $member->isOnline() AND !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) ) AND $member->location}} <li class="ipsDataItem"> <span class="ipsDataItem_generic ipsDataItem_size3 ipsType_break"><strong>{lang="online_users_location_lang"}</strong></span> <span class="ipsDataItem_main">{$member->location()|raw}</span> </li> {{endif}} {{if $member->member_title || $member->rank['title'] || $member->rank['image']}} <li class='ipsDataItem'> <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="profile_rank"}</strong></span> <div class='ipsDataItem_generic ipsType_break'> {{if $member->member_title}} {$member->member_title} <br> {{elseif $member->rank['title']}} {$member->rank['title']} <br> {{endif}} {$member->rank['image']|raw} </div> </li> {{endif}} {{if $member->birthday AND \IPS\Settings::i()->profile_birthday_type == 'public' or ( \IPS\Settings::i()->profile_birthday_type == 'private' and \IPS\Member::loggedIn()->member_id == $member->member_id )}} <li class='ipsDataItem'> <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="bday"}</strong></span> <span class='ipsDataItem_generic'>{$member->birthday}</span> </li> {{endif}} </ul> </div> </div> {{endif}} {{foreach $sidebarFields as $group => $fields}} {{if \count( $fields ) AND \count( array_filter( $fields, function( $fieldValue ){ return $fieldValue['value']; } ) )}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-location='customFields'> {{if $group != 'core_pfieldgroups_0'}} <h2 class='ipsWidget_title ipsType_reset'>{lang="$group"}</h2> {{endif}} <div class='ipsWidget_inner ipsPad'> <ul class='ipsDataList ipsDataList_reducedSpacing cProfileFields'> {{foreach $fields as $field => $value}} {{if $value['value'] !== ""}} <li class='ipsDataItem ipsType_break'> {{if $value['custom']}} {$value['value']|raw} {{else}} <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="$field"}</strong></span> <div class='ipsDataItem_generic'><div class='ipsType_break ipsContained'>{$value['value']|raw}</div></div> {{endif}} </li> {{endif}} {{endforeach}} </ul> </div> </div> {{endif}} {{endforeach}} {{if \IPS\Member::loggedIn()->modPermission('can_see_emails')}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom'> <h2 class='ipsWidget_title ipsType_reset'>{lang="profile_contact"}</h2> <div class='ipsWidget_inner ipsPad'> <ul class='ipsDataList ipsDataList_reducedSpacing'> <li class='ipsDataItem'> <span class='ipsDataItem_generic ipsDataItem_size3'><strong>{lang="profile_email"}</strong></span> <span class='ipsDataItem_generic'> <div class='ipsType_break ipsContained'><a href='mailto:{$member->email}' title='{lang="email_this_user"}'>{$member->email}</a></div> <span class='ipsType_light ipsType_small'>{lang="profile_email_addresses"}</span> </span> </li> </ul> </div> </div> {{endif}} {{if !empty( $visitors ) || \IPS\Member::loggedIn()->member_id == $member->member_id}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-controller='core.front.profile.toggleBlock'> {template="recentVisitorsBlock" group="profile" params="$member, $visitors"} </div> {{endif}} </div> </div> <section class='ipsColumn ipsColumn_fluid'> {$mainContent|raw} </section> </div> {{if !\IPS\Request::i()->isAjax()}} </div> </div> {{endif}} Link to comment Share on other sites More sharing options...
Jeffrey 366 Posted March 11, 2020 Share Posted March 11, 2020 Find the code for the name in both your profileHeader and hovercard. Use the expression: {expression="\IPS\Member\Group::load( $comment->author()->member_group_id )->formattedName" raw="true"} Support Team - September 9th, 2017 - June 8, 2018 Junior Moderator - December 14th 2018 - November 16th, 2019 Designer - November 16th, 2019 - June 5th, 2020 Moderator - June 5th, 2020 - August 28th, 2020 Link to comment Share on other sites More sharing options...
Ahmad Diab 0 Posted March 12, 2020 Author Share Posted March 12, 2020 On 3/11/2020 at 12:47 PM, Jeffrey said: Find the code for the name in both your profileHeader and hovercard. Use the expression: {expression="\IPS\Member\Group::load( $comment->author()->member_group_id )->formattedName" raw="true"} doesn't work, this is the current code: {expression="\IPS\Member\Group::load( $member->member_group_id-> )->formattedName" raw="true"} when i use the one you suggested it gives me this: http://prntscr.com/rfjm2f Link to comment Share on other sites More sharing options...
Isabel 44 Posted March 12, 2020 Share Posted March 12, 2020 It does not work on hovercard but for Profile Posts Comments Who's Online Members Link to comment Share on other sites More sharing options...
Recommended Posts