Jump to content

New Client Area Pages


mtk

Recommended Posts

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

?

Link to comment
Share on other sites

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 !!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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...?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

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