jsi Posted April 16, 2008 Share Posted April 16, 2008 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. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 16, 2008 Share Posted April 16, 2008 Check it out::http://wiki.whmcs.com/Creating_Pages 0 Quote Link to comment Share on other sites More sharing options...
jsi Posted April 16, 2008 Author Share Posted April 16, 2008 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? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 17, 2008 WHMCS CEO Share Posted April 17, 2008 You will not be able to get a page working using the WHMCS framework and templating system outside of the WHMCS directory. Matt 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 17, 2008 Share Posted April 17, 2008 Unless you put whmcs in the same dir with you site, like I did. 0 Quote Link to comment Share on other sites More sharing options...
jsi Posted April 17, 2008 Author Share Posted April 17, 2008 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? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 17, 2008 WHMCS CEO Share Posted April 17, 2008 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 0 Quote Link to comment Share on other sites More sharing options...
bin_asc Posted April 17, 2008 Share Posted April 17, 2008 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"); 0 Quote Link to comment Share on other sites More sharing options...
jsi Posted April 17, 2008 Author Share Posted April 17, 2008 Awesome! You guys are great for your fast replies. Thank you very much! 0 Quote Link to comment Share on other sites More sharing options...
Peak-Host Posted April 18, 2008 Share Posted April 18, 2008 I'd like to say thanks for this, it has sort of helped me. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.