Jump to content
  • 0
usmiechnietymniszek

Jak to mogę dodać, do tej wtyczki?

Question

Witam.

Mam kolorowe nicki:

https://forum.ipsbeyond.pl/topic/51811-ips-marketplace-group-colors-on-user-links/

Wersja darmowa 4.3

Chciałbym dodać kolor nicku w tych dwóch miejscach, ponieważ chyba tego autor nie zakodował a ja całkowicie tego sam nie zrobię bo nie umiem.

 

qweqwe.jpg.2e03360cb5657249bd08d0347ed9851a.jpg

Kolor nicku admina mam czerwony, moderatora zielony, usera mam fioletowy a gościa żółty. Najlepiej aby pobierało kolor z grup, tak jak wszędzie oprócz tutaj. Ktoś poratuje ?? Pracuję na wersji 4.3.6

Edited by usmiechnietymniszek

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

W szablonie -> core -> front -> profile edytuj profileHeader. znajdź

					<h1 class='ipsType_reset ipsPageHead_barText'>
						{$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></span>
							</a>
						{{endif}}
					</h1>

zamień:

{$member->name}

na:

{{if $member->group['prefix']}}{$member->group['prefix']|raw}{{endif}}{$member->name}{{if $member->group['suffix']}}{$member->group['suffix']|raw}{{endif}}

natomiast to na górze to musisz w core -> front -> global otworzyć userBar i znaleźć:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{member="name"} <i class='fa fa-caret-down'></i>

zamień na:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

powinno zadziałać ale nie testowałem

Share this post


Link to post
Share on other sites
  • 0

@Spanner

 

1 godzinę temu, Spanner napisał:

W szablonie -> core -> front -> profile edytuj profileHeader. znajdź


					<h1 class='ipsType_reset ipsPageHead_barText'>
						{$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></span>
							</a>
						{{endif}}
					</h1>

zamień:


{$member->name}

na:


{{if $member->group['prefix']}}{$member->group['prefix']|raw}{{endif}}{$member->name}{{if $member->group['suffix']}}{$member->group['suffix']|raw}{{endif}}

 natomiast to na górze to musisz w core -> front -> global otworzyć userBar i znaleźć:


{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{member="name"} <i class='fa fa-caret-down'></i>

 zamień na:


{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>


powinno zadziałać ale nie testowałem

Nick w profilu działa w 100%. Dziękuję 🙂 !!!

Natomiast z tym drugim jest problem.

W tym userBar mialem zamienić to:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{member="name"} <i class='fa fa-caret-down'></i>

Na to:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

Zamieniłem i zapisałem i nie pykło. 😕 Wyczyściłem nawet cache, a efekt taki:

sss.thumb.jpg.50dfa4ba1f0542dd83598010a17ef801.jpg

Plik wygląda tak:

{{if \IPS\Member::loggedIn()->member_id }}
	<ul id='elUserNav' class='ipsList_inline cSignedIn' data-controller='core.front.core.userbar{{if member.member_id && settings.auto_polling_enabled}},core.front.core.instantNotifications{{endif}}'>
		<li class='userLink-avatar'>{template="userPhoto" group="global" app="core" params="\IPS\Member::loggedIn(), 'tiny'"}</li>
		<li id='cUserLink'>
			<a href='#elUserLink_menu' id='elUserLink' data-ipsMenu>
              	{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>
			</a>
			<ul id='elUserLink_menu' class='ipsMenu ipsMenu_normal ipsHide'>
				<li class='ipsMenu_title'>{lang="menu_content"}</li>
				{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) )}}
					<li class='ipsMenu_item' data-menuItem='profile'><a href='{member="url()"}' title='{lang="view_my_profile"}'>{lang="menu_profile"}</a></li>
				{{endif}}
				{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) ) and \IPS\Member::loggedIn()->members_disable_pm AND \IPS\Member::loggedIn()->members_disable_pm != 2}}
					<li class='ipsMenu_item' data-menuItem='messages'><a href='{url="app=core&module=messaging&controller=messenger&do=enableMessenger" seoTemplate="messaging" csrf="true"}' title='{lang="go_to_messenger"}' data-confirm data-confirmMessage='{lang="messenger_disabled_msg"}'>{lang="menu_messages"}</a></li>
				{{endif}}
				{{if \IPS\Member::loggedIn()->group['g_attach_max'] != 0}}
					<li class='ipsMenu_item' data-menuItem='attachments'><a href='{url="app=core&module=system&controller=attachments" seoTemplate="attachments"}'>{lang="my_attachments"}</a></li>
				{{endif}}
				<li class='ipsMenu_title'>{lang="menu_settings_title"}</li>
				{{if \IPS\core\Promote::promoteServices()}}
					<li class='ipsMenu_item' data-menuItem='promote'><a href='{url="app=core&module=promote&controller=promote&do=view" seoTemplate="promote_manage"}'>{lang="promote_manage_link"}</a></li>
				{{endif}}
				{{if \IPS\Application::appIsEnabled('nexus') and settings.nexus_subs_enabled}}
            		<li class='ipsMenu_item' data-menuItem='subscriptions'><a href='{url="app=nexus&module=subscriptions&controller=subscriptions" seoTemplate="nexus_subscriptions"}'>{lang="nexus_manage_subscriptions"}</a></li>
            	{{endif}}
				<li class='ipsMenu_item' data-menuItem='manageFollowed'><a href='{url="app=core&module=system&controller=followed" seoTemplate="followed_content"}'>{lang="menu_followed_content"}</a></li>
				<li class='ipsMenu_item' id='elAccountSettingsLink' data-menuItem='settings'><a href='{url="app=core&module=system&controller=settings" seoTemplate="settings"}' title='{lang="edit_account_settings"}'>{lang="menu_settings"}</a></li>
				{{if settings.ignore_system_on}}
            	    <li class='ipsMenu_item' data-menuItem='ignoredUsers'><a href='{url="app=core&module=system&controller=ignore" seoTemplate="ignore"}'>{lang="menu_manage_ignore"}</a></li>
            	{{endif}}
				<li class='ipsMenu_sep'><hr></li>
				{{if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) ) AND \IPS\Member::loggedIn()->modPermission() ) or \IPS\Member::loggedIn()->isAdmin()}}
					{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) ) AND \IPS\Member::loggedIn()->modPermission()}}
						<li class='ipsMenu_item' data-menuItem='modcp'><a href='{url="app=core&module=modcp" seoTemplate="modcp"}'>{lang="menu_modcp"}</a></li>
					{{endif}}
					{{if \IPS\Member::loggedIn()->isAdmin() AND \IPS\SHOW_ACP_LINK }}
						<li class='ipsMenu_item' data-menuItem='admincp'><a href='{url="" base="admin"}' target='_blank' rel="noopener">{lang="menu_admincp"}</a></li>
					{{endif}}
					<li class='ipsMenu_sep'><hr></li>
				{{endif}}
				<li class='ipsMenu_item' data-menuItem='signout'>
					<a href='{url="app=core&module=system&controller=login&do=logout" csrf="true" seoTemplate="logout"}'>
						{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="switch_to_account" sprintf="$_SESSION['logged_in_from']['name']"}{{else}}{lang="sign_out"}{{endif}}
					</a>
				</li>
			</ul>
		</li>
		<li class='elUserNav_sep'></li>
		{{if !\IPS\Member::loggedIn()->restrict_post and count( \IPS\Member::loggedIn()->createMenu() )}}
			<li id='cCreate'>
				<a href='#elCreateNew_menu' id='elCreateNew' data-ipsTooltip data-ipsMenu title='{lang="create_menu_title"}'>
					<strong><i class='fa fa-plus'></i> &nbsp;{lang="create_menu"}</strong> <i class='fa fa-caret-down'></i>
				</a>
				<div id='elCreateNew_menu' class='ipsMenu ipsMenu_auto ipsHide'>
					<ul>
						{{foreach \IPS\Member::loggedIn()->createMenu() as $k => $url}}
							<li class="ipsMenu_item">
								<a href="{$url['link']}"
								{{if isset( $url['extraData'] )}}
									{{foreach $url['extraData'] as $data => $v}}
										{$data}="{$v}"
									{{endforeach}}
								{{endif}}
								{{if isset($url['title']) AND $url['title']}} data-ipsDialog-title='{lang="$url['title']"}'{{endif}}
								{{if isset($url['flashMessage'])}} data-ipsdialog-flashmessage="{lang="$url['flashMessage']"}"{{endif}}
								>{lang="$k"}</a>
							</li>
						{{endforeach}}
					</ul>
				</div>
			</li>
			<li class='elUserNav_sep'></li>
		{{endif}}
		<li class='cNotifications cUserNav_icon'>
			<a href='{url="app=core&module=system&controller=notifications" seoTemplate="notifications"}' id='elFullNotifications' data-ipsTooltip title='{lang="userbar_notifications" escape="true"}' data-ipsMenu data-ipsMenu-closeOnClick='false'>
				<i class='fa fa-bell'></i> <span class='ipsNotificationCount {{if !member.notification_cnt}}ipsHide{{endif}}' data-notificationType='notify' data-currentCount='{member="notification_cnt"}'>{member="notification_cnt"}</span>
			</a>
			<div id='elFullNotifications_menu' class='ipsMenu ipsMenu_wide ipsHide'>
				<div class='ipsMenu_headerBar'>
					<a href="{url="app=core&module=system&controller=notifications&do=options" seoTemplate="notifications_options"}" class="ipsType_light ipsPos_right"><i class="fa fa-cog"></i> {lang="notification_options"}</a>
					<h4 class='ipsType_sectionHead'>{lang="notifications"}</h4>
				</div>
				<div class='ipsMenu_innerContent'>
					<ol class='ipsDataList ipsDataList_readStatus' data-role='notifyList' data-ipsKeyNav data-ipsKeyNav-observe='return' id='elNotifyContent'></ol>
				</div>
				<div class='ipsMenu_footerBar ipsType_center'>
					<a href='{url="app=core&module=system&controller=notifications" seoTemplate="notifications"}'><i class='fa fa-bars'></i> {lang="see_all_notifications"}</a>
				</div>
			</div>
		</li>
		{{if !\IPS\Member::loggedIn()->members_disable_pm and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) )}}
			<li class='cInbox cUserNav_icon'>
				<a href='{url="app=core&module=messaging&controller=messenger" seoTemplate="messaging"}' id='elFullInbox' data-ipsTooltip title='{lang="userbar_messages" escape="true"}' data-ipsMenu data-ipsMenu-closeOnClick='false'>
					<i class='fa fa-envelope'></i> <span class='ipsNotificationCount {{if !\IPS\Member::loggedIn()->msg_count_new}}ipsHide{{endif}}' data-notificationType='inbox' data-currentCount='{member="msg_count_new"}'>{member="msg_count_new"}</span>
				</a>
				<div id='elFullInbox_menu' class='ipsMenu ipsMenu_wide ipsHide' data-controller='core.front.core.messengerMenu'>
					<div class='ipsMenu_headerBar'>
						<a href='{url="app=core&module=messaging&controller=messenger&do=compose" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-destructOnClose data-ipsDialog-flashMessage="{lang="message_sent"}" id='elMessengerPopup_compose' class='ipsPos_right ipsButton ipsButton_primary ipsButton_verySmall'>{lang="compose_new"}</a>
						<h4 class='ipsType_sectionHead'>{lang="userbar_messages"}</h4>
					</div>
					<div class='ipsMenu_innerContent'><ol class='ipsDataList' data-role='inboxList' data-ipsKeyNav data-ipsKeyNav-observe='return' id='elInboxContent'></ol></div>
					<div class='ipsMenu_footerBar ipsType_center'>
						<a href='{url="app=core&module=messaging&controller=messenger" seoTemplate="messaging"}'><i class='fa fa-bars'></i> {lang="go_to_inbox"}</a>
					</div>
				</div>
			</li>
		{{endif}}
		{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) ) and \IPS\Member::loggedIn()->modPermission('can_view_reports')}}
			<li class='cReports cUserNav_icon'>
				<a href='{url="app=core&module=modcp&controller=modcp&tab=reports" seoTemplate="modcp_reports"}' id='elFullReports' data-ipsTooltip title='{lang="userbar_reports" escape="true"}' data-ipsMenu data-ipsMenu-closeOnClick='false'>
					<i class='fa fa-warning'></i> {{if \IPS\Member::loggedIn()->reportCount()}}<span class='ipsNotificationCount' data-notificationType='reports'>{member="reportCount()"}</span>{{endif}}
				</a>
				<div id='elFullReports_menu' class='ipsMenu ipsMenu_wide ipsHide'>
					<div class='ipsMenu_headerBar'><h4 class='ipsType_sectionHead'>{lang="report_center_header"}</h4></div>
					<div class='ipsMenu_innerContent' data-role="reportsList"></div>
					<div class='ipsMenu_footerBar ipsType_center'>
						<a href='{url="app=core&module=modcp&controller=modcp&tab=reports" seoTemplate="modcp_reports"}'><i class='fa fa-bars'></i> {lang="report_center_link"}</a>
					</div>
				</div>
			</li>
		{{endif}}
		{{if theme.focus_picker}}<li class='cUserNav_icon ipsfocus-toggleBgPicker'><a href='#' data-ipsTooltip><i class='fa fa-picture-o'></i></a></li>{{endif}}
	</ul>
{{else}}
	<ul id='elUserNav' class='ipsList_inline cSignedOut'>
		{template="siteSocialProfiles" if="theme.social_links != 'footer'" app="core" group="global" location="front"}
		<li id='elSignInLink'>
			<a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' data-ipsMenu-closeOnClick="false" data-ipsMenu id='elUserSignIn'>
				{lang="sign_in"} &nbsp;<i class='fa fa-caret-down'></i>
			</a>
			{template="loginPopup" app="core" group="global" params="new \IPS\Login( \IPS\Http\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ) )"}
		</li>
		{{if \IPS\Login::registrationType() != 'disabled'}}
			<li>
				{{if \IPS\Login::registrationType() == 'redirect'}}
					<a href='{expression="\IPS\Settings::i()->allow_reg_target"}' target="_blank" rel="noopener">{lang="sign_up"}</a>
				{{else}}
					<a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' {{if \IPS\Login::registrationType() == 'normal'}}data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="sign_up"}'{{endif}} id='elRegisterButton'>{lang="sign_up"}</a>
				{{endif}}
			</li>
		{{endif}}
		{{if theme.focus_picker}}<li class='cUserNav_icon ipsfocus-toggleBgPicker'><a href='#' data-ipsTooltip><i class='fa fa-picture-o'></i></a></li>{{endif}}
	</ul>
{{endif}}

 

Edited by usmiechnietymniszek

Share this post


Link to post
Share on other sites
  • 0

to zamień to:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

na:

{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}
{{$_member = \IPS\Member::loggedIn();}}

{{if $_member->group['prefix']}}{$_member->group['prefix']|raw}{{endif}}{$_member->name}{{if $_member->group['suffix']}}{$_member->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

i będzie

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
1 godzinę temu, Spanner napisał:

to zamień to:


{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{{if \IPS\Member::loggedIn()->group['prefix']}}{\IPS\Member::loggedIn()->group['prefix']|raw}{{endif}}{\IPS\Member::loggedIn()->name}{{if \IPS\Member::loggedIn()->group['suffix']}}{\IPS\Member::loggedIn()->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

 na:


{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}
{{$_member = \IPS\Member::loggedIn();}}

{{if $_member->group['prefix']}}{$_member->group['prefix']|raw}{{endif}}{$_member->name}{{if $_member->group['suffix']}}{$_member->group['suffix']|raw}{{endif}} <i class='fa fa-caret-down'></i>

 i będzie

Działa na każdej randze, dziękuję za pomoc 😛 Temat można zamknąć 🙂

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

W celu świadczenie usług przez nasz Serwis na najwyższym poziomie, w ramach Serwisu wykorzystujemy pliki Cookies (tzw. ciasteczka). Korzystając ze stron Serwisu IPSBEYOND.PL bez zmiany ustawień przeglądarki będą one zapisane w pamięci urządzenia. Jeżeli nie dokonacie Państwo zmiany ustawień przeglądarki internetowej to wyrażacie zgodę na zapisywanie plików Cookies.