Jump to content

New Page login required


KeithT

Recommended Posts

I have made a custom cancelation page and added this to the main header.tpl.

 

My question is what is the coding I need to make this page accessable ONLY once the client logs in? Also will this code go at the top of the cancel templete page?

Link to comment
Share on other sites

If I'm understanding your question right, you'll want to call

dologin.php?goto=clientarea in your form.

 

Nope.

 

 

What you want to do is follow these links,

 

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

(To create your page using WHMCS template system)

 

Then once created, in the body of the page add (in the .tpl file) add

 

{if $loggedin} 



Can only see when logged in</p> 

{else} 



Must be logged in to view</p>
{/if}

 

 

From,

Adam

Link to comment
Share on other sites

didnt work all i get is

 

Must be logged in to view

then under it the page im trying to block from non clients...

 

How do you have your pages setup?

 

Are you using the .tpl files or .php file?

 

 

 

From,

Adam

Link to comment
Share on other sites

Adam..

 

I do apologize sir...

 

I figured it out after thinking about it and thinking back to the way the if and else work from when i did flash so I went back into the templete and did the

 

{if $loggedin}

 

 

 

inserted the templete code</p>

 

{else}

 

 

 

Must be logged in to view</p>

{/if}

 

works great.. thank you for you help adam..... Im new to php coding im use to doing everthing in html but working with whmcs is making me learn new things that im loving... Once i get my site up and running im gonna start to build a page all in php to learn it better...

Link to comment
Share on other sites

Hey,

 

Glad it works. But remember, even tho WHMCS uses PHP, keep in mind that is not actually PHP code. Its smarty which is a PHP template based system.

 

Go down to your local book store and find books on PHP like

 

PHP and MySQL for Dummies

 

PHP Bible

 

and so on.

 

 

From,

Adam

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