How do I create an index page for my links directory?


#1

Hi,
I’m trying to create a separate directory for my links pages to enable me to manage my links pages easier but I’m not sure how to do that. I want to take my links pages out of the root directory where I have them now. Someone had told me I need to create an index.php page for the links directory but I’m not certian as how to go about doing that. Can anyone assist me with this? I have tryed a few times but can’t seem to get it to work.


#2

I am not sure I fully understand what you are trying to accomplish. Could be please try to explain a little more clearly what you are trying to achive and I will see what I can do to help.


#3

Ok Ragster,
I’ll try to provide more detail. I use ARELIS-Axandra’s reciprical link application for managing our reciprical links. With this application I am able to look for, manage and create my php links pages. Then all I need to do is ftp the pages to our server. What I want to do is put then in a separate directory instead of the root directory where I have them now. I have tried several times to do this but for what ever reason I am unable to get it to work. If I put the files in the root folder they work with minor errors. The cart I am using is osCommerce, I installed a links module for the site but fint it’s to labor intensive to add new links.
So basically I need to do the following:

  1. Create a links directory.
  2. Upload my links pages.
  3. Associate my links buttons on my home page to the my links.php file

I hope that’s clearer. If you need further detail let me know. Below is my links.php code if that helps any.

<?php
/*
  $Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
<!--
.shippingtab {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #006699;
}
-->
</style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top" class="smallText"><p><font face="Verdana,Arial,Helvetica" size="3"><b>We recommend these web sites:</b></font><p><TABLE BORDER="0" WIDTH="100%" CELLPADDING="0" CELLSPACING="5">
<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="arts-crafts.php">Arts/Crafts</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="arts-crafts-kids-crafts.php">Kids Crafts</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="infant-baby.php">Infant/Baby</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-announcements.php">Baby Announcements</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-bedding.php">Baby Bedding</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-clothing.php">Baby Clothing</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-furniture.php">Baby Furniture</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-gifts.php">Baby Gifts</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-names.php">Baby Names</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-products.php">Baby Products</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-showers.php">Baby Showers</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-sites.php">Baby Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-baby-toys.php">Baby Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-pregnancy-sites.php">Pregnancy Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="infant-baby-toys-games-&-more.php">Toys-Games & more</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="children.php">Children</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-child-care-providers.php">Child Care Providers</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-child-furniture.php">Child Furniture</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-child-safety.php">Child Safety</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-children's-books.php">Children's Books</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-childrens-clothing.php">Childrens Clothing</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-childrens-products.php">Childrens Products</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-childrens-toys.php">Childrens Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-children's-videos.php">Children's Videos</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-general.php">General</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-party-suppilies-&-ideas.php">Party Suppilies & Ideas</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="children-riding-toys.php">Riding Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="internet.php">Internet</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="internet-general.php">General</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="collectibles.php">Collectibles</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="collectibles-collectible-toys.php">Collectible Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="kids-stuff.php">Kids Stuff</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="kids-stuff-children's-books.php">Children's Books</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="kids-stuff-childrens-products.php">Childrens Products</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="kids-stuff-party-suppilies-&-ideas.php">Party Suppilies & Ideas</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="kids-stuff-toys-games-&-more.php">Toys-Games & more</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="educational.php">Educational</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-children's-books.php">Children's Books</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-children's-videos.php">Children's Videos</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-educational-books.php">Educational Books</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-educational-sites.php">Educational Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-educational-software.php">Educational Software</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="educational-educational-toys.php">Educational Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="other-quality-link-sites.php">Other Quality Link Sites</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="other-quality-link-sites-general.php">General</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="family.php">Family</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-child-safety.php">Child Safety</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-family-sites.php">Family Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-kid-sites.php">Kid Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-kids-health.php">Kids Health</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-maternity-sites.php">Maternity Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-mom-sites.php">Mom Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-parenting-sites.php">Parenting Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="family-pregnancy-sites.php">Pregnancy Sites</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="preschool.php">Preschool</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="preschool-toys-that-teachpreschool.php">Toys That Teach&mdash;Preschool</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="finance.php">Finance</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="finance-credit.php">Credit</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="shopping.php">Shopping</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="shopping-general.php">General</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="shopping-gifts.php">Gifts</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="shopping-jewelry.php">Jewelry</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="shopping-shopping-cont....php">Shopping cont...</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="general.php">General</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="general-games.php">Games</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="general-shopping-cont....php">Shopping cont...</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="toys-games.php">Toys/Games</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-childrens-toys.php">Childrens Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-educational-toys.php">Educational Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-games.php">Games</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-general.php">General</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-puzzles.php">Puzzles</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-riding-toys.php">Riding Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-toys-games-&-more.php">Toys-Games & more</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="toys-games-wooden-toys.php">Wooden Toys</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>

<tr>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="hobbies.php">Hobbies</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="hobbies-hobbies.php">Hobbies</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
<td width="50%" valign="top"><b><font face="Verdana,Arial,Helvetica" size="3"><a HREF="wooden-toys.php">Wooden Toys</a></font></b><br><font face="Verdana,Arial,Helvetica" size="1"><a HREF="wooden-toys-building-plans.php">Building Plans</a></font><font face="Verdana,Arial,Helvetica" size="1">, </font><font face="Verdana,Arial,Helvetica" size="1"><a HREF="wooden-toys-toys-games-&-more.php">Toys-Games & more</a></font><font face="Verdana,Arial,Helvetica" size="1">...</font><br><br></td>
</tr>
</TABLE><p><font face="Verdana,Arial,Helvetica" size="1"></font></p><br>
      </p>
    </td>
    <!-- body_text_eof //-->
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
    </table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>

MOD EDIT: Changed the, apparently now defunct , PHP bb code tags to the CODE bb code for readability


#4

forgive me, but I too, do not understand your question (even with the clarification). Your initial question centered (I think) around

I want to take my links pages out of the root directory where I have them now. Someone had told me I need to create an index.php page for the links directory

I am assuming you don’t actually mean How do you create an index.php page… Do you?

More to the point… What is it that you want the page to be able to do. A links page (to me) would be a page that has links to sites of perhaps common interest. Are you trying to include a LINKS page to some other page?

ALSO:
Showing the entire code for a particular page is not much help unless you can try and narrow down where you think the problem is. It would be helpful if you let us know what you have tried and the results. Please include what OS you are using as well as what web server you are using (please include version numbers as well).

Paul