Jump to content

Help understanding Custom Page and Custom Module


carbotex

Recommended Posts

Hi,

 

I need help understanding Custom Page and Custom Module. I downloaded the ModuleDevKit.zip which contains an example on how to create a Server Module. There is a pdf documentation inside the zip file, there is a section talking about Client Area Page and Additional Client Area Page.

 

At the very last page, there is a link to Custom Page Wiki, it's showing an example on how to create a Custom Page within WHMCMS.

 

Now my question is, is it possible to package Custom Page within the Custom Module. So when the client discontinue the service or admin deactivate the module, the Custom Page should not be accessible by our clients. Are these two components completely unrelated?

Link to comment
Share on other sites

I reread the pdf file carefully. It seems like "Additional Client Area Pages" is already doing what I want to do. But somehow I can't get it to work.

 

So here is what I have so far:

 

/modules/servers/demo/demo.php

function demo_ClientArea($params) {

 

}

 

function demo_extrapage($params) {

$pagearray = array(

'templatefile' => 'extrapage',

'breadcrumb' => ' > <a href="dashboard">Dashboard</a>',

'vars' => array(

'var1' => 'demo1',

'var2' => 'demo2',

),

 

return $pagearray;

}

 

/modules/servers/demo/clientarea.tpl

<form action="#" method="post" target="_blank">

<input type="text" name="email" value="email@address.com" />

<input type="submit" value="login" />

</form>

 

<form method="post" action="clientarea.php?action=productdetails">

<input type="hidden" name="id" value="{$serviceid}" />

<input type="hidden" name="modop" value="custom" />

<input type="hidden" name="a" value="extrapage" />

<input type="submit" value="Launch" />

</form>

 

/modules/servers/demo/extrapage.tpl

<h3>Hello There</h3>

 

- - - Updated - - -

 

Sorry forgot the question :)

 

I followed the instructions in the pdf carefully however I'm not able to see the custom page. When I click on the 'Launch' button, nothing happens. What did I miss?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this 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