Addon 2x XFRM download history - Lịch sử tải xuống XFRM cho XenForo 2 1.4

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,734
Được Like
12,680
XFRM download history - Lịch sử tải xuống XFRM cho XenForo 2 1.4

Cho thấy các thành viên đã tải xuống tài nguyên.

pic001.jpgpic002.jpgpic003.jpgpic004.jpg
Tính năng:
  • Tất cả phrase bắt đầu với xfrmdownloadhistory_ để thuận tiện cho bạn.
Chúc các bạn thành công.


Nguồn: Internet​
 

Đính kèm

  • Andy-XFRMDownloadHistory-1.4.zip
    15.7 KB · Lượt xem: 35

thahtrung06

Moderator
Thành viên BQT
Tham gia
12/11/2019
Bài viết
1,095
Được Like
450
Addons này được cập nhật vào ngày 5/9/2019, cài trên XF 2.2.7 Patch 1 thì bị lỗi ko hiển thị được, trong trang ACP báo lỗi về addons này rất nhiều. Cụ thể, lỗi ở hàm: $finder = \XF::finder('XFRM:ResourceItem');
HTML:
<?php

namespace Andy\XFRMDownloadHistory\XFRM\Pub\Controller;

use XF\Mvc\ParameterBag;

class ResourceItem extends XFCP_ResourceItem
{
    public function actionDownloadHistory(ParameterBag $params)
    {
        // get visitor
        $visitor = \XF::visitor();
        
        // get permission
        if (!$visitor->hasPermission('XFRMDownloadHistory', 'view'))
        {
            return $this->noPermission();
        }
        
        // get options
        $options = \XF::options();

        // get options from Admin CP -> Options -> XFRM download history -> Limit
        $limit = $options->XFRMDownloadHistoryLimit;
        
        // get resourceId
        $resourceId = $params->resource_id;
        
        // get resource
        $finder = \XF::finder('XFRM:ResourceItem');
        $resource = $finder
            ->where('resource_id', $resourceId)
            ->fetchOne();
        
        // get resourceTitle
        $resourceTitle = $resource['title'];
        
        // get results
        $finder = \XF::finder('XFRM:ResourceItem');
        $results = $finder
            ->where('resource_id', $resourceId)
            ->order('CurrentVersion.resource_version_id', 'DESC')
            ->order('CurrentVersion.release_date', 'DESC')
            ->limit($limit)
            ->fetch();
        
        // prepare viewParams
        $viewParams = [
            'resourceTitle' => $resourceTitle,
            'results' => $results
        ];

        // send to template
        return $this->view('Andy\XFRMDownloadHistory:DownloadHistory', 'andy_xfrmdownloadhistory', $viewParams);
    }
}
 
Sửa lần cuối:

bloghocpiano

Moderator
Thành viên BQT
Tham gia
26/01/2021
Bài viết
452
Được Like
76
Addons này được cập nhật vào ngày 5/9/2019, cài trên XF 2.2.7 Patch 1 thì bị lỗi ko hiển thị được, trong trang ACP báo lỗi về addons này rất nhiều. Cụ thể, lỗi ở hàm: $finder = \XF::finder('XFRM:ResourceItem');
HTML:
<?php

namespace Andy\XFRMDownloadHistory\XFRM\Pub\Controller;

use XF\Mvc\ParameterBag;

class ResourceItem extends XFCP_ResourceItem
{
    public function actionDownloadHistory(ParameterBag $params)
    {
        // get visitor
        $visitor = \XF::visitor();
       
        // get permission
        if (!$visitor->hasPermission('XFRMDownloadHistory', 'view'))
        {
            return $this->noPermission();
        }
       
        // get options
        $options = \XF::options();

        // get options from Admin CP -> Options -> XFRM download history -> Limit
        $limit = $options->XFRMDownloadHistoryLimit;
       
        // get resourceId
        $resourceId = $params->resource_id;
       
        // get resource
        $finder = \XF::finder('XFRM:ResourceItem');
        $resource = $finder
            ->where('resource_id', $resourceId)
            ->fetchOne();
       
        // get resourceTitle
        $resourceTitle = $resource['title'];
       
        // get results
        $finder = \XF::finder('XFRM:ResourceItem');
        $results = $finder
            ->where('resource_id', $resourceId)
            ->order('CurrentVersion.resource_version_id', 'DESC')
            ->order('CurrentVersion.release_date', 'DESC')
            ->limit($limit)
            ->fetch();
       
        // prepare viewParams
        $viewParams = [
            'resourceTitle' => $resourceTitle,
            'results' => $results
        ];

        // send to template
        return $this->view('Andy\XFRMDownloadHistory:DownloadHistory', 'andy_xfrmdownloadhistory', $viewParams);
    }
}
e cài thì thấy nó ko hiển thị, dù tích yes đó a
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom