mtk Posted May 15, 2010 Share Posted May 15, 2010 Hello I know it is possible to add new general pages to WHMCS which their general URL would be: <WHMCS>/mynewpage.php is it possible to add the new page as a new clientarea page, like this: <WHMCS>/clientarea.php?action=newpage ? 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted May 15, 2010 Share Posted May 15, 2010 is it possible to add the new page as a new clientarea page, like this: <WHMCS>/clientarea.php?action=newpage No ........ 0 Quote Link to comment Share on other sites More sharing options...
mtk Posted May 15, 2010 Author Share Posted May 15, 2010 No........ too bad. how can I redirect the client to the login page, but after login have him returned to my new page? 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 My problem is even more basic than this.... The instructions seem pretty clear to add new pages: http://wiki.whmcs.com/Creating_Pages I've completed all steps but nowhere in that documentation does it say WHAT TO CALL the first php page that you create that contains code like this: <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/Support.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="services.php">Web and Design Services</a>'; initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } $smartyvalues["variablename"] = $value; $templatefile = "services"; outputClientArea($templatefile); ?> It just says "save as a php page".... I can name it anything??? I tried just naming it 'something.php' and uploaded it, but I don't see any of the new links showing up in the client area. Please advise !! 0 Quote Link to comment Share on other sites More sharing options...
mtk Posted May 15, 2010 Author Share Posted May 15, 2010 It just says "save as a php page".... I can name it anything??? I tried just naming it 'something.php' and uploaded it, but I don't see any of the new links showing up in the client area. Please advise !! it won't show up in the client area, you'll have to add it manually in your template. and yes, you can name it as you wish. if you name it something.php it will be accessible through: http://<WHMCS>/something.php 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 I added a .tpl file .... perhaps I'm adding it to the wrong template. This is for a client and she has like four templates in there. 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 Actually , I should ask : WHERE do I manually add it to the template? Which file ? 0 Quote Link to comment Share on other sites More sharing options...
mtk Posted May 15, 2010 Author Share Posted May 15, 2010 I added a .tpl file .... perhaps I'm adding it to the wrong template. This is for a client and she has like four templates in there. you should have a tpl file called services.tpl. according to the parameter you set here: $templatefile = "services"; it doesn't matter how many template does the client have, you should put that file in the active template (or on every template used by the system)... 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 Hm.... that's what I did ... i saved services.tpl in the root of every template folder on there. in other words <WHMCSroot>/templates/template1/services.tpl <WHMCSroot>/templates/template2/services.tpl that's what I did. so it should be showing up now, right? where does this new link show up? Maybe I'm looking for it in the wrong place. 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 Yeah, that's what I have. I saved as follows: <WHMCSroot>/templates/template1/services.tpl <WHMCSroot>/templates/template2/services.tpl Maybe I'm looking in the wrong place for the links to show up? And I still don't understand how that main php file can be named "anything". How does whmcs know how to find it? Does it just search through every file in its root directory and just "include" it by default? That just does not seem to make sense.... I don't understand, please illuminate. 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 Ok, I should clarify The pages I've created show up fine in WHMCS. What I am wanting is for the LINKS to the new pages I made to show up in the client area. Which additional file do I need to edit to get LINKS TO MY NEW PAGES to show up in the client area? 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 (edited) Anyone? I'm sorry, I meant PORTAL HOME I just need to find out where to edit the pages that show up in the PORTAL HOME so that i can make links to my new pages. Edited May 15, 2010 by Nmuta 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 i thought it would be <WHMCSroot>/templates/portal/clientareahome.tpl but that does not appear to be it. I just need to figure out how to add links to my new pages I just created on the PORTAL HOME. 0 Quote Link to comment Share on other sites More sharing options...
Nmuta Posted May 15, 2010 Share Posted May 15, 2010 Ok I found it.... <WHMCSroot>/templates/MYTEMPLATENAME/homepage.tpl 0 Quote Link to comment Share on other sites More sharing options...
mtk Posted May 17, 2010 Author Share Posted May 17, 2010 too bad.how can I redirect the client to the login page, but after login have him returned to my new page? Nmuta, sorry, but next time, please open a separate thread for a separate topic. can someone please help me out...? 0 Quote Link to comment Share on other sites More sharing options...
kurieuo Posted May 18, 2010 Share Posted May 18, 2010 try using the loggedin variable to check if the user is logged in if not (that is, loggedin == false), show a copy of the login form with form action set to: dologin.php?goto=filename (note: no .php) e.g. if file was webdesign.php - then dologin.php?goto=webdesign (you should be able to just copy the code from login.tpl but change {$formaction} to the 'dologin...' string above. if user is logged in, then show content of page Hope that helps - Wife of K 0 Quote Link to comment Share on other sites More sharing options...
mtk Posted May 18, 2010 Author Share Posted May 18, 2010 try using the loggedin variable to check if the user is logged in if not (that is, loggedin == false), show a copy of the login form with form action set to: dologin.php?goto=filename (note: no .php) e.g. if file was webdesign.php - then dologin.php?goto=webdesign (you should be able to just copy the code from login.tpl but change {$formaction} to the 'dologin...' string above. if user is logged in, then show content of page Hope that helps - Wife of K thanks, I'll try that... 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.