Jump to content

CassidyDNS

Member
  • Posts

    62
  • Joined

  • Last visited

Everything posted by CassidyDNS

  1. The issue isn't with retrieving the values, it's with setting them. When creating a new server, the cPanel module doesn't ask for an "Access Hash" like other modules, instead it asks for an "API Token". I want my module to ask for an API Token as well and not an Access Hash.
  2. I've almost finished developing my own server module, however, I'd like to provide the option for using a password or API key (instead of the access hash). I can see that some server modules like cPanel provide an API key instead of an access hash, but I can't find any docs on how to make it use that instead. I've searched Google, etc as well and I can't find anything on how to do this. Would anyone here be able to help please?
  3. The below should work, but you should avoid using javascript as it wont work if it's been disabled in the users browser. window.location.replace("logout.php");
  4. Does anyone know if there is a way I can add alerts into the smarty variable please? In the clientareadomaindetails.tpl file, we have the below: {if $alerts} {foreach $alerts as $alert} {include file="$template/includes/alert.tpl" type=$alert.type msg="<strong>{$alert.title}</strong><br>{$alert.description}" textcenter=true} {/foreach} {/if} I would like to add to these alerts to display my own custom messages. Using the below I have managed to create my own custom alerts within my registrar module function modulename_ClientArea($params) { global $smarty; $alerts = array(); $alerts[] = array( 'title' => 'Title', 'description' => 'description', 'type' => 'info' ); $smarty->assign('customalerts', $alerts); return ''; } But this would involve maintaining the tpl file mentioned above, which I'd like to avoid. I have tried the below as well, but anything I add doesn't exist by the time it gets the tpl file gets loaded, even when there are alerts already in the array when I add to them. function modulename_ClientArea($params) { global $smarty; $alerts = $smarty->getTemplateVars('alerts'); $alerts[] = array( 'title' => 'Title', 'description' => 'description', 'type' => 'info' ); $smarty->assign('alerts', $alerts); return ''; } FYI the reason I am not simply returning the alerts as html instead is because they would be put at the bottom of the domain overview page.
×
×
  • Create New...

Important Information

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