Mano Posted February 17, 2021 Report Share Posted February 17, 2021 Ребят, всем привет! Может кто поможет. В общем у меня такая проблема, установил приложение 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, то всё всёравно будет работать, и баллы тоже? По логике вроде да Заранее большое спасибо за помощь. Quote Link to comment Share on other sites More sharing options...
Mano Posted February 18, 2021 Author Report Share Posted February 18, 2021 @Desti может подсобишь с вопросом?) Уже однажды мне с этим очень сильно помог в организации данной фишки Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.