PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Per URL Catalogs? (http://www.phpdig.net/forum/showthread.php?t=220)

fredh 11-16-2003 01:25 PM

Per URL Catalogs?
 
Hey all,

First off, I have to say that this piece of software is awesome! Excellent work!

Is it possible to have a catalog based on an exact url or is it only by site name at the moment?

The reason is that the site I am building comes in 3 languages and is 100% templated.

To change languages I pass a $_GET var to a page, ex: http://xxxxx/index.php?lang=en

This value is stored in a $_SESSION var and all future pages are rendered in the appropriate language. (default is en)

So, what I would like to do is have 3 search catalogs:
1. http://xxxx/index.php?lang=en
2. http://xxxx/index.php?lang=fr
3. http://xxxx/index.php?lang=es

Then, depending on the current language I can query the appropriate catalog for results.

Is this possible?

Charter 11-16-2003 07:17 PM

Hi. I'm not quite sure what mods you've made, but perhaps use something like the following in the config file.
PHP Code:

if (isset($_SESSION['lang'])) {
    
$lang $_SESSION['lang'];
}

if ((!isset(
$phpdig_language)) || (($lang != 'en') && ($lang != 'fr') && ($lang != 'es'))) {
    
$phpdig_language "en";
}
else {
    
$phpdig_language $lang;



fredh 11-16-2003 07:59 PM

Ah, no mods were made here :)

Your software was built well enough for me to instantly integrate it with my templating system (http://pear.php.net/package/HTML_Template_Xipe)


I'm just wondering what will happen on my site if someone using the french version makes a query. I would'nt want them to see english results and vice versa.

If there was a way to setup 3 different spiders, one for each language, I could query against the proper language.

The problem that I think I see here is that the spider only allows one set of results per domain name whereas my current setup uses the same domain name to serve 3 languages.

I think that my quickest solution at the moment will be to setup three 3rd level domains and spider each of them:

http://en.whatever.com (english)
http://es.whatever.com (spanish)
http://fr.whatever.com (french)

Charter 11-16-2003 11:21 PM

Ah, I see and agree with three separate installs for what you're looking to do. :)


All times are GMT -8. The time now is 07:23 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.