Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Как изменить местоположение счётчика уведомлений и личных сообщений вверху

Featured Replies

Posted

Собственно хотелось бы изменить местоположение счётчика уведомлений и личных сообщений вверху.

Какая часть кода (и где её искать) отвечает за данную функцию?

пробовал на примере мафии выяснить - не вышло, скорее всего не там ищу.

 

скриншот прилагаю.

 

post-8225-0-92945400-1366883337.jpg

Насколько я понял за иконку сообщений в globalTemplate отвечают эти строчки:

									<if test="messengerlink:|:$this->memberData['g_use_pm'] AND $this->memberData['members_disable_pm'] == 0">
										<li><a data-clicklaunch="getInboxList" id='inbox_link' href='{parse url="app=members&amp;module=messaging" base="public"}' title='{$this->lang->words['your_messenger']}'><if test="notifications:|:$this->memberData['msg_count_new']"><span class='ipsHasNotifications'>{$this->memberData['msg_count_new']}</span></if>&nbsp;</a></li>
									</if>

  • Author

Насколько я понял за иконку сообщений в globalTemplate отвечают эти строчки:



									<if test="messengerlink:|:$this->memberData['g_use_pm'] AND $this->memberData['members_disable_pm'] == 0">
										<li><a data-clicklaunch="getInboxList" id='inbox_link' href='{parse url="app=members&amp;module=messaging" base="public"}' title='{$this->lang->words['your_messenger']}'><if test="notifications:|:$this->memberData['msg_count_new']"><span class='ipsHasNotifications'>{$this->memberData['msg_count_new']}</span></if>&nbsp;</a></li>
									</if>

 

они отвечают за порядок и местоположение иконки оповещений, стиль отображения всего этого находится по моему в ipb_styles.css , но где именно - я так и не понял.

В ipb_styles.css в этих строках всё настраивается:

/* AlertFlag */

.ipsHasNotifications {
	padding: 0px 4px;
	height: 12px;
	line-height: 12px;
	background: #cf2020;
	color: #fff !important;
	font-size: 9px;
	text-align: center;
	-webkit-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	position: absolute;
	top: 4px;
	left: 3px;
}

.ipsHasNotifications_blank { display: none; }
#chat-tab-count.ipsHasNotifications { left: auto; top: 0px; right: -1px; text-shadow: none !important; position: absolute; }

  • Author

В ipb_styles.css в этих строках всё настраивается:



/* AlertFlag */

.ipsHasNotifications {
	padding: 0px 4px;
	height: 12px;
	line-height: 12px;
	background: #cf2020;
	color: #fff !important;
	font-size: 9px;
	text-align: center;
	-webkit-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	position: absolute;
	top: 4px;
	left: 3px;
}

.ipsHasNotifications_blank { display: none; }
#chat-tab-count.ipsHasNotifications { left: auto; top: 0px; right: -1px; text-shadow: none !important; position: absolute; }

 

спасибо, в стандартном стиле действительно эти строчки, но в нестандартном те же самые строки, но изменяя их я не вижу визуального результата... есть ли способ посмотреть (opera dragonfly?) к чему обращается счётчик и как изменить местоположение в нестандартном стиле?

Какой стиль стоит у вас?



По идее он в любом стиле должен использоваться.
Местоположение изменяется двумя последними строчками:

.ipsHasNotifications {
	padding: 0px 4px;
	height: 12px;
	line-height: 12px;
	background: #cf2020;
	color: #fff !important;
	font-size: 9px;
	text-align: center;
	-webkit-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	box-shadow: 0px 2px 4px rgba(0,0,0,0.3), 0px 1px 0px rgba(255,255,255,0.1) inset;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	position: absolute;
	top: 4px;
	left: 20px;


:think:

  • Author

GavriK595, если использован другой способ отображения значков (как у мафии например) - то сколько не меняй параметры - результат не будет

 

нормальный globalTemplate



<li><a data-clicklaunch="getNotificationsList" id='' href="{parse url="app=core&amp;module=usercp&amp;area=notificationlog" base="public"}" title="{$this->lang->words['notifications_at_the_top']}">
<if test="notifications:|:$this->memberData['notification_cnt']">{$this->memberData['notification_cnt']}</if><i class="icon-ipsHasNotifications icon-large"></i>&nbsp;</a></li>

нестандартный



<li><a data-clicklaunch="getNotificationsList" id='notify_link' href="{parse url="app=core&amp;module=usercp&amp;area=notificationlog" base="public"}" title="{$this->lang->words['notifications_at_the_top']}">
<if test="notifications:|:$this->memberData['notification_cnt']"><span class='ipsHasNotifications'>{$this->memberData['notification_cnt']}</span></if>&nbsp;</a></li>

Edited by Lordbl4

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.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.