Jump to content
ljesh

Intodns?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

Dude, you surprised me with your work/knowledge 2 times in 24 hours. Cmon, stop it.

 

Thanks ALOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites

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:

 

screenshot1.jpg

 

All "thank you very much, God bless you" goes to jeremyhaber.

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
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:

nyan-cat-whmcs.png.4a11685873e71fec6ac363be42df0338.png

AdminAreaHeaderOutput provides variables you need to inject your code in specific pages. As for jQuery, just play with selectors.

Share this post


Link to post
Share on other sites
<?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.

nyan-cat-2.png.d9a0f83ee66a84889d966b81ddad281b.png

 

Share this post


Link to post
Share on other sites
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.

nyan-cat-2.png.d9a0f83ee66a84889d966b81ddad281b.png

 

hey Kian, thanks so much. What if I want it to auto append a URL/domain/hostname after the URL?

Share this post


Link to post
Share on other sites

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 by Kian

Share this post


Link to post
Share on other sites

@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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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