Jump to content

I tweaked some files to take the "homepage" links


Guest theorbo

Recommended Posts

and while it seems to work fine, I thought I should run the setup by the pros here....

I made a file, extras.tpl, saved in /stylesTemplates/boxes, as follows:

<!-- BEGIN: extras -->

<div class="boxTitleLeft">{LANG_EXTRAS_TITLE}</div>

<div class="boxContentLeft">

<ul>

<li class="bullet"><a href="http://somebunnies.com/index.php" class="txtDefault">{LANG_EXTRAS}</a></li>

<li class="bullet"><a href="index.php" class="txtDefault">{LANG_HOME}</a></li>

</ul>

</div>

<!-- END: extras -->

and I removed the dup'ed links from categories.tpl where they resided originally.

I created a file, extras.inc.php, saved in /includes/boxes/, as follows:

if(!isset($config)){

echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";

exit;

}

$box_content=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/boxes/extras.tpl");

$box_content->assign("LANG_EXTRAS_TITLE",$lang['front']['boxes']['site_links']);

$box_content->assign("LANG_EXTRAS",$lang['front']['boxes']['extras']);

$box_content->assign("LANG_HOME",$lang['front']['boxes']['homepage']);

$box_content->parse("extras");

$box_content = $box_content->text("extras");

?>

In index.tpl for the template I'm using (my own, reworked from Legend), I added {EXTRAS} at the top of the "colLeft" div which includes {CATEGORIES} et al. I then removed the random product from that column since I don't want a random product to show, resulting as follows:

<div class="colLeft">

{EXTRAS}

{CATEGORIES}

{INFORMATION}

{CURRENCY}

{LANGUAGE}

</div>

In /language/en/lang.inc.php, in the FRONTEND LANGUAGE section, I added the following before 'shop_by_cat' => "Shop by Category", :

/* added 092505 */

'site_links' => "Site Links",

'extras' => "main site Home",

/* end add */

In root/index.php, I added the following just before the relevant categories.inc.php lines in the START CONTENT BOXES section:

/* added 092505 */

include("includes/boxes/extras.inc.php");

$body->assign("EXTRAS",$box_content);

/* end add */

As I said, this seems to work fine, you can see the result here: http://somebunnies.vkaryl.net/catalog/

My concern is that something in tweaking the files might interfere with the proper operation of secure transactions. If anyone has reservations about this, information is always appreciated.

Thanks in advance!

Link to comment
Share on other sites

  • 4 weeks 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.

×
×
  • Create New...