• 07-11-2018, 23:35:55
    #1
    Merhaba arkadaşlar, whmcs de sabit menülerin haricince yeni bir sayfa nasıl açılır. Ne yapmamız gerekiyor. Yardımcı olursanız memnun olurum.
  • 08-11-2018, 00:38:29
    #2
    Merhaba,

    Öcelikle whmcs'nin ana dizinine sayfaadi.php şekilde bir dosya oluştur ve içeriğine şunu yaz
    <?php
    
    define("CLIENTAREA",true);
    
    require("init.php");
    
    $file = $_SERVER["SCRIPT_NAME"];
    $break = Explode('/', $file);
    $pfile = $break[count($break) - 1];
    $pfile = str_replace(".php", "", $pfile);
    
    $pagetitle = "Örnek title";
    $metatags="örnek meta";
    $description="örnek açıklama";
    
    $ca = new WHMCS_ClientArea();
    
    $ca->setPageTitle($pagetitle);
    $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
    $ca->addToBreadCrumb($pfile.'.php',$pagetitle);
    $ca->initPage();
    $ca->assign('subpage', "1");
    $ca->setTemplate($pfile);
    $ca->output();
    
    ?>
    Daha sonra kullandığın temanın içerisine yani /templates/temaadi içerisine sayfaadi.tpl oluştur.

    siteadi.com/sayfaadi.php yazdığın zaman göreceksin zaten
  • 08-11-2018, 11:08:12
    #3
    Çok teşekkür ederim



    Teşekkür ederim. Peki siteadi.php sayfasının içeriğini nasıl eklerim.

    ahmtozdmr adlı üyeden alıntı: mesajı görüntüle
    Merhaba,

    Öcelikle whmcs'nin ana dizinine sayfaadi.php şekilde bir dosya oluştur ve içeriğine şunu yaz
    <?php
    
    define("CLIENTAREA",true);
    
    require("init.php");
    
    $file = $_SERVER["SCRIPT_NAME"];
    $break = Explode('/', $file);
    $pfile = $break[count($break) - 1];
    $pfile = str_replace(".php", "", $pfile);
    
    $pagetitle = "Örnek title";
    $metatags="örnek meta";
    $description="örnek açıklama";
    
    $ca = new WHMCS_ClientArea();
    
    $ca->setPageTitle($pagetitle);
    $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
    $ca->addToBreadCrumb($pfile.'.php',$pagetitle);
    $ca->initPage();
    $ca->assign('subpage', "1");
    $ca->setTemplate($pfile);
    $ca->output();
    
    ?>
    Daha sonra kullandığın temanın içerisine yani /templates/temaadi içerisine sayfaadi.tpl oluştur.

    siteadi.com/sayfaadi.php yazdığın zaman göreceksin zaten
  • 08-11-2018, 17:14:26
    #4
    Merhaba,
    Şöylede kullanabilirsiniz.

    <?php
     
     define("CLIENTAREA",true);
     //define("FORCESSL",true); // Uncomment to force the page to use https://
     
     require("init.php");
     
     $ca = new WHMCS_ClientArea();
     
     $ca->setPageTitle("Reseller Hosting");
     
     $ca->addToBreadCrumb('index.php','Anasayfa');
     $ca->addToBreadCrumb('testsayfasi.php','Test Sayfası');
    
     
     $ca->initPage();
     
     //$ca->requireLogin(); // Uncomment this line to require a login to access this page
     
     # To assign variables to the template system use the following syntax.
     # These can then be referenced using {$variablename} in the template.
     
     $ca->assign('pagetype', custom);
     $ca->assign('category', test);
    
     # Check login status
     if ($ca->isLoggedIn()) {
     
       # User is logged in - put any code you like here
     
       # Here's an example to get the currently logged in clients first name
     
       $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".$ca->getUserID());
       $data = mysql_fetch_array($result);
       $clientname = $data[0];
     
       $ca->assign('clientname', $clientname);
     
     } else {
     
       # User is not logged in
     
     }
     
     # Define the template filename to be used without the .tpl extension
     
     $ca->setTemplate('testsayfasi');
     
     $ca->output();
     
     ?>
    $ca->setTemplate('testsayfasi'); Buradaki testsayfasi kısmı /templates/temaadınız 'ın içinde oluşturacağınız isimle aynı olmalı.

    Kısa bir yöntem tpl nasıl oluşturacağım dersniz eğer elinizde diyelim kullandıgınız bir hosting sayfası var onun kopyalayarak yeni bir isimde yukardaki örnek gibi testsayfası.tpl şeklinde oluşturabilirisniz.