hogava Posted September 3, 2019 Share Posted September 3, 2019 Hi I have some information in my DB that updated by cronjob. now i want to display those in my template for clients, with shortcodes like {$myfirstdata} and {$myanotherdata} now where i can start it. i know this need a hook, but how? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 3, 2019 Share Posted September 3, 2019 17 minutes ago, hogava said: now where i can start it. i know this need a hook, but how? if the data is in a WHMCS table, then it shouldn't be too difficult- but the awkward part is not knowing what the data structure looks like, as that will determine the require code... e.g is there just going to be one value for each variable? will they be arrays of data ?? where will the data be outputted in the clientarea ??? if anywhere, then it's a ClientAreaPage hook; if it's a specific page, then there might be a specific ClientAreaPage hook that you can use... fundamentally, you'll probably be using Capsule for the query - so you could try searching for previous hooks that i've posted that use capsule, to see if they help you... 1 Quote Link to comment Share on other sites More sharing options...
hogava Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) Thanks for your attention. I have just 4 "custom currency rate" (floor numbers) that i want to output them in the clientareahome.tpl I can add those in tblconfiguration table or an other new non-whmcs table. now i am going to read about Capsule and thank you for more help. Edited September 3, 2019 by hogava 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 3, 2019 Share Posted September 3, 2019 7 minutes ago, hogava said: I have just 4 "custom currency rate" (floor numbers) that i want to output them in the clientareahome.tpl then it's a ClientAreaPageHome hook. 8 minutes ago, hogava said: I can add those in tblconfiguration table or other new non-whmcs table. use a custom table - the last thing you want to do is corrupt the tblconfiguration table. 8 minutes ago, hogava said: now i am going to read about Capsule and thank you for more help. if it helps, the hook in the thread below pulls one exchange rate from the tblcurrencies table and returns it to the invoice page as a Smarty variable (or as you say shortcode) that can be used in the template... it might be a good starting point for you. 1 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.