Jump to content

Creating or Editing Variable/Values For Custom Pages


ddg8176

Recommended Posts

I'm really trying here BUT I am thoroughly confused about a few things. First off, I use the Portal templates and have managed to create a custom page to display a comparison table of my hosting packages' details. I created a comparison.tpl with the HTML code for the table and a comparison.php file to link the template:

 

$templatefile = "comparison";

 

Next I copied and pasted the Domain Availability Checker link code on the homepage.tpl and changed the second copy to link to comparison.php instead of domainchecker.php. Here's the code now in my homepage.tpl:

 

<tr>

<td width="10%"><div align="center"><a href="domainchecker.php"><img src="images/support/domains.gif" alt="{$LANG.domaintitle}" /></a></div></td>

<td width="40%" style="padding-left:5px;"><a href="domainchecker.php"><strong>{$LANG.domaintitle}</strong></a><br />

{$LANG.availabilitydescription}</td>

<td width="10%" bgcolor="#EFF2F9"><div align="center"><a href="serverstatus.php"><img src="images/support/status.gif" alt="{$LANG.serverstatustitle}" /></a></div></td>

<td width="40%" bgcolor="#EFF2F9" style="padding-left:5px;"><a href="serverstatus.php"><strong>{$LANG.serverstatustitle}</strong></a><br />

{$LANG.serverstatusdescription}</td>

</tr>

<tr>

<td width="10%" bgcolor="#EFF2F9"><div align="center"><a href="comparison.php"><img src="images/support/domains.gif" alt="{$LANG.domaintitle}" /></a></div></td>

<td width="40%" bgcolor="#EFF2F9" style="padding-left:5px;"><a href="comparison.php"><strong>{$LANG.domaintitle}</strong></a><br />

{$LANG.availabilitydescription}</td>

</tr>

 

If you go to http://www.goteehosting.com/whmcs you should see two Domain Availability Checker links listed on the homepage.

 

Now, here are my issues:

 

First, I need to change the second link for Domain Availability Checker to say something like "Hosting Plans" instead of "Domain Availability Checker" and change the discription to say something like "View our hosting plans" instead of "Check the availability of a domain"? I assume I need to change it through variable and create new ones like:

 

{$LANG.comparisontitle} and {$LANG.comparisondescription}

 

However, I don't know where to create the variables or how to assign values to them. I've done the debug thing but it wasn't really that helpful to me.

 

Second, if you click my second Domain Availability Checker link on the homepage it does take you to the correct destination (my comparison table). My issue here is that when the page loads it looks like it is blank; but if you scroll down, the table is at the bottom. How do I get the top of the table to be aligned with the top of the NavBar on the left? I have tried reducing the table and cell widths to several sizes but the darn thing stays at the bottom.

 

Also mentioning the NavBar, I have managed to add a link to my hosting plan comparison page to the NavBar too but it says Order... I need to change it also.

Link to comment
Share on other sites

The new language strings are added to whmcs/lang/English.txt. Once you open that file, you'll see it's easy to add new strings. I'd advise you to group your custom strings in one place in the file and also make a backup or two. When you upgrade WHMCS, be careful not to overwrite your language file. Matt normally adds new additions to the bottom of the updated files, so you can copy those to your custom files, or copy your custom block to his updated files.

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