[Share] Custom Badge Statistic di admin WHMCS


IDreg.Net

Expert 2.0
Fitur ini akan menampilkan jumlah statistic dan link ke jumlah statistic yg di maksud
  • domain ( aktif, expired )
  • produk ( suspended, terminated )
  • invoice ( unpaid, overdue )

Note : link badge ini hanya work pada WHMCS yg Url nya Full Friendly Rewrite 4782
Tested di whmcs v7.7.1 dan v7.8.3


berikut penampakan nya akan tampil di dashboard ( ss diambil dr whmcs v7.8.3 )
4780

hanya melakukan tambahan sedikit pada theme yang di gunakan
Langkah- langkah nya yaitu sebagai berikut
  1. masuk ke folder admin whmcs contoh = admin/templates/blend
  2. buat 1 fie .tpl contoh = badge-info.tpl
  3. pastekan kode berikut dalam badge-info.tpl
PHP:
<div class="row home-status-badge-row">
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-primary clearfix">
            <div class="icon">
                <a href="domains?status=expired">
                    <i class="far fa fa-cog"></i>
                </a>
            </div>
            <div class="detail">
                <a href="invoices.php?status=Unpaid">
                    <span class="count">{$sidebarstats.invoices.unpaid}</span>
                    <span class="desc">{$_ADMINLANG.stats.unpaidinvoices}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-warning clearfix">
            <div class="icon">
                <a href="invoices.php?status=Overdue">
                    <i class="fa fa-trash"></i>
                </a>
            </div>
            <div class="detail">
                <a href="domains?status=expired">
                    <span class="count">{$sidebarstats.invoices.overdue}</span>
                    <span class="desc">{$_ADMINLANG.stats.overdueinvoices}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-info clearfix" >
            <div class="icon">
                <a href="services?status=suspended">
                    <i class="fas fa-rocket"></i>
                </a>
            </div>
            <div class="detail">
                <a href="services?status=suspended">
                    <span class="count">{$sidebarstats.services.suspended}</span>
                    <span class="desc">{$_ADMINLANG.stats.suspendedservices}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-danger clearfix">
            <div class="icon">
                <a href="services?status=terminated">
                    <i class="far fa-info-circle"></i>
                </a>
            </div>
            <div class="detail">
                <a href="services?status=terminated">
                    <span class="count">{$sidebarstats.services.terminated}</span>
                    <span class="desc">{$_ADMINLANG.stats.terminatedservices}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-success clearfix">
            <div class="icon">
                <a href="domains?status=active">
                    <i class="fas fa-globe"></i>
                </a>
            </div>
            <div class="detail">
                <a href="domains?status=active">
                    <span class="count">{$sidebarstats.domains.active}</span>
                    <span class="desc">{$_ADMINLANG.stats.activedomains}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="col-sm-2 col-xs-6 tile">
        <div class="health-status-block btn-warning clearfix">
            <div class="icon">
                <a href="domains?status=expired">
                    <i class="far fa-exclamation-circle"></i>
                </a>
            </div>
            <div class="detail">
                <a href="domains?status=expired">
                    <span class="count">{$sidebarstats.domains.expired}</span>
                    <span class="desc">{$_ADMINLANG.stats.expireddomains}</span>
                </a>
            </div>
        </div>
    </div>
</div>
  1. save dan lanjut edit homepage.tpl
  2. pada homepage.tpl cari kata {foreach $staticWidgets as $widget}
  3. paste kode ini di atas nya
PHP:
{include file="$template/badge-info.tpl"}
4781
7. save semua dan selesai.. silahkan lihat hasil

Semoga bs berguna buat semua...
 

galuh82

Hosting Guru
Verified Provider
mantap, terima kasih telah berbagi ..
 

    
Top