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.

Проблема с шаблоном из-за Members Shop

Featured Replies

Posted

Ребят, всем привет!

Может кто поможет. В общем у меня такая проблема, установил приложение Members Shop, а оно мне поломало мою систему кнопки в загрузках :) Короче, у меня кнопка скачать в загрузках "самописная", то есть у меня в каждой категории отображается свой текст на кнопке. А шоп мне везде поставил "Скачать файл" по стандарту. Покопался и нашел в нём шаблон кнопки Download. Попробовал совместить всё в один, но что-то не получается никак.

В общем нужно из двух шаблонов скомпоновать один 🙏

DownloadsButton из Members Shop

{{$member = \IPS\Member::loggedIn();}}
{{try { $downloadNode = \IPS\membersshop\Downloads::load( $file->id, 'file_id' );; } catch( \Exception $e ) { $downloadNode = NULL; } }}
{{$pointsName = \IPS\Settings::i()->ms_points_name;}}
<a href='{{if settings.idm_antileech}}{$file->url('download')->csrf()}{{else}}{$file->url('download')}{{endif}}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important' {{if $file->container()->message('disclaimer') or \count( $file->files() ) > 1 or member.group['idm_wait_period']}}data-ipsDialog{{endif}}>
    {lang="download_now"}{{if !$downloadNode AND !$file->isPaid() AND $file->ms_points AND $member->member_id != $file->submitter}} {$file->ms_points} {$pointsName}{{endif}}
</a>

DownloadsButton из Downloads

<li>
	{{if !$file->canDownload() AND !( !$file->container()->can( 'download' ) AND $file->container()->message('npd') )}}
		{{if !\IPS\Member::loggedIn()->member_id}}
			<span class="ipsType_light ipsType_blendLinks ipsResponsive_hidePhone ipsResponsive_inline"><i class="fa fa-info-circle"></i> {lang="download_no_permission_guest"}</span>
			<a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' class='ipsButton ipsButton_light ipsButton_medium ipsButton_fullWidth ipsSpacer_top'>{lang="sign_in_short"}</a>
		{{else}}
			<span class="ipsType_light ipsType_blendLinks ipsResponsive_hidePhone ipsResponsive_inline"><i class="fa fa-info-circle"></i> {lang="download_no_permission"}</span>
		{{endif}}
	{{else}}
		<a target='_blank' href='{{if settings.idm_antileech}}{$file->url('download')->csrf()}{{else}}{$file->url('download')}{{endif}}' class='ipsButton ipsButton_fullWidth ipsButton_large ipsButton_important' {{if $file->container()->message('disclaimer') or \count( $file->files() ) > 1 or ( member.group['idm_wait_period'] AND ( !$file->isPaid() OR member.group['idm_paid_restrictions'] ) )}}data-ipsDialog{{endif}}>
          	{{if \in_array($file->id, array(31,43,44,45,56,58,59,81,133,161,162,163,203,204,230,231,232,234,235,236,245,248,249,262,265,312,320,321,322,323,324,334,349,404,406,407,408,409,410,411,412,413,414,415,416,417,465,502,503,504,505,506,609,610))}}
   				{lang="download_now"}
			{{else}}          
    		{{if \in_array($file->container()->id, array(1,3,4,5,6,7,8,9,10,11,18))}}
        		{lang="button_plugin"}
    		{{elseif \in_array($file->container()->id, array(13,14,15,16,17))}}
        		{lang="button_application"}
    		{{endif}}
{{endif}}
  		</a>
	{{endif}}
</li>

Я же правильно понимаю, что если сделать 1 шаблон для Downloads и убрать второй из Members Shop, то всё всёравно будет работать, и баллы тоже? По логике вроде да :) 

Заранее большое спасибо за помощь.

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.