Jump to content

vitadome

Member
  • Posts

    7
  • Joined

  • Last visited

Everything posted by vitadome

  1. Hello, I have a need to accept BTC in my WHMCS instance. I'm currently setup with Coinbase Commerce and would like to have this integrate with WHMCS. I've searched the Market Place and didn't find anything that appeared to be consistently maintained and/or current with updates. With that said, I thought it would be a fun to try and create this gateway myself. I am a true novice but do have some ability to read and decipher code. Looking at Developer Documentation and reviewing GitHub -- is there anyone that can help point me to the correct sample gateway module I could use? Also, any other tips or suggestions is appreciated. Thank you.
  2. Hi! I created a few one-off custom pages. The site overall has always looked great on a computer and a mobile device. However the page I created looks out of sorts on a mobile device. Is there some type of generic code out there that can make it look respectable? If someone is able to point me in the right direction I would be grateful. Thank you!
  3. I was able to find a great tutorial online which solved my problem. https://www.inmotionhosting.com/support/edu/whmcs/how-to-create-a-custom-page-for-whmcs For my issue, my understanding was backwards. I was having the php file do what the tpl should do and vice versa. I hope this post helps others. Thank you!
  4. Hi, I've viewed the documentation on creating custom pages https://developers.whmcs.com/advanced/creating-pages/ but I'm not sure what my next step would be. I created the .tpl file and placed in my custom template folder. I have a php file at the whmcs root but I'm not certain on what code to add to the php file to make it work. <?php use WHMCS\ClientArea; use WHMCS\Database\Capsule; define('CLIENTAREA', true); require __DIR__ . '/init.php'; $ca = new ClientArea(); $ca->setPageTitle('Your Page Title Goes Here'); $ca->addToBreadCrumb('index.php', Lang::trans('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 */ $clientName = Capsule::table('tblclients') ->where('id', '=', $ca->getUserID())->pluck('firstname'); // 'pluck' was renamed within WHMCS 7.0. Replace it with 'value' instead. // ->where('id', '=', $ca->getUserID())->value('firstname'); $ca->assign('clientname', $clientName); } else { // User is not logged in $ca->assign('clientname', 'Random User'); } /** * Set a context for sidebars * * @link http://docs.whmcs.com/Editing_Client_Area_Menus#Context */ Menu::addContext(); /** * Setup the primary and secondary sidebars * * @link http://docs.whmcs.com/Editing_Client_Area_Menus#Context */ Menu::primarySidebar('announcementList'); Menu::secondarySidebar('announcementList'); # Define the template filename to be used without the .tpl extension $ca->setTemplate('mypage'); $ca->output();
  5. Thanks so much! I was able to learn and find my answers. I appreciate your help!
  6. Hi @wp4all Thank you for this info... it worked for me! My follow-up question is... how did you know where to find #home-banner? Is there a cheat sheet listed somewhere?
  7. Newbie here. I'm trying to do some color changes to the navigation bars but have been unsuccessful. I'm was just trying to manipulate the styles.css file just to see how it worked but I'm not able to see any changes. I've read the documentation on this topic but I assume I'm missing something. Any help is appreciated! Thank you.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated