FatihYldrm Posted January 24, 2017 Share Posted January 24, 2017 Hi friends want to put the date that the customer panel is the registration of the members.If you have the code of the variable, please tell me or cheer if you can help. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 Hi friends want to put the date that the customer panel is the registration of the members.If you have the code of the variable, please tell me or cheer if you can help. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 Hi friends want to put the date that the customer panel is the registration of the members.If you have the code of the variable, please tell me or cheer if you can help. if you mean that you want to add it to a sidebar or homepage panel - you will need to use an action hook, written using PHP, and basically have two options. 1. Use the Class Documentation - http://docs.whmcs.com/classes/7.0/WHMCS/User/Client.html 2. Query the tblclients database. either method will give you the signup date - then it's just a case of using the correct hook, depending on if it's a sidebar or homepagepanel, to output the value. ps - don't double post... it won't get your question answered any quicker! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 https://forum.whmcs.com/showthread.php?124442-Member-Created-Date 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 Thank you Another problem is to look at the other page in another page, if you help me cheer. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 I guess I do not understand that English is not very good. {php} $dateCreated = date("Y-m-d H:i:s", strtotime($_REQUEST["DateOfRequest"])); echo $dateCreated; {/php} I did it, but it gives the value. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 you shouldn't use {php} tags in templates - you will need to write an action hook. where do you want to add this date - perhaps if you added a screenshot that would help me know. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 I did this with the information you gave. {php} $dateCreated = date("Y-m-d H:i:s", strtotime($_REQUEST["DateOfRequest"])); echo $dateCreated; {/php} But read on screen : 1970-01-01 00:00:00 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 I want to print to the customer panel main page. Clientarea.php 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 the fact that you're using a custom theme complicates matters because I can't tell if that's a homepagepanel or sidebar... I don't think it's either, so you'd be looking to use the ClientAreaPage hook. inside the hook, you will get the information you need - by either above method - it will create a Smarty variable which you can then output in your template. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 I am using six theme 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 I am using six theme it looks different to the Six theme I know! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 if you wanted an action hook to create the variable you're looking for, then you would create a .php file in /includes/hooks (call it signupdate.php) and paste the code below into it... <?php use Illuminate\Database\Capsule\Manager as Capsule; function hook_signup_date($vars){ $client = Menu::context('client'); return array("signup" => $client->dateCreated); } add_hook("ClientAreaPage", 1, "hook_signup_date"); and then in your template, you just add {$signup} wherever you want to output the signup date. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 thank you very much 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.