Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

OynFrm Reklam Alani OynFrm Reklam Alani
OynFrm Reklam Alani OynFrm Reklam Alani

WHMCS'de Ek Sayfa Ekleme

Greatking Çevrimdışı

Greatking

Admin
Katılım
23 Tem 2013
Mesajlar
909
Tepkime puanı
49
Puanları
28
Yaş
36
Web sitesi
Discord
greatking
Cinsiyetiniz
Bay
Şube
Bursa
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 5.2.x ise:

PHP:
<?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(); 
  
 ?>

Sürümünüz 4.x veyada 5.0.x , 5.1.x ise:

PHP:
<?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.
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Tema düzenleyici

Tema özelletirmeleri

Grafik arka planlar

Granit arka planlar