ljesh Posted January 20, 2011 Share Posted January 20, 2011 Hey guys, I just read this thread and liked the idea. Can anyone of you write a tiny script that will add the intodns button on that place and will make a link like http://intodns.com/whateverdomain.com ? I have no knowledge at all about this, but I would love if someone could pull it off. 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted January 20, 2011 Author Share Posted January 20, 2011 It seems clientshosting.php (I guess in this file this needs to be added) is encoded, and this is impossible to be performed You may close/delete this thread, I hope WHMCS does this for us. It will be an extra tool to ease our work sometimes. 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted January 20, 2011 Share Posted January 20, 2011 It seems clientshosting.php (I guess in this file this needs to be added) is encoded, and this is impossible to be performed You may close/delete this thread, I hope WHMCS does this for us. It will be an extra tool to ease our work sometimes. NEVER SAY IMPOSSIBLE! Cause possible is my middle name - Well I not really... but I like to do the impossible. Insert this into your admin template footer.tpl file: {literal} <script type="text/javascript"> var domainVal = $('input[name=domain]').val(); if (domainVal != (""|null|undefined)) { $('input[name=domain]').parent().append(' <a href="http://intodns.com/'+domainVal+'" target="_blank">intodns</a>'); } </script> {/literal} - Enjoy! From your friendly neighbour hood developer! 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted January 20, 2011 Author Share Posted January 20, 2011 Dude, you surprised me with your work/knowledge 2 times in 24 hours. Cmon, stop it. Thanks ALOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted January 20, 2011 Share Posted January 20, 2011 No problem! Always happy to help 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted January 20, 2011 Author Share Posted January 20, 2011 In case anyone wonders what this does... This modification adds a "intodns" link when viewing product/service or domains of a customer so you may check if the domain is properly set using the http://www.intodns.com service. It looks like this: All "thank you very much, God bless you" goes to jeremyhaber. 0 Quote Link to comment Share on other sites More sharing options...
mikelegg Posted January 21, 2011 Share Posted January 21, 2011 That's brilliant. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
interfasys Posted February 27, 2011 Share Posted February 27, 2011 Very nice 0 Quote Link to comment Share on other sites More sharing options...
Brainchild Labs Pty Ltd Posted November 5, 2011 Share Posted November 5, 2011 Looks like this is already integrated into the latest version of WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
scurrell Posted November 5, 2011 Share Posted November 5, 2011 Looks like this is already integrated into the latest version of WHMCS. That's what happens when you reply to posts that are 9 months old.... 0 Quote Link to comment Share on other sites More sharing options...
stuntnmore Posted April 29, 2013 Share Posted April 29, 2013 how did you add it to your admin interface? 0 Quote Link to comment Share on other sites More sharing options...
DavidBee Posted April 29, 2013 Share Posted April 29, 2013 Its been there for years. The thread you responded to is mega old. 0 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 14, 2020 Share Posted January 14, 2020 So... how does one go about adding a new link to the current version of WHMCS? For both products/services & domains, I can't find it anywhere! 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 14, 2020 Share Posted January 14, 2020 2 minutes ago, baymax said: So... how does one go about adding a new link to the current version of WHMCS? For both products/services & domains, I can't find it anywhere! Same old way, jQuery. <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ $("#intellisearchval").closest('div').append('<img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;">'); }); </script> HTML; return $output; }); Here's the output: AdminAreaHeaderOutput provides variables you need to inject your code in specific pages. As for jQuery, just play with selectors. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 14, 2020 Share Posted January 14, 2020 oops, I meant how do I add it into this dropdown? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 14, 2020 Share Posted January 14, 2020 <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://www.youtube.com/watch?v=QH2-TGUlwu4" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); Here is the output. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 14, 2020 Share Posted January 14, 2020 3 hours ago, Kian said: <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://www.youtube.com/watch?v=QH2-TGUlwu4" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); Here is the output. hey Kian, thanks so much. What if I want it to auto append a URL/domain/hostname after the URL? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 14, 2020 Share Posted January 14, 2020 (edited) If I understoon you correctly... <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ var url = $('input[name="domain"]').val(); $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://example.com/hello.php?domain='+ url +'" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); The rainbow cat will open example.com/hello.php?domain={THE_DOMAIN_WRITTEN_IN_THE_INPUT}. p.s. If you are a real man, leave the rainbow cat in production! 😎 Edited January 14, 2020 by Kian 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 15, 2020 Share Posted January 15, 2020 @Kian There seems to be something missing in your code. I tried both by inserting it into the beginning of the footer.tpl file and I only see errors at the bottom of the page and nothing in the drop down. Any idea? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 15, 2020 Share Posted January 15, 2020 It's an action hook, you can't use it in tpl files. Create a php file in includes/hooks and name it as you prefer (eg. overrideIntoDNS.php) then copy the script in the file and save. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 15, 2020 Share Posted January 15, 2020 2 hours ago, Kian said: It's an action hook, you can't use it in tpl files. Create a php file in includes/hooks and name it as you prefer (eg. overrideIntoDNS.php) then copy the script in the file and save. Man you really saved me! Thank you!!! 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.