• 12-08-2012, 05:48:49
    #1
    Reveloper
    Merhaba,
    WHMCompleteSolution sistemlerde [root]/templates/*ThemeName içerisinde bulunan .tpl dosyaları ile yeni bir sayfa oluşturabilirsiniz.
    Not: Varolan yani o an aktif olarak kullandığınız temanın klasörüne ([root]/templates/*ThemeName) attığınız .tpl dosyası sitede gözükür. Başka bir tema seçerseniz ona'da oluşturduğunuz .tpl dosyanızı kopyalamanız gereklidir aktif olarak gözükmesi için.
    .tpl dosyanızı oluşturduktan sonra ise whmcs sisteminizin kurulu olduğu [root] tabana gelerek. Bir PHP dosyası oluşturun. İçeriği ise:

    Sürümünüz 6.x ise:
    <?php
     use WHMCS\Database\Capsule;
    define("CLIENTAREA", true);
    require("init.php");
    $ca = new WHMCS_ClientArea();
    $ca->setPageTitle("SAYFA ADINIZ");
    $ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
    $ca->addToBreadCrumb('SAYFA_LİNKİ.php', 'SAYFA ADINIZ');
    $ca->initPage();
    $ca->setTemplate('TPLDOSYASININADI');
    $ca->output();
     ?>

    Sürümünüz 5.2.x ise:
    <?php
     
     define("CLIENTAREA",true);
     //define("FORCESSL",true); // Uncomment to force the page to use https://
     
     require("init.php");
     
     $ca = new WHMCS_ClientArea();
     
     $ca->setPageTitle("Your Page Title Goes Here");
     
     $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
     $ca->addToBreadCrumb('mypage.php','Your Custom Page Name');
     
     $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('variablename', $value);
     
     # 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('TPLDOSYASININADI');
     
     $ca->output();
     
     ?>
    Sürümünüz 4.x veyada 5.0.x , 5.1.x ise:
    <?php
    define("CLIENTAREA",true);
    //define("FORCESSL",true); # Uncomment to force the page to use https://
    require("dbconnect.php");
    require("includes/functions.php");
    require("includes/clientareafunctions.php");
    $pagetitle = $_LANG['clientareatitle'];
    $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';
    $breadcrumbnav .= ' > <a href="mypage.php">My Page</a>'; 
    initialiseClientArea($pagetitle,'',$breadcrumbnav);
    # To assign variables to the template system use the following syntax.
    # These can then be referenced using {$variablename} in the template.
    $smartyvalues["variablename"] = $value; 
    # Check login status
    if ($_SESSION['uid']) {
      # 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=".(int)$_SESSION['uid']);
      $data = mysql_fetch_array($result);
      $clientname = $data[0];
      $smartyvalues["clientname"] = $clientname;
    } else {
      # User is not logged in
    }
    # Define the template filename to be used without the .tpl extension
    $templatefile = "TPLDOSYASININADI"; 
    outputClientArea($templatefile);
    ?>
    olacaktır. Yukarıdaki kodda bulunan TPLDOSYASININADI yerine kendi tpl dosyanızın adını yazıp kaydettikten sonra kontrol edebilirsiniz.
    Teşekkürler.
  • 27-08-2012, 00:54:02
    #2
    olmuyor boş görünüyor
  • 27-08-2012, 16:38:50
    #3
    Coderca adlı üyeden alıntı: mesajı görüntüle
    olmuyor boş görünüyor
    burti'nin dediği gibi template file tpl dosyasının ismini yazmanız vede başka tpl dosyasının ismini ve içeriğini değiştirerek yeni bir dosya oluşturabilirsiniz


    saygılarla
  • 27-08-2012, 18:51:34
    #4
    Reveloper
    Coderca adlı üyeden alıntı: mesajı görüntüle
    olmuyor boş görünüyor
    Özel Mesaj atarsanız özel olarak yardımcı olurum.
  • 24-11-2012, 18:30:00
    #5
    Coderca adlı üyeden alıntı: mesajı görüntüle
    olmuyor boş görünüyor
    .php dosyasına, .tpl uzantısı olmadan dosya adını yazmalısınız.
  • 16-03-2013, 16:42:13
    #6
    Whmcs Version 5.2* için ek sayfa ekleme aşağıdadır arkadaşlar

     <?php
     
     define("CLIENTAREA",true);
     //define("FORCESSL",true); // Uncomment to force the page to use https://
     
     require("init.php");
     
     $ca = new WHMCS_ClientArea();
     
     $ca->setPageTitle("Your Page Title Goes Here");
     
     $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
     $ca->addToBreadCrumb('mypage.php','Your Custom Page Name');
     
     $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('variablename', $value);
     
     # 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('mypage');
     
     $ca->output();
     
     ?>

    http://docs.whmcs.com/Creating_Pages
  • 22-08-2013, 02:14:53
    #7
    Merhaba ; 5.2.X versiyonunu biraz daha açıklarsanız mesela hangi yerlere ne yazılacak şeklinde.

    Kolay gelsin iyi çalışmalar.

    $ca->setPageTitle("Your Page Title Goes Here");

    Burası gibi başka düzenleyeceğimiz yer varmı ?
  • 29-09-2014, 03:39:13
    #8
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Burti adlı üyeden alıntı: mesajı görüntüle
    Özel Mesaj atarsanız özel olarak yardımcı olurum.
    Banada Yardımcı Olurmusunuz hocam ?
  • 29-09-2014, 10:06:31
    #9
    Reveloper
    BatuhanBarut adlı üyeden alıntı: mesajı görüntüle
    Banada Yardımcı Olurmusunuz hocam ?
    Tabiki