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

[VNXF] Theme Digital – Sự lựa chọn hoàn hảo cho diễn đàn công nghệ hiện đại Group Zalo của Cộng đồng người dùng XenForo tại Việt Nam

PVS

Super Moderator
Thành viên BQT
Code này có bản quyền, nếu có nhu cầu sử dụng, bạn hãy click để tìm bản gốc có trả phí
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​
 
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:
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
 
Back
Top