trying to add jetbackup shortcut to whmcs client area
trying to add jetbackup shortcut to whmcs client area
Hello,
I'm currently trying to customize our client billing area called whmcs to have custom shortcut icons to link to certain cpanel pages. Currently we're using this method as an example for creating a shortcut to "ssl/tls status" page in cpanel. We get the user link variable with this command:
# whmapi1 get_users_links user=allwebstage
*....
SSL_TLS_Status: frontend/paper_lantern/security/tls_status/
...*
So an example shorcut link would look like this app= is what tells our billing software what cpanel page to load:
<div class="col-md-3 col-sm-4 col-xs-6 col-6" id="SSL_TLS_Status">
<a href="clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1&app=SSL_TLS_Status" target="_blank">
SSL Status
</a>
</div>
This works great for native cpanel pages and features. But I can't find a Jetbackups equivalent to this user_link variable so the code would look like this example. (which obv doesn't work)
<div class="col-md-3 col-sm-4 col-xs-6 col-6" id="Jet_Backups">
<a href="clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1&app=Jet_Backups" target="_blank">
Jet Backups
</a>
</div>
Is there a way to find that?
Thanks!
I'm currently trying to customize our client billing area called whmcs to have custom shortcut icons to link to certain cpanel pages. Currently we're using this method as an example for creating a shortcut to "ssl/tls status" page in cpanel. We get the user link variable with this command:
# whmapi1 get_users_links user=allwebstage
*....
SSL_TLS_Status: frontend/paper_lantern/security/tls_status/
...*
So an example shorcut link would look like this app= is what tells our billing software what cpanel page to load:
<div class="col-md-3 col-sm-4 col-xs-6 col-6" id="SSL_TLS_Status">
<a href="clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1&app=SSL_TLS_Status" target="_blank">
SSL Status
</a>
</div>
This works great for native cpanel pages and features. But I can't find a Jetbackups equivalent to this user_link variable so the code would look like this example. (which obv doesn't work)
<div class="col-md-3 col-sm-4 col-xs-6 col-6" id="Jet_Backups">
<a href="clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1&app=Jet_Backups" target="_blank">
Jet Backups
</a>
</div>
Is there a way to find that?
Thanks!
-
- Staff Member
- Posts: 97
- Joined: January 1st, 2021, 12:51 am
Re: trying to add jetbackup shortcut to whmcs client area
Hello allwebnow,
I notice you are using the following cPanel WHMAPI command:
This command, from the cPanel API docs, returns "a list of application keys (appkeys) and the URLs that correspond to applications for the cPanel user's theme." In order to have JetBackup URL's appear in this list you must add the "implements" key/value to JetBackup's `install.json` file and run the following cPanel install plugin script:
You can find the JetBackup Plugin Install Package in the following locations:
JetBackup 4:
JetBackup 5:
You will need to extract the found .tar.gz folders in order to edit the "install.json" file. You can follow cPanel's guide at https://documentation.cpanel.net/displa ... el+Plugins for more information about how to add the "implements" key to the objects within the "install.json" file.
After all edits have been made recompress the files with the same naming format as before and run the install_plugin script like the following:
The `get_users_links` command will then have the JetBackup URLs included in the response with the value you assigned for "implements". Let us know if you have any further questions or concerns!
I notice you are using the following cPanel WHMAPI command:
Code: Select all
whmapi1 get_users_links user=allwebstage
Code: Select all
/usr/local/cpanel/scripts/install_plugin
JetBackup 4:
Code: Select all
/usr/local/jetapps/install/jetbackup/cpanel_plugins_paper_lantern.tar.gz
Code: Select all
/usr/local/jetapps/install/jetbackup5/cpanel/jetbackup5_cpanel.tar.gz/
After all edits have been made recompress the files with the same naming format as before and run the install_plugin script like the following:
Code: Select all
/usr/local/cpanel/scripts/install_plugin COMPRESSED_FILE.tar.gz --theme USERTHEME
Best Regards,
Richard, JetApps Team
Richard, JetApps Team
Re: trying to add jetbackup shortcut to whmcs client area
ahh thank you!
So does this look right attached? I got it from this page (which was a link on the page you posted about "implements")
https://documentation.cpanel.net/displa ... +and+Later
Also if I pack this up again and reinstall, in theory, nothing in jetbackups will happen with the current installation (nothing will reset or anything) correct?
Also what do i put in USERTHEME in the install command here --theme USERTHEME? Paper_Lantern?
Lastly, is it possible to just add this by default for future releases so users/businesses have this appkey at their disposal without having to do this?
So does this look right attached? I got it from this page (which was a link on the page you posted about "implements")
https://documentation.cpanel.net/displa ... +and+Later
Also if I pack this up again and reinstall, in theory, nothing in jetbackups will happen with the current installation (nothing will reset or anything) correct?
Also what do i put in USERTHEME in the install command here --theme USERTHEME? Paper_Lantern?
Lastly, is it possible to just add this by default for future releases so users/businesses have this appkey at their disposal without having to do this?
- Attachments
-
- pic705.jpg (60.22 KiB) Viewed 8747 times
-
- Staff Member
- Posts: 97
- Joined: January 1st, 2021, 12:51 am
Re: trying to add jetbackup shortcut to whmcs client area
Hello,
This URL would lead to the page showed in the attached image:
Please let us know if you have any other questions and thank you for your continued support of our product!
For JetBackup 4 the first object inside the install.json file is of type "group" and does not have a "uri" element that can be used with the whmapi1 call. You will need to add the "implements" element to the objects that are of type "link" and have an "uri" element set. For example, if you want the URL for the jetbackup 4 main page you would add the implements element to the following object located at the bottom of the install.json file:So does this look right attached?
Code: Select all
{
"icon" : "jetbackup_single.png",
"group_id" : "files",
"order" : 0,
"name" : "JetBackup",
"description" : "Manage and Restore your account information from backups",
"type" : "link",
"id" : "jetbackupsingle",
"uri" : "jetbackup/index.html#!/",
"implements" : "JetBackup_Index"
}
Yes, we have tested this on our internal servers and did not find any issues with our jetbackup installations after running the cpanel plugin install script.Also if I pack this up again and reinstall, in theory, nothing in jetbackups will happen with the current installation (nothing will reset or anything) correct?
Apologies for any confusion. USERTHEME will be whatever theme you are using for the end users. It appears based on your configuration you are using paper_lantern so you would replace USERTHEME with paper_lantern. A full example command we used on our test servers was the following:Also what do i put in USERTHEME in the install command here --theme USERTHEME? Paper_Lantern?
Code: Select all
/usr/local/cpanel/scripts/install_plugin /usr/local/jetapps/install/jetbackup5/cpanel/jetbackup5_cpanel.tar.gz --theme paper_lantern
We have noted this to our developers and have opened an internal git issue to have these changes implemented in future releases so that no customization would be required by the user.Lastly, is it possible to just add this by default for future releases so users/businesses have this appkey at their disposal without having to do this?
Please let us know if you have any other questions and thank you for your continued support of our product!
Best Regards,
Richard, JetApps Team
Richard, JetApps Team
Re: trying to add jetbackup shortcut to whmcs client area
Thank you for this!
So it's the bottom code that needs to be changes (not the top)? See attached on mine...
Also thanks for all the other explanations.
So it's the bottom code that needs to be changes (not the top)? See attached on mine...
Also thanks for all the other explanations.
- Attachments
-
- pic710.jpg (91.93 KiB) Viewed 8737 times
Re: trying to add jetbackup shortcut to whmcs client area
oh my goodness! I ran the installer and it actually worked! Thank you!!
-
- Staff Member
- Posts: 97
- Joined: January 1st, 2021, 12:51 am
Re: trying to add jetbackup shortcut to whmcs client area
The attached code you provided is correct.So it's the bottom code that needs to be changes (not the top)? See attached on mine..
You are welcome! Glad to see it worked for you as well!
If you ever have any more questions or concerns please let us know.
Best Regards,
Richard, JetApps Team
Richard, JetApps Team
Re: trying to add jetbackup shortcut to whmcs client area
Yes thank you! One last question to see if you have any insight on.
Do you know how to get the "zone_editor" app_key implements added when you run the command: whmapi1 get_users_links user=user
When I run that command, it does not come up. Here's the documentation for app_keys but I don't know how to add it on our server. I'm assuming it would be similar to the way we added it with yours using an install.json file or something but I have no idea where to even start since it's not related to jetapps install.json file.
https://documentation.cpanel.net/displa ... +-+Appkeys
Let me know if you have any knowledge of at all or point me in the right direction. The cpanel docs don't make sense to me.
Do you know how to get the "zone_editor" app_key implements added when you run the command: whmapi1 get_users_links user=user
When I run that command, it does not come up. Here's the documentation for app_keys but I don't know how to add it on our server. I'm assuming it would be similar to the way we added it with yours using an install.json file or something but I have no idea where to even start since it's not related to jetapps install.json file.
https://documentation.cpanel.net/displa ... +-+Appkeys
Let me know if you have any knowledge of at all or point me in the right direction. The cpanel docs don't make sense to me.
-
- Staff Member
- Posts: 97
- Joined: January 1st, 2021, 12:51 am
Re: trying to add jetbackup shortcut to whmcs client area
Hello,
Unfortunately, from reading their documentation, it appears the methods we used to add the JetBackup app_key are only valid for adding "plugins" app_keys. After some further research I was able to find a uapi command that was able to list a partial URL for zone_editor:
I was able to find this command here: https://api.docs.cpanel.net/openapi/cpa ... formation/
This command returned the following URL:
This may not be exactly like the other URLs that we were able to fetch from the whmapi1 command but it is a good start. I would suggest reaching out to the cPanel forums for further assistance if needed.
I hope you find this information helpful and let us know if you have any further questions.
Unfortunately, from reading their documentation, it appears the methods we used to add the JetBackup app_key are only valid for adding "plugins" app_keys. After some further research I was able to find a uapi command that was able to list a partial URL for zone_editor:
Code: Select all
uapi --user=username Branding get_application_information app_key='zone_editor'
This command returned the following URL:
Code: Select all
...
url: zone_editor/index.html
...
I hope you find this information helpful and let us know if you have any further questions.
Best Regards,
Richard, JetApps Team
Richard, JetApps Team