PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-16-2003, 02:25 PM   #1
fredh
Green Mole
 
Join Date: Nov 2003
Posts: 11
Question 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?
fredh is offline   Reply With Quote
Old 11-16-2003, 08:17 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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;

__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-16-2003, 08:59 PM   #3
fredh
Green Mole
 
Join Date: Nov 2003
Posts: 11
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)
fredh is offline   Reply With Quote
Old 11-17-2003, 12:21 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Ah, I see and agree with three separate installs for what you're looking to do.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Url rewriting christophe How-to Forum 2 01-03-2005 04:49 PM
Another URL Question please. Kenny How-to Forum 2 12-01-2004 06:17 AM
How to unlock an URL philbihr How-to Forum 2 11-08-2004 05:11 AM
Suggest URL Dave A How-to Forum 1 08-18-2004 07:51 PM
URL Bot RaGe Mod Requests 0 04-29-2004 06:59 AM


All times are GMT -8. The time now is 01:28 PM.


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