Gossamer Forum
Home : Products : Links 2.0 : Customization :

one database multiple site layouts

Quote Reply
one database multiple site layouts
I'm trying to find any pointers as to if its possible and how-to have my one links2 database generate multiple sets of html for my site.

I'm using Templates.

Links is working great for me, but I'm trying to figure out a way of having it produce hi-res and low-res versions of the site with just one database and hopefully one build.

Any pointers any one.

Thanks
Craig
Quote Reply
Re: one database multiple site layouts In reply to
If one build is required, that would take extensive modifications - but if two builds are fine, it should not be very hard to do by simply pointing to that one database from two installations of Links2, by editing your links.cfg file, and set all the following to the correct system paths:
Code:
$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.
Quote Reply
Re: one database multiple site layouts In reply to
Two builds are fine (and it sounds less painful!)

What would I need to do about site_html_template.pl?

Would I just need to copy the templates folder and change all the references in the config file or copy the entire /links folders and just make sure both installations point to the same .db's.

Craig
Quote Reply
Re: one database multiple site layouts In reply to
I posted a lengthy response in this Forum about adding a second set of templates. Please search this forum more carefully for the codes I posted...It is more involved than editing the links.cfg file.

You need to edit the following files to add a second set of templates in another directory:

1) db.pl
2) db_utils.pl
3) site_html_templates.pl
4) admin_html.pl
5) admin.cgi

and to build a second directory with different templates, you will also have to edit the nph-build.cgi file.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------











[This message has been edited by Eliot (edited February 13, 2000).]
Quote Reply
Re: one database multiple site layouts In reply to
Eliot,

Sorry to sound so lame, but over a week of searching in the forum etc and I can't find the post you were referrring to.

Any ideas on how to make the search on this site, look for the words, only from one person (e.g. you) and in the forum with maybe more than 50 answers - you are so busy everything I searched on with your name got 50 out of 50.

I did find the excellent new template mod on my searching though..

Thanks
Craig
Quote Reply
Re: one database multiple site layouts In reply to
Go here....

http://www.gossamer-threads.com/...um3/HTML/004591.html

BOOKMARK IT, PLEASE!

Found it under five minutes using the following search criteria:

Keywords: save templates Eliot
Match Exact Words
Forum: Modification Forum
Date: Last 30 Days

And only four Threads appeared with two relevant Threads.

Wink

Regards.


------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: one database multiple site layouts In reply to
Eliot,

it's bookmarked now.. Thanks again.

Craig
Quote Reply
Re: one database multiple site layouts In reply to
You're welcome.

I may write a more formal FAQ about this...I am done writing formal Mods since many people have problem with them...FAQs are a lot easier because all it is documenting code hacks within LINKS scripts NOT writing stand alone Mod applications to use with LINKS.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: [Heckler] one database multiple site layouts In reply to
Hello all,

Could somebody tell me how to get thru the forum at: http://www.gossamer-threads.com/...um3/HTML/004591.html

It was an error 'No such action 'ubb'

Please help and thanks so much.