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

Всем привет!
Интересует один важный момент, недавно заметил на некоторых форумах IPS4 полезную вещь, когда выбираешь RU язык на форуме, у тебя пропадает часть Английских категорий и остаются только RU, а если выбираешь English, тогда исчезают РУ и остаются только Английские категории, где общаются только на английском, как будто 2 разных форума и базы, но домен тот же и даже ссылка полностью такая же, вопрос, как это возможно сделать? 

Подпишусь.  Сам задумываюсь о двуязычном, продумывал этот момент - можно в шаблоне прописать условие по языку пользователя, но, боюсь, как бы индексация не пострадала будущая.

  • Author
9 часов назад, Respected сказал:

if \IPS\Member::loggedIn()->language()->id == 1 

Показываем такие категории

else 

Другие

 

Это в шаблоне? 

Тоже задумывался на днях о том, чтоб сделать такое.
Если кто реализовал, покажите пример 🙄

Но надо же ещё чтоб и процесс регистрации на английском предлагало, англоговорящим

  • Author
16 часов назад, bsnet сказал:

Тоже задумывался на днях о том, чтоб сделать такое.
Если кто реализовал, покажите пример 🙄

Но надо же ещё чтоб и процесс регистрации на английском предлагало, англоговорящим

https://invisioncommunity.com/files/file/7766-nb40-show-forums-per-language/
Нашёл только это... ( 

Самый простой способ. Шаблон forum > front > index 

найти:

<li data-categoryID='{$category->_id}' class='cForumRow ipsBox ipsSpacer_bottom'>
				<h2 class="ipsType_sectionTitle ipsType_reset cForumTitle">
					<a href='#' class='ipsPos_right ipsJS_show ipsType_noUnderline cForumToggle' data-action='toggleCategory' data-ipsTooltip title='{lang="toggle_this_category"}'></a>
					<a href='{$category->url()}'>{$category->_title}</a>
				</h2>
				{{if \IPS\forums\Forum::getMemberView() === 'grid'}}
					<div class='ipsAreaBackground ipsPad' data-role="forums">
						<div class='ipsGrid ipsGrid_collapsePhone' data-ipsGrid data-ipsGrid-minItemSize='250' data-ipsGrid-maxItemSize='500' data-ipsGrid-equalHeights='row'>
							{{foreach $category->children() as $forum}}
								{template="forumGridItem" group="index" app="forums" params="$forum"}
							{{endforeach}}
						</div>
					</div>
				{{else}}
					<ol class="ipsDataList ipsDataList_large ipsDataList_zebra ipsAreaBackground_reset" data-role="forums">
						{{foreach $category->children() as $forum}}
							{template="forumRow" group="index" app="forums" params="$forum"}
						{{endforeach}}
					</ol>
				{{endif}}
			</li>

Заменить на:

{{if \IPS\Member::loggedIn()->language()->id == 1 AND $category->_id == 1}}
                <li data-categoryID='{$category->_id}' class='cForumRow ipsBox ipsSpacer_bottom'>
                    <h2 class="ipsType_sectionTitle ipsType_reset cForumTitle">
                        <a href='#' class='ipsPos_right ipsJS_show ipsType_noUnderline cForumToggle' data-action='toggleCategory' data-ipsTooltip title='{lang="toggle_this_category"}'></a>
                        <a href='{$category->url()}'>{$category->_title}</a>
                    </h2>
                    {{if \IPS\forums\Forum::getMemberView() === 'grid'}}
                        <div class='ipsAreaBackground ipsPad' data-role="forums">
                            <div class='ipsGrid ipsGrid_collapsePhone' data-ipsGrid data-ipsGrid-minItemSize='250' data-ipsGrid-maxItemSize='500' data-ipsGrid-equalHeights='row'>
                                {{foreach $category->children() as $forum}}
                                    {template="forumGridItem" group="index" app="forums" params="$forum"}
                                {{endforeach}}
                            </div>
                        </div>
                    {{else}}
                        <ol class="ipsDataList ipsDataList_large ipsDataList_zebra ipsAreaBackground_reset" data-role="forums">
                            {{foreach $category->children() as $forum}}
                                {template="forumRow" group="index" app="forums" params="$forum"}
                            {{endforeach}}
                        </ol>
                    {{endif}}
                </li>
                {{elseif \IPS\Member::loggedIn()->language()->id == 2 AND $category->_id == 4}}
                <li data-categoryID='{$category->_id}' class='cForumRow ipsBox ipsSpacer_bottom'>
                    <h2 class="ipsType_sectionTitle ipsType_reset cForumTitle">
                        <a href='#' class='ipsPos_right ipsJS_show ipsType_noUnderline cForumToggle' data-action='toggleCategory' data-ipsTooltip title='{lang="toggle_this_category"}'></a>
                        <a href='{$category->url()}'>{$category->_title}</a>
                    </h2>
                    {{if \IPS\forums\Forum::getMemberView() === 'grid'}}
                        <div class='ipsAreaBackground ipsPad' data-role="forums">
                            <div class='ipsGrid ipsGrid_collapsePhone' data-ipsGrid data-ipsGrid-minItemSize='250' data-ipsGrid-maxItemSize='500' data-ipsGrid-equalHeights='row'>
                                {{foreach $category->children() as $forum}}
                                    {template="forumGridItem" group="index" app="forums" params="$forum"}
                                {{endforeach}}
                            </div>
                        </div>
                    {{else}}
                        <ol class="ipsDataList ipsDataList_large ipsDataList_zebra ipsAreaBackground_reset" data-role="forums">
                            {{foreach $category->children() as $forum}}
                                {template="forumRow" group="index" app="forums" params="$forum"}
                            {{endforeach}}
                        </ol>
                    {{endif}}
                </li>
                {{endif}}

Соответственно \IPS\Member::loggedIn()->language()->id и $category_id указать свои.

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.