Jump to content

Adding new Pages. How do I do this??


jsi

Recommended Posts

I wish to add new pages in my site that share the language and login settings, but have them outside of my whmcs root.

 

I found this on how to make them inside the root folder, but what code would I use to create them outside the root folder?

 

http://support.whmcs.com/knowledgebase.php?action=displayarticle&catid=7&id=26

 

 

 

Above only works on this: http://www.mysite.com/whmcsroot/newpage.php

 

and I need it here: http://www.mysite.com/newpage.php

 

 

I want it so that people can change the language and also affect these pages. So if they change to Spanish, the file http://www.mysite.com/newpage.php also changes to spanish.

 

How can I do this? A little help on this would be greatly appreciated.

 

Thanx in advance.

 

:lol:

Link to comment
Share on other sites

Check it out::http://wiki.whmcs.com/Creating_Pages

 

Thank you for that. I read that. But that is only to create new pages INSIDE the whmcs root directory.

 

I would need them outside the whmcs root directory.

 

Not this:

http://www.mysite.com/whmcsroot/newpage.php

 

I need this:

http://www.mysite.com/newpage.php

 

 

 

 

 

If I change the two required field's URL, would that work?

 

CHANGE FROM

require("dbconnect.php");
require("includes/functions.php"); 

 

TO:

require("http://www.mysite.com/whmcsroot/dbconnect.php");
require("http://www.mysite.com/whmcsroot/includes/functions.php"); 

 

Think this will work?

Link to comment
Share on other sites

You will not be able to get a page working using the WHMCS framework and templating system outside of the WHMCS directory.

 

Matt

 

 

That is understandable. However, I dont really want to use the entire framework and templating system. All I need to use is the language. Here is my dilemma. Please let me know if there is a better way to do this . . .

 

Example:

Say a user goes to my site and reads the default english language. They change the language to spanish, but when they enter my whmcs directory, its back to the whmcs default english. So the user gets confused since it switched back and has to change it once again to spanish.

All I want to do is find a way for the language setting to remember/detect what language its currently on to keep users from changing it all the time.

 

I can create my site with the languages I want separately from whmcs but then I would face this problem of two different language systems that work independently causing confusion to my visitors.

 

Any idea how I can achieve this?

 

That is all I wanted to do with the pages outside of the whmcs directory. Is there a way to share the language settings only? That is all I want to use from the whmcs framework. This way a user's language settings stay put regardless of what part of my website they are in.

 

- Thanx.

 

 

P.S.

If this is not possible to do, how can I move my WHMCS to my website's root directory? Right now I have it at http://www.mysite.com/whmcs/.'>http://www.mysite.com/whmcs/. And I would need to move it to http://www.mysite.com

 

Is there a tutorial on how to move it to my site's root directory so I can create all my pages within WHMCS? Will this affect my license or anything else?

Link to comment
Share on other sites

  • WHMCS CEO

You could either link to WHMCS using a link like cart.php?language=Spanish or cart.php?language=English depending on what language is being used on your site or you could move the WHMCS install up a level which just means moving the files, updating the system url and reissueing your license, then integrate the pages fully as in the code sample we provide.

 

Matt

Link to comment
Share on other sites

Also

require("http://www.mysite.com/whmcsroot/dbconnect.php");

require("http://www.mysite.com/whmcsroot/includes/functions.php");

 

is incorrect, as PHP would parse the data when you load the files.

Correct way is to use paths :

 

require("/home/xxx/public_html/whmcsroot/dbconnect.php");

require("/home/xxx/public_html/whmcsroot/includes/functions.php");

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