Gossamer Forum
Home : Products : Links 2.0 : Customization :

Install TWO Links2 scripts to use same DATA directory and Different Templates

Quote Reply
Install TWO Links2 scripts to use same DATA directory and Different Templates
Greetings,
I installed Two sets of links2 on the same site at:
/cgibin/links/admin...etc. and
/cgibin/scripts/admin...etc.

However, I would like to install Two sets of Links2 on the same site but each set has its own templates, backup, header, footer directories. Each set will build in a different directory but both sets share the same databases. So if some one modify a link the database for both Link sets will get modified simultaneously.
How do I go about doing that?

Thank you in advance..
Mark
Quote Reply
Re: [Mark1] Install TWO Links2 scripts to use same DATA directory and Different Templates In reply to
It should just be a case of editing the bottom of links.cfg (see below)....simply point one copy of Links 2 towards the same data folder, and leave the rest as the same.

Quote:
$db_lib_path = $db_script_path; # PATH of library files.
$db_links_name = "$db_script_path/data/links.db"; # PATH to links database.
$db_category_name = "$db_script_path/data/categories.db"; # PATH to category database.
$db_valid_name = "$db_script_path/data/validate.db"; # PATH to validation database.
$db_modified_name = "$db_script_path/data/modified.db"; # PATH to modification database.
$db_url_name = "$db_script_path/data/url.db"; # PATH to URL lookup database.
$db_email_name = "$db_script_path/data/email.db"; # PATH to email database.
$db_links_id_file_name = "$db_script_path/data/linksid.txt"; # PATH to links counter file.
$db_category_id_file_name = "$db_script_path/data/categoryid.txt"; # PATH to category counter file.
$db_hits_path = "$db_script_path/data/hits"; # PATH to hits directory.
$db_template_path = "$db_script_path/templates"; # PATH to templates.
$db_rates_path = "$db_script_path/data/rates"; # PATH to ratings.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] Install TWO Links2 scripts to use same DATA directory and Different Templates In reply to
Thanks Andy,
However, this will not work with me because if you look at the top of the links.cfg, you will see that the $db_script_path = "/home/mysite/cgibin/links/admin";
and the other script is:
$db_script_path = "/home/mysite/cgibin/scripts/admin";

So, if I want the second script that is installed in cgibin/scripts directory to modify the databases of the first script that is installed in cgibin/links directory, then modifing the stuff you have descriped would not be enough, as the two scripts are completely seperate.
Is their a batter way to install two scripts to share the same databases only with seperate templates, header, footer, build directory...etc.?

Thank you in advance..
Mark
Quote Reply
Re: [Andy.] Install TWO Links2 scripts to use same DATA directory and Different Templates In reply to
Mark1,

If I understand correctly you can do something like this:

Take:

$db_links_name = "$db_script_path/data/links.db"; # PATH to links database.


And do this:

$db_links_name = "/the/full/path/to/the/data/links.db"; # PATH to links database.

Instead of using the default $db_script_path you can just replace it with the full path to what ever DB you have.

David

Last edited by:

webwizzz: Apr 12, 2002, 7:55 AM
Quote Reply
Re: [webwizzz] Install TWO Links2 scripts to use same DATA directory and Different Templates In reply to
Hi David,
Thanks for your help. That is exactly what I am looking for.
I will try this method for categories.db, txt...etc.

thank you for your help
Mark
Quote Reply
Re: [Mark1] Install TWO Links2 scripts to use same DATA directory and Different Templates In reply to
COOOOOOOOl! it works beautifully.

Thanks a lot..
Mark