Jump to content

Problem in Creating New Pages


vinbase

Recommended Posts

That code is for V3.8.1

Try this example

<?php

define("CLIENTAREA",true);

require("dbconnect.php");

require("includes/functions.php");

 

$pagetitle = "Test Page";

 

$pageicon = "images/support/clientarea.gif";

 

$breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a> > <a href="test.php">Test Page</a>';

 

require("init.php");

 

# Define the template filename to be used without the .tpl extension

 

$templatefile = "test";

 

require("display.php");

 

?>

Link to comment
Share on other sites

Hey Sparky..

 

I have 3.8.1.. Running files with 'http://wiki.whmcs.com/Creating_Pages'

 

They work fine.. But when accessed by SSL they return not secure.. How can I fix this? Please let know.

 

Thanks.

On your https page it is getting a base href with only http://

<base href="http://www.hostwes.com/" />
In your admin Config => General Settings and check that you have the correct https:// entry in "WHMCS SSL System URL"
Link to comment
Share on other sites

Settings are correct..

 

The added pages are not normally SSL pages.. No need for them to be. Only if a client is logged in on a SSL page, then goes to an added page. It stays on Secure, instead of switching back to http like it would if going back to index.php.

 

Am I making sense? How can I get around this.

 

Thanks.

Link to comment
Share on other sites

go through your header and footer tpl files and check to see if you have the full path/url to the images etc.. if you do remove them like the examples below

eg..

one is in the head section

<link rel="shortcut icon" href="http://www.hostwes.com/images/favicon.ico" />
should be
<link rel="shortcut icon" href="/images/favicon.ico" />
another is (although this wont cause that much grief)
<form method="post" action="http://www.hostwes.com/dologin.php?goto=clientarea">
should be
<form method="post" action="dologin.php?goto=clientarea">

Just to rule it out, your code in the template for the base href shoud be

{if $systemurl}<base href="{$systemurl}" />{/if}

Link to comment
Share on other sites

I managed to duplicate your problem while I was doing a template for someone.

The base href is only required for the knowledgebase, announcements, and downloads

In your header.tpl change to line

{if $systemurl}<base href="{$systemurl}" />{/if}

to

{if $systemurl}
{if $smarty.server.PHP_SELF == '/knowledgebase.php' || $smarty.server.PHP_SELF == '/announcements.php' || $smarty.server.PHP_SELF == '/downloads.php'}
<base href="{$systemurl}" />
{/if}
{/if}

If your whmcs is in a subdirectory put the directory name in front of the 3 filenames

eg.. '/whmcs/knowledgebase.php'

Edited by sparky
Link to comment
Share on other sites

  • 2 months later...

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