Jump to content

Creating custom pages below the WHMCS install root?


ffeingol

Recommended Posts

We've test custom pages and have no issues creating:

 

/whmcs/mycustom.php

 

Is it possible to do this:

 

/whmcs/custom/index.php

/whmcs/custom/custom2/index.php

/whmcs/custom/custom3/index.php

 

When we try to pull in the required WHMCS includes they generate errors.

 

Thanks

Link to comment
Share on other sites

Hello Guys,

 

Yes, I know how to adjust the include path (or at least I think I do). If you simply change it to ../dbconnect.php you get something like:

 

Warning: opendir(lang/) [function.opendir]: failed to open dir: No such file or directory in /###/###/dbconnect.php on line 0

Warning: readdir(): supplied argument is not a valid Directory resource in /###/###/dbconnect.php on line 0

Warning: closedir(): supplied argument is not a valid Directory resource in /###/###/dbconnect.php on line 0

Warning: opendir(lang/) [function.opendir]: failed to open dir: No such file or directory in /###/###/includes/clientareafunctions.php on line 0

Warning: readdir(): supplied argument is not a valid Directory resource in /###/###/includes/clientareafunctions.php on line 0

Warning: closedir(): supplied argument is not a valid Directory resource in /###/###/includes/clientareafunctions.php on line 0

Warning: Template error: unable to read resource: "mytemplate/header.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

Warning: Template error: unable to read resource: "mytemplate/header.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

Warning: Template error: unable to read resource: "mytemplate/frank.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

Warning: Template error: unable to read resource: "mytemplate/frank.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

Powered by WHMCompleteSolution

Warning: Template error: unable to read resource: "mytemplate/footer.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

Warning: Template error: unable to read resource: "mytemplate/footer.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095

 

If I use ini_set or change the include_path in php.ini so php automatically looks in my WHMCS install dir I get rid of the smarty issues but all the opendir/readdir/closedir errors still exist. Something in dbconnect.php and clientareafunctions.php must be using a relative path and it gets messed up when I go a directory deeper.

 

Any help is appreciated.

Link to comment
Share on other sites

Yea, I read that too. I've opened a support ticket to get the final answer. I'll update this thread when I hear back from support. We have a whole bunch of pages to add (tutorials) so having different tutorials in different directories just makes things a whole lot easier.

Link to comment
Share on other sites

We've test custom pages and have no issues creating:

 

/whmcs/mycustom.php

 

Is it possible to do this:

 

/whmcs/custom/index.php

/whmcs/custom/custom2/index.php

/whmcs/custom/custom3/index.php

 

When we try to pull in the required WHMCS includes they generate errors.

 

Thanks

 

How did you get your custom pages to work? I setup one and it shifts the entire page over to the left contrary to the rest of whmcs. I have been told it is in the tpl file, but I even used the custom page to point to an already existing whmcs tpl and it still did that.

 

Could you show me the php file? I used the example from the wiki without complete success.

 

Thanks!

Link to comment
Share on other sites

My php file looks almost exactly like the example (changing the page title and links to the page). I'd also have to agree that it's prob. you template. Might be worth having you post your template file here.

 

If things are not lining up properly I'd think it's a un-closed div or a div that is not clearing things (assuming your coding in XHTML).

Link to comment
Share on other sites

My php file looks almost exactly like the example (changing the page title and links to the page). I'd also have to agree that it's prob. you template. Might be worth having you post your template file here.

 

If things are not lining up properly I'd think it's a un-closed div or a div that is not clearing things (assuming your coding in XHTML).

 

I actually did in another post. I even tried a blank file with no change. It tried with/without tables, with/without div tags and just plane text. all failed. I even pointed to homepage template with the exact results. This tells me it is not the template at all but the code in the example.

 

Any suggestions here would be great!

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