R2m0x94 (Vasily)

R2m0x94 (Vasily)

С нами с 07 мая 2018; Место в рейтинге пользователей: #396
R2m0x94 (Vasily)
09 октября 2018, 11:18
0
Скажите, не понимаю как пользоваться. В системных настройках указал лимит, но в админке виджет не показывается. Что нужно сделать для того, чтобы этот виджет увидеть на Главной странице входа в админ. панель — указать в дефолтном чанке входа — чанк tpl.modSizeControl?
R2m0x94 (Vasily)
13 мая 2018, 19:46
0
На странице после успешной отправки надо вывести id-шник только что сохраненной новой/последней формы
Пробую так:
[[!FormItLoadSavedForm? &tpl=`@INLINE [[+savedForm.id]]`]]
— Не срабатывает
И даже так, после вещания id формы на обработчик:

— Тоже не срабатывает
Помогите распечатать последнюю сохранённую форму на экран после успешной отправки. Так то на почту [[+savedForm.id]] приходит исправно. А <?php в FormItSaveForm боюсь исправлять.
R2m0x94 (Vasily)
08 мая 2018, 10:52
0
или же так:
<style>
    table.fd-table {
    width: 100%;
}

table.fd-table .fd-header{
    background-color: firebrick;
    color: white;
}

table.fd-table .fd-firstDir{}
table.fd-table .fd-lastDir{}
table.fd-table .fd-firstFile{}
table.fd-table .fd-lastFile{}
table.fd-table .fd-dir{}
table.fd-table .fd-file{}
table.fd-table .fd-path{}

table.fd-table .fd-altRow{
    background-color: #efefef;
}

table.fd-table .fd-group-dir{
    background-color: #ddd;
}

table.fd-table tr {
    border-bottom: 1px solid #ccc;
}

table.fd-table tr td {
     padding:5px;
}

table.fd-table .fd-xlsx {
    background-color: #E3D1E6;
}

table.fd-table.no-border,
table.fd-table.no-border > tr,
table.fd-table.no-border > tr > td {
    border: none;
}

table.fd-table .fd-icon{
    display: inline-block;
    width: 16px;
}
tr.fd-file {
    background: white;
}
</style>
<table class="fd-table">
    <tbody>
        <tr class="fd-header">
            <td colspan="4"></td>
        </tr>
        [[!FileAttach? &privateUrl=`1` &private=`false` getUrl=`1` &mediasource=`1` &sortby=`rank` &tpl=`FileAttachTpl`]]
    </tbody>
</table>
FileAttachTpl:
<tr class="fd-file">
    [[-<td style="width:16px;">[[+ext:notempty=`<small>Type: <img src="/img/[[+ext]].png" /></small>`]]</td>]]
    [[+description:notempty=`<td>[[+description:notempty=`<strong>[[+description]]</strong>`]]</td>`:default=``]]
    <td>
        <a href="[[+url]]">[[+name]]</a> <span style="font-size:80%">([[+download]] downloads)</span>
        <p>[[+hash:notempty=`<small>SHA1: [[+hash]]</small>`]]</p>
    </td>
    <td>[[+size:notempty=`<small>Size: [[+size]] bytes</small>`]]</td>
    <td>[[+timestamp:notempty=`<small>Date: [[+timestamp:date=`%d.%m.%Y %H:%M`]]</small>`]]</td>
</tr>
R2m0x94 (Vasily)
08 мая 2018, 09:52
0
Fileattach & FileDownload
<table>
    <tbody>
        [[!FileDownload?
            &getDir=`[[++core_path]]/docs`
            &tplFile=`@CODE:
                <tr[[+fd.class]]>
                    <td style="width:16px;"><img src="[[+fd.image]]" alt="[[+fd.image]]" /></td>
                    <td>
                        [[-<a href="javascript:void(0);"
                           rel="#formLink"
                           id="[[+fd.hash]]"
                           >[[+fd.filename]]
                        </a>
                        <span style="font-size:80%">([[+fd.count]] downloads)</span>]]
                        [[!FileAttach? &privateUrl=`1` &private=`true` &mediasource=`1` &sortby=`rank` &tpl=`FileAttachTpl`]]
                    </td>
                    <td>[[+fd.sizeText]]</td>
                    <td>[[+fd.date]]</td>
                </tr>
                [[+fd.description:notempty=`<tr>
                    <td></td>
                    <td colspan="3">[[+fd.description]]</td>
                </tr>`:default=``]]`
            &dateFormat=`d-m-Y`
            &toArray=`0`
        ]]
    </tbody>
</table>
Если указать:
<a href="javascript:void(0);" rel="#formLink" id="[[+fd.hash]]">[[+fd.filename]]</a>
<span style="font-size:80%">([[+fd.count]] downloads)</span>
[[+fd.count]] — не обновляется

FileAttachTpl:
<p>[[+description:notempty=`<strong>[[+description]]</strong>
`]]
<a href="[[+url]]">[[+name]]</a> <span class="badge">[[+download]]</span>
[[+size:notempty=`
<small>Size: [[+size]] bytes</small>`]]
[[+ext:notempty=`
<small>Type: <img src="/img/[[+ext]].png" /></small>`]]
[[+timestamp:notempty=`
<small>Date: [[+timestamp:date=`%d.%m.%Y %H:%M`]]</small>`]]
[[+hash:notempty=`
<small>SHA1: [[+hash]]</small>`]]</p>
docs.modx.pro/components/fileattach