Jump to content

Custom Page Alignment


Recommended Posts

<?php

 

define("CLIENTAREA",true);

 

require("dbconnect.php");

require("includes/functions.php");

require("includes/clientareafunctions.php");

 

$pagetitle = $_LANG['clientareatitle'];

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

$breadcrumbnav = '<a href="about.php">'.$_LANG['globalsystemname'].'</a>';

$breadcrumbnav .= ' > <a href="about.php">About Us</a>';

 

initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav);

 

if ($_SESSION['uid']) {

# User is Logged In - put any code you like here

}

 

# To assign variables in Smarty use the following syntax.

# This can then be used as {$variablename} in the template

 

$smartyvalues["variablename"] = $value;

 

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

 

$templatefile = "about";

 

outputClientArea($templatefile);

 

?>

Link to comment
Share on other sites

<?php

 

define("CLIENTAREA",true);

 

require("dbconnect.php");

require("includes/functions.php");

require("includes/clientareafunctions.php");

 

$pagetitle = $_LANG['clientareatitle'];

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

$breadcrumbnav = '<a href="about.php">'.$_LANG['globalsystemname'].'</a>';

$breadcrumbnav .= ' > <a href="about.php">About Us</a>';

 

initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav);

 

if ($_SESSION['uid']) {

# User is Logged In - put any code you like here

}

 

# To assign variables in Smarty use the following syntax.

# This can then be used as {$variablename} in the template

 

$smartyvalues["variablename"] = $value;

 

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

 

$templatefile = "about";

 

outputClientArea($templatefile);

 

?>

 

Not that one the custom tpl page!

Link to comment
Share on other sites

<p>{$LANG.about}</p>

 

<table width="90%" border="0" align="center" cellpadding="4" cellspacing="0">

<tr>

<td width="100%"><img alt="" src="earth.png" style="float: right" />

Paragraph Here.

<br /><br />

Paragraph Here.

<br /><br />

Paragraph Here.

</td>

</tr>

</table>

 

Try this:

 

<div style="margin: 0 auto 0;">
<p>{$LANG.about}</p>

<table width="90%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td width="100%"><img alt="" src="earth.png" style="float: right;" />
Paragraph Here.
<br /><br />
Paragraph Here.
<br /><br />
Paragraph Here.
</td>
</tr>
</table>
</div>

Link to comment
Share on other sites

Sorry that did not work either. I was just trying to add a couple of pages to the system. This is my test page to get the bugs worked out. My intention is to rebuild my website around whmcs, I switched over from another program. If anyone has another suggestion or a working tpl of anything please let me know how you got it up and running.

 

Thanks

Rob

Link to comment
Share on other sites

I've just tried the code you submitted, both php and tpl files: the table is centered but the text inside the table is aligned to the left.

If you're talking about the text, then you need to add align="center" to the <td tag to make the text in center:

 

<p>{$LANG.about}</p>

<table width="90%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td width="100%" align="center"><img alt="" src="earth.png" style="float: right" />
Paragraph Here.
<br /><br />
Paragraph Here.
<br /><br />
Paragraph Here.
</td>
</tr>
</table>

I would recommend you to use Developer Toolbar add-on with Firefox, it will help you a lot in such cases.

Hope it was the issue, Good Luck coding your pages ;)

Edited by lysenshi
Link to comment
Share on other sites

I've just tried the code you submitted, both php and tpl files: the table is centered but the text inside the table is aligned to the left.

If you're talking about the text, then you need to add align="center" to the <td tag to make the text in center:

 

<p>{$LANG.about}</p>

<table width="90%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td width="100%" align="center"><img alt="" src="earth.png" style="float: right" />
Paragraph Here.
<br /><br />
Paragraph Here.
<br /><br />
Paragraph Here.
</td>
</tr>
</table>

I would recommend you to use Developer Toolbar add-on with Firefox, it will help you a lot in such cases.

Hope it was the issue, Good Luck coding your pages ;)

 

- In ie the entire page moves to the left side of the screen and slightly lower than the rest of whmcs pages.

- In FF the page is centered but slightly lower than the rest of whmcs.

- The text inside should be on the left and not centered

 

I will try the developer toolbar and see what that does for me. I am sure someone here has had a successful page created that matches the whmcs (centered on the screen).

 

Thanks for everone's help so far!

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