tonyb
08-25-2005, 01:27 AM
First - a question, with two possible answers and two possible solutions:
What do you want your link directory to do? Build link popularity, or become an authority directory on your subject?
If you just want to build link popularity, why not let my free service take care of that for you? Based loosely on phpld, www.logon.info comes complete with simple osc install instructions and will be live on your site in less than 10 minutes.
Now the shameless plug is out of the way, if you want to build your own authority directory with you doing all the legowrk and vetting, and you have an osc store, this is the fix you need:
Sit tight, this may be a bumpy ride!! lol
First, download phpld onto your pc. Now go through the main folder. Look for index.php and submit.php. Change these to link_index.php and link_submit.php.
**optional**
do the same with payment.php - i.e. rename to link_payment.php - if you are not going to offer paid links, no need to do this!
Now go into your templates folder. Find main.tpl and submit.tpl - in both folders, remove the lines:
{include file="header.tpl"}
and
{include file="footer.tpl"}
**directory link structure fix**
in templates/main.tpl, find on lines 32 and 38 and change index.php to resources.php
**Captcha fix**
in templates/submit.tpl, line 107 change
Content visible to registered users only.
to
Content visible to registered users only.
**optional**
leave in or remove:
{include file="top_bar.tpl"}
But remember if you remove this line, your directory will not have a submit link, an rss feed link or a search bar - you will need to add these in somewhere eles yourself, so probably easiest to leave this alone - we will amend it a bit later!
If you leave the top_bar in, you will need to amend the call to img to refer to your links folder i.e. on line 17
Open templates/top_bar.tpl - look for any reference to index.php and amend to resources.php - these should be lines 9,11, 23 and 36. Now look for submit.php and change to link_submit.php - line 7.
Upload your entire phpld file structure into a new folder within your oscommerce folder called "links" - i.e. in default osc setup, this would be wwww.yourdomain.com/catalog/links.....
Now for the oscommerce part. Go to one of your existing top level files - the conditions.php file is normally a good one to use. Make a copy of this file and download it to a local folder. Make 2 (or 3 if using payments) copies of this file - save one as resources.php, the other as submit_link.php
In both, delete the line which says:
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS);
Now you need to edit the next line where you see CONDITIONS to your new file name - i.e. RESOURCES or SUBMIT_LINK.
Now find:
<?php echo TEXT_INFORMATION; ?>
and change this to:
<?php include links/link_index.php ?> in one file and
<?php include links/link_submit.php ?> in the other.
Save those two files you just made as resources.php and submit_link.php respectively and upload them to your oscommerce folder.
Now, in your existing osc files, make a few quick changes:
open includes/languages/english.php and add this line:
define('TEXT_RESOURCES', 'Link Directory');
Next, open includes/filenames.php and add these two lines:
define('FILENAME_RESOURCES', 'resources.php');
define('FILENAME_SUBMIT_LINK', 'submit_link.php');
Now, in includes/boxes/information.php, and add this line:
'' . TEXT_RESOURCES . ' (' . tep_href_link(FILENAME_RESOURCES) . ')');
All you need to do now is go to yourdomain.com/catalog/links/install and setup your php link directory. Your directory should now show in your oscommerce store perfectly.
*******Please note a couple of important points!!
1 - I have not tested this out myself - as mentioned above I have developed a seperate solution and do not have a blank osc store to test my own instructions out - if you try this and it doesn't work, let me know. If you try this, it doesn't work but you fix it, please share the fix. If you try this and it works great, please let me know so everyone elese feels comfortable trying it!
2 - This is based on osc 2.2 MS2 - and phpld RC5.2 - you may have to tweak it accordingly if you are using a diff version
3 - Whilst I will try to keep track and help out where possible, I am a busy man trying to earn a living, so my answers wont always be immediate - patience is a virtue - post a question I'll get to it when I can, or one of the great coders on these forums may beat me to the punch!
4 - Did I point out - I have NOT tested this - DONT SHOOT ME if it doesn't work, but help me try to fix it! So many people want this, I thought I may as well try to get it going!!
ENJOY!!
What do you want your link directory to do? Build link popularity, or become an authority directory on your subject?
If you just want to build link popularity, why not let my free service take care of that for you? Based loosely on phpld, www.logon.info comes complete with simple osc install instructions and will be live on your site in less than 10 minutes.
Now the shameless plug is out of the way, if you want to build your own authority directory with you doing all the legowrk and vetting, and you have an osc store, this is the fix you need:
Sit tight, this may be a bumpy ride!! lol
First, download phpld onto your pc. Now go through the main folder. Look for index.php and submit.php. Change these to link_index.php and link_submit.php.
**optional**
do the same with payment.php - i.e. rename to link_payment.php - if you are not going to offer paid links, no need to do this!
Now go into your templates folder. Find main.tpl and submit.tpl - in both folders, remove the lines:
{include file="header.tpl"}
and
{include file="footer.tpl"}
**directory link structure fix**
in templates/main.tpl, find on lines 32 and 38 and change index.php to resources.php
**Captcha fix**
in templates/submit.tpl, line 107 change
Content visible to registered users only.
to
Content visible to registered users only.
**optional**
leave in or remove:
{include file="top_bar.tpl"}
But remember if you remove this line, your directory will not have a submit link, an rss feed link or a search bar - you will need to add these in somewhere eles yourself, so probably easiest to leave this alone - we will amend it a bit later!
If you leave the top_bar in, you will need to amend the call to img to refer to your links folder i.e. on line 17
Open templates/top_bar.tpl - look for any reference to index.php and amend to resources.php - these should be lines 9,11, 23 and 36. Now look for submit.php and change to link_submit.php - line 7.
Upload your entire phpld file structure into a new folder within your oscommerce folder called "links" - i.e. in default osc setup, this would be wwww.yourdomain.com/catalog/links.....
Now for the oscommerce part. Go to one of your existing top level files - the conditions.php file is normally a good one to use. Make a copy of this file and download it to a local folder. Make 2 (or 3 if using payments) copies of this file - save one as resources.php, the other as submit_link.php
In both, delete the line which says:
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS);
Now you need to edit the next line where you see CONDITIONS to your new file name - i.e. RESOURCES or SUBMIT_LINK.
Now find:
<?php echo TEXT_INFORMATION; ?>
and change this to:
<?php include links/link_index.php ?> in one file and
<?php include links/link_submit.php ?> in the other.
Save those two files you just made as resources.php and submit_link.php respectively and upload them to your oscommerce folder.
Now, in your existing osc files, make a few quick changes:
open includes/languages/english.php and add this line:
define('TEXT_RESOURCES', 'Link Directory');
Next, open includes/filenames.php and add these two lines:
define('FILENAME_RESOURCES', 'resources.php');
define('FILENAME_SUBMIT_LINK', 'submit_link.php');
Now, in includes/boxes/information.php, and add this line:
'' . TEXT_RESOURCES . ' (' . tep_href_link(FILENAME_RESOURCES) . ')');
All you need to do now is go to yourdomain.com/catalog/links/install and setup your php link directory. Your directory should now show in your oscommerce store perfectly.
*******Please note a couple of important points!!
1 - I have not tested this out myself - as mentioned above I have developed a seperate solution and do not have a blank osc store to test my own instructions out - if you try this and it doesn't work, let me know. If you try this, it doesn't work but you fix it, please share the fix. If you try this and it works great, please let me know so everyone elese feels comfortable trying it!
2 - This is based on osc 2.2 MS2 - and phpld RC5.2 - you may have to tweak it accordingly if you are using a diff version
3 - Whilst I will try to keep track and help out where possible, I am a busy man trying to earn a living, so my answers wont always be immediate - patience is a virtue - post a question I'll get to it when I can, or one of the great coders on these forums may beat me to the punch!
4 - Did I point out - I have NOT tested this - DONT SHOOT ME if it doesn't work, but help me try to fix it! So many people want this, I thought I may as well try to get it going!!
ENJOY!!